Skip to content

Commit b1aeae7

Browse files
committed
php 8.4 and phpunit 11
1 parent b7d5dba commit b1aeae7

File tree

11 files changed

+71
-71
lines changed

11 files changed

+71
-71
lines changed

.github/workflows/ci.yml

+11-11
Original file line numberDiff line numberDiff line change
@@ -20,41 +20,41 @@ jobs:
2020
run: curl --insecure https://localhost/ping -vvv
2121
- name: docker stop
2222
run: docker compose -f docker-compose.ci.yml stop
23-
php81:
24-
name: PHP 8.1
23+
php82:
24+
name: PHP 8.2
2525
runs-on: ubuntu-22.04
2626
steps:
2727
- name: checkout
2828
uses: actions/checkout@v4
2929
- name: composer test
30-
uses: docker://ghcr.io/chubbyphp/ci-php81:latest
30+
uses: docker://ghcr.io/chubbyphp/ci-php82:latest
3131
env:
3232
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3333
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
34-
php82:
35-
name: PHP 8.2
36-
runs-on: ubuntu-22.04
34+
php83:
35+
name: PHP 8.3
36+
runs-on: ubuntu-24.04
3737
steps:
3838
- name: checkout
3939
uses: actions/checkout@v4
4040
- name: composer test
41-
uses: docker://ghcr.io/chubbyphp/ci-php82:latest
41+
uses: docker://ghcr.io/chubbyphp/ci-php83:latest
4242
env:
4343
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4444
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
45-
php83:
46-
name: PHP 8.3
45+
php84:
46+
name: PHP 8.4
4747
runs-on: ubuntu-22.04
4848
steps:
4949
- name: checkout
5050
uses: actions/checkout@v4
5151
- name: composer test
52-
uses: docker://ghcr.io/chubbyphp/ci-php83:latest
52+
uses: docker://ghcr.io/chubbyphp/ci-php84:latest
5353
env:
5454
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5555
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
5656
- name: sonarcloud.io
57-
uses: sonarsource/sonarcloud-github-action@master
57+
uses: sonarsource/sonarqube-scan-action@v4.1.0
5858
env:
5959
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6060
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ A minimal skeleton to start with a minimal php project.
2222

2323
## Requirements
2424

25-
* php: ^8.1
26-
* [chubbyphp/chubbyphp-clean-directories][20]: ^1.3.1
27-
* [chubbyphp/chubbyphp-framework][21]: ^5.1.1
28-
* [chubbyphp/chubbyphp-framework-router-fastroute][22]: ^2.1
25+
* php: ^8.2
26+
* [chubbyphp/chubbyphp-clean-directories][20]: ^1.4
27+
* [chubbyphp/chubbyphp-framework][21]: ^5.2
28+
* [chubbyphp/chubbyphp-framework-router-fastroute][22]: ^2.2
2929
* [chubbyphp/chubbyphp-laminas-config][23]: ^1.4
30-
* [monolog/monolog][24]: ^3.5
31-
* [slim/psr7][25]: ^1.6.1
32-
* [symfony/console][26]: ^6.4.2
30+
* [monolog/monolog][24]: ^3.8.1
31+
* [slim/psr7][25]: ^1.7
32+
* [symfony/console][26]: ^7.2.1
3333

3434
## Environment
3535

composer.json

+14-14
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,24 @@
1010
}
1111
],
1212
"require": {
13-
"php": "^8.1",
13+
"php": "^8.2",
1414
"ext-json": "*",
15-
"chubbyphp/chubbyphp-clean-directories": "^1.3.1",
16-
"chubbyphp/chubbyphp-framework": "^5.1.1",
17-
"chubbyphp/chubbyphp-framework-router-fastroute": "^2.1",
15+
"chubbyphp/chubbyphp-clean-directories": "^1.4",
16+
"chubbyphp/chubbyphp-framework": "^5.2",
17+
"chubbyphp/chubbyphp-framework-router-fastroute": "^2.2",
1818
"chubbyphp/chubbyphp-laminas-config": "^1.4",
19-
"monolog/monolog": "^3.5",
20-
"slim/psr7": "^1.6.1",
21-
"symfony/console": "^6.4.2"
19+
"monolog/monolog": "^3.8.1",
20+
"slim/psr7": "^1.7",
21+
"symfony/console": "^7.2.1"
2222
},
2323
"require-dev": {
2424
"chubbyphp/chubbyphp-dev-helper": "dev-master",
25-
"chubbyphp/chubbyphp-mock": "^1.7",
26-
"infection/infection": "^0.27.9",
25+
"chubbyphp/chubbyphp-mock": "^1.8",
26+
"infection/infection": "^0.29.8",
2727
"php-coveralls/php-coveralls": "^2.7",
28-
"phpstan/extension-installer": "^1.3.1",
29-
"phpstan/phpstan": "^1.10.50",
30-
"phpunit/phpunit": "^10.5.5"
28+
"phpstan/extension-installer": "^1.4.3",
29+
"phpstan/phpstan": "^2.0.3",
30+
"phpunit/phpunit": "^11.5.0"
3131
},
3232
"autoload": {
3333
"psr-4": { "App\\": "src/" }
@@ -58,9 +58,9 @@
5858
],
5959
"test:cs": "mkdir -p build && PHP_CS_FIXER_IGNORE_ENV=1 vendor/bin/php-cs-fixer fix --dry-run --stop-on-violation --cache-file=build/phpcs.cache",
6060
"test:infection": "vendor/bin/infection --threads=$(nproc) --min-msi=100 --verbose --coverage=build/phpunit",
61-
"test:integration": "vendor/bin/phpunit --configuration phpunit.integration.xml --cache-result-file=build/phpunit/result.integration.cache",
61+
"test:integration": "vendor/bin/phpunit --configuration phpunit.integration.xml --cache-directory=build/phpunit/integration.cache",
6262
"test:lint": "mkdir -p build && find src tests -name '*.php' -print0 | xargs -0 -n1 -P$(nproc) php -l | tee build/phplint.log",
6363
"test:static-analysis": "mkdir -p build && bash -c 'vendor/bin/phpstan analyse src --no-progress --level=8 --error-format=junit | tee build/phpstan.junit.xml; if [ ${PIPESTATUS[0]} -ne \"0\" ]; then exit 1; fi'",
64-
"test:unit": "vendor/bin/phpunit --coverage-text --coverage-clover=build/phpunit/clover.xml --coverage-html=build/phpunit/coverage-html --coverage-xml=build/phpunit/coverage-xml --log-junit=build/phpunit/junit.xml --cache-result-file=build/phpunit/result.cache"
64+
"test:unit": "vendor/bin/phpunit --coverage-text --coverage-clover=build/phpunit/clover.xml --coverage-html=build/phpunit/coverage-html --coverage-xml=build/phpunit/coverage-xml --log-junit=build/phpunit/junit.xml --cache-directory=build/phpunit/unit.cache"
6565
}
6666
}

docker/development/php/Dockerfile

+16-16
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM rockylinux:9.3
1+
FROM rockylinux/rockylinux:9.5
22

33
SHELL ["/bin/bash", "-c"]
44

@@ -12,28 +12,28 @@ RUN dnf install -y --nobest \
1212
glibc-langpack-de \
1313
langpacks-de \
1414
nmap-ncat \
15-
php83-php-ast \
16-
php83-php-cli \
17-
php83-php-devel \
18-
php83-php-fpm \
19-
php83-php-intl \
20-
php83-php-mbstring \
21-
php83-php-opcache \
22-
php83-php-pecl-apcu \
23-
php83-php-pecl-pcov \
24-
php83-php-pecl-xdebug3 \
25-
php83-php-pecl-zip \
26-
php83-php-xml \
15+
php84-php-ast \
16+
php84-php-cli \
17+
php84-php-devel \
18+
php84-php-fpm \
19+
php84-php-intl \
20+
php84-php-mbstring \
21+
php84-php-opcache \
22+
php84-php-pecl-apcu \
23+
php84-php-pecl-pcov \
24+
php84-php-pecl-xdebug3 \
25+
php84-php-pecl-zip \
26+
php84-php-xml \
2727
procps-ng \
2828
sudo \
2929
supervisor \
3030
unzip \
3131
vim \
3232
zsh
3333

34-
RUN ln -sf /usr/bin/php83 /usr/bin/php \
35-
&& rm /etc/opt/remi/php83/php.d/15-xdebug.ini \
36-
&& rm /etc/opt/remi/php83/php.d/40-pcov.ini
34+
RUN ln -sf /usr/bin/php84 /usr/bin/php \
35+
&& rm /etc/opt/remi/php84/php.d/15-xdebug.ini \
36+
&& rm /etc/opt/remi/php84/php.d/40-pcov.ini
3737

3838
ENV TZ=Europe/Zurich
3939

docker/development/php/files/etc/opt/remi/php83/php.d/99-development.ini docker/development/php/files/etc/opt/remi/php84/php.d/99-development.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[php]
2-
error_reporting = E_ALL
2+
error_reporting = E_ALL & ~E_DEPRECATED
33
display_errors = On
44
display_startup_errors = On
55

docker/development/php/files/etc/supervisord.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
1515
serverurl=unix:///tmp/supervisor.sock
1616

1717
[program:php-fpm]
18-
command=/opt/remi/php83/root/usr/sbin/php-fpm -c /etc/opt/remi/php83/php-fpm.conf -F
18+
command=/opt/remi/php84/root/usr/sbin/php-fpm -c /etc/opt/remi/php84/php-fpm.conf -F
1919
stdout_logfile=/tmp/supervisord.log
2020
stdout_syslog=true
2121
stderr_logfile=/tmp/supervisord.log

docker/development/php/files/home/php/.sharedrc

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ alias rm='rm -i'
1515

1616
alias php-fpm-restart='/usr/bin/supervisorctl -c /etc/supervisord.conf restart php-fpm'
1717

18-
alias xdebug-on='echo "zend_extension=xdebug.so" | sudo tee /etc/opt/remi/php83/php.d/15-xdebug.ini && php-fpm-restart'
19-
alias xdebug-off='sudo rm /etc/opt/remi/php83/php.d/15-xdebug.ini && php-fpm-restart'
20-
alias pcov-on='echo "extension=pcov.so" | sudo tee /etc/opt/remi/php83/php.d/40-pcov.ini && php-fpm-restart'
21-
alias pcov-off='sudo rm /etc/opt/remi/php83/php.d/40-pcov.ini && php-fpm-restart'
18+
alias xdebug-on='echo "zend_extension=xdebug.so" | sudo tee /etc/opt/remi/php84/php.d/15-xdebug.ini && php-fpm-restart'
19+
alias xdebug-off='sudo rm /etc/opt/remi/php84/php.d/15-xdebug.ini && php-fpm-restart'
20+
alias pcov-on='echo "extension=pcov.so" | sudo tee /etc/opt/remi/php84/php.d/40-pcov.ini && php-fpm-restart'
21+
alias pcov-off='sudo rm /etc/opt/remi/php84/php.d/40-pcov.ini && php-fpm-restart'

docker/production/php/Dockerfile

+16-16
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM rockylinux:9.3
1+
FROM rockylinux/rockylinux:9.5
22

33
SHELL ["/bin/bash", "-c"]
44

@@ -12,27 +12,27 @@ RUN dnf install -y --nobest \
1212
glibc-langpack-de \
1313
langpacks-de \
1414
nmap-ncat \
15-
php83-php-ast \
16-
php83-php-cli \
17-
php83-php-devel \
18-
php83-php-fpm \
19-
php83-php-intl \
20-
php83-php-mbstring \
21-
php83-php-opcache \
22-
php83-php-pecl-apcu \
23-
php83-php-pecl-pcov \
24-
php83-php-pecl-xdebug3 \
25-
php83-php-pecl-zip \
26-
php83-php-xml \
15+
php84-php-ast \
16+
php84-php-cli \
17+
php84-php-devel \
18+
php84-php-fpm \
19+
php84-php-intl \
20+
php84-php-mbstring \
21+
php84-php-opcache \
22+
php84-php-pecl-apcu \
23+
php84-php-pecl-pcov \
24+
php84-php-pecl-xdebug3 \
25+
php84-php-pecl-zip \
26+
php84-php-xml \
2727
procps-ng \
2828
sudo \
2929
supervisor \
3030
unzip \
3131
vim \
3232
zsh
3333

34-
RUN ln -sf /usr/bin/php83 /usr/bin/php \
35-
&& echo "extension=pcov.so" > /etc/opt/remi/php83/php.d/40-pcov.ini
34+
RUN ln -sf /usr/bin/php84 /usr/bin/php \
35+
&& echo "extension=pcov.so" > /etc/opt/remi/php84/php.d/40-pcov.ini
3636

3737
ENV TZ=Europe/Zurich
3838

@@ -62,4 +62,4 @@ WORKDIR /app
6262

6363
RUN composer install --no-dev --optimize-autoloader
6464

65-
CMD /opt/remi/php83/root/usr/sbin/php-fpm -c /etc/opt/remi/php83/php-fpm.conf -F
65+
CMD /opt/remi/php84/root/usr/sbin/php-fpm -c /etc/opt/remi/php84/php-fpm.conf -F

src/RequestHandler/PingRequestHandler.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public function handle(ServerRequestInterface $request): ResponseInterface
2222
->withHeader('Expires', '0')
2323
;
2424

25-
/** @var string $body */
25+
/** @var non-empty-string $body */
2626
$body = json_encode(['datetime' => date(\DateTime::ATOM)], JSON_THROW_ON_ERROR);
2727

2828
$response->getBody()->write($body);

0 commit comments

Comments
 (0)