Skip to content

Commit

Permalink
Added supporting of PHP 8.3.
Browse files Browse the repository at this point in the history
  • Loading branch information
bupy7 committed Dec 30, 2023
1 parent f0d8d66 commit ce3a30b
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 13 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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') }}
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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]
---

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
1 change: 1 addition & 0 deletions workenv/50_xdebug.ini
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
zend_extension=xdebug
xdebug.mode=debug,develop
xdebug.log=/home/php-cli/php-xdebug.log
25 changes: 18 additions & 7 deletions workenv/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,28 @@
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

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"]
12 changes: 11 additions & 1 deletion workenv/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,20 @@ services:
build:
context: workenv
args:
- GITHUB_OAUTH_TOKEN=<YOUR_TOKEN>
- "GITHUB_OAUTH_TOKEN=<YOUR_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"

0 comments on commit ce3a30b

Please sign in to comment.