diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0eff951..92516da 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,8 +16,10 @@ jobs: - 8.0 - 8.1 - 8.2 + - 8.3 + steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Install PHP uses: shivammathur/setup-php@v2 @@ -29,10 +31,10 @@ jobs: - name: Get Composer Cache Directory id: composer-cache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" + run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - name: Cache Composer packages - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ${{ steps.composer-cache.outputs.dir }} key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }} diff --git a/CHANGELOG.md b/CHANGELOG.md index bc737ca..8a663c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ php-input-filter === +2.0.2 [2023-12-30] +--- + +- Added supporting of PHP 8.3. + 2.0.1 [2023-01-29] --- diff --git a/README.md b/README.md index b110a8d..8ad0811 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ A simple and powerful input filter for any PHP application. It's alike a form, but not the same. ;) -Supporting PHP from 7.4 up to 8.2. +Supporting PHP from 7.4 up to 8.x. ## Installation diff --git a/composer.json b/composer.json index c7067ee..9e36179 100644 --- a/composer.json +++ b/composer.json @@ -27,7 +27,7 @@ }, "require-dev": { "phpunit/phpunit": "^9.5.28", - "friendsofphp/php-cs-fixer": "^3.13.2" + "friendsofphp/php-cs-fixer": "^3.45.0" }, "autoload": { "psr-4": { diff --git a/workenv/50_xdebug.ini b/workenv/50_xdebug.ini index 40449cd..d800d10 100644 --- a/workenv/50_xdebug.ini +++ b/workenv/50_xdebug.ini @@ -1,2 +1,3 @@ zend_extension=xdebug xdebug.mode=debug,develop +xdebug.log=/home/php-cli/php-xdebug.log diff --git a/workenv/Dockerfile b/workenv/Dockerfile index 7c2e7b5..dd5fcab 100644 --- a/workenv/Dockerfile +++ b/workenv/Dockerfile @@ -1,4 +1,8 @@ -FROM php:8.2-cli-alpine +FROM php:8.3-cli-alpine + +ARG GITHUB_OAUTH_TOKEN="" +ARG USER_UID="" +ARG USER_GID="" RUN apk add --no-cache $PHPIZE_DEPS && apk add --update linux-headers @@ -6,12 +10,19 @@ RUN pecl install xdebug && docker-php-ext-enable xdebug RUN rm -f /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini COPY 50_xdebug.ini /usr/local/etc/php/conf.d/ -RUN curl -sS https://getcomposer.org/installer | php -- --2 --install-dir=/usr/bin --filename=composer -ARG GITHUB_OAUTH_TOKEN=false -RUN if [ ${GITHUB_OAUTH_TOKEN} != false ]; then \ - composer config -g github-oauth.github.com ${GITHUB_OAUTH_TOKEN} \ -;fi +RUN addgroup -g $USER_GID php-cli \ + && adduser -u $USER_UID -G php-cli -s /bin/sh -D php-cli + +USER php-cli -RUN export COMPOSER_DISABLE_XDEBUG_WARN=1 +ENV PATH="/home/php-cli/.local/bin:/home/php-cli/.composer/vendor/bin:${PATH}" + +RUN mkdir -p /home/php-cli/.local/bin && \ + curl -sS https://getcomposer.org/installer | \ + /usr/local/bin/php -- --2 --install-dir=/home/php-cli/.local/bin --filename=composer + +RUN if [ -n "${GITHUB_OAUTH_TOKEN}" ]; then \ + composer config -g github-oauth.github.com ${GITHUB_OAUTH_TOKEN} \ +;fi CMD ["php", "-a"] diff --git a/workenv/docker-compose.yml b/workenv/docker-compose.yml index 6531708..223eff6 100644 --- a/workenv/docker-compose.yml +++ b/workenv/docker-compose.yml @@ -5,10 +5,20 @@ services: build: context: workenv args: - - GITHUB_OAUTH_TOKEN= + - "GITHUB_OAUTH_TOKEN=" + # For Docker Desktop under macOS doesn't matter what IDs will be specified, because Docker works + # through virtualization, and you may comment "USER_UID" and "USER_GID" args. + # id -u + - "USER_UID=1000" + # id -g + - "USER_GID=1000" working_dir: /app tty: true volumes: - type: bind source: ./ target: /app + extra_hosts: + # host.docker.internal doesn't necessary if you use Docker Desktop under macOS, because its + # specified automatically, and you may comment line below. + - "host.docker.internal:host-gateway"