Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .docker/php/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Stays on PHP 8.5 until a pcov release builds on PHP 8.6 (1.0.12 does not, krakjoe/pcov#134) and PHP-CS-Fixer supports
# it (PHP-CS-Fixer/PHP-CS-Fixer#9954). The php:8.6 images no longer ship mbstring: install it with oniguruma-dev,
# without deleting oniguruma afterwards (libonig is needed at runtime).
FROM php:8.5-fpm-alpine

ARG UID
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
- name: Install PHP with extensions
uses: shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962 # v2
with:
php-version: '8.5'
php-version: '8.6'
coverage: none
tools: composer:v2
- name: Install Composer dependencies (locked)
Expand All @@ -63,6 +63,8 @@ jobs:
- name: Install PHP with extensions
uses: shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962 # v2
with:
# PHP-CS-Fixer does not support PHP 8.6 yet (it refuses to run on it): stay on 8.5 until a release supports
# it, see https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/9954
php-version: '8.5'
coverage: none
tools: composer:v2
Expand All @@ -81,7 +83,7 @@ jobs:
- name: Install PHP with extensions
uses: shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962 # v2
with:
php-version: '8.5'
php-version: '8.6'
coverage: none
tools: composer:v2
- name: Install Composer dependencies (locked)
Expand Down
20 changes: 17 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,36 @@ jobs:
# Lowest versions allowed by composer.json, on the lowest and the highest supported PHP versions (the old
# versions of a dependency may trigger deprecations of the recent PHP versions)
- { php-version: '8.3', dependencies: lowest, symfony-require: '' }
- { php-version: '8.5', dependencies: lowest, symfony-require: '' }
- { php-version: '8.6', dependencies: lowest, symfony-require: '' }
# Highest versions, for each supported Symfony version (8.x requires PHP 8.4)
- { php-version: '8.3', dependencies: highest, symfony-require: 7.4.* }
- { php-version: '8.4', dependencies: highest, symfony-require: 7.4.* }
- { php-version: '8.4', dependencies: highest, symfony-require: 8.* }
- { php-version: '8.5', dependencies: highest, symfony-require: 7.4.* }
- { php-version: '8.5', dependencies: highest, symfony-require: 8.* }
- { php-version: '8.6', dependencies: highest, symfony-require: 7.4.* }
- { php-version: '8.6', dependencies: highest, symfony-require: 8.* }
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- name: Install PHP with extensions
uses: shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962 # v2
with:
php-version: ${{ matrix.php-version }}
coverage: pcov
tools: composer:v2, flex
# No pcov release builds on PHP 8.6 yet (1.0.12 fails): it is built from source in the next step
coverage: ${{ matrix.php-version == '8.6' && 'none' || 'pcov' }}
tools: composer:v2, flex, phpize, php-config
# Coverage is required: a missing #[CoversClass] / #[UsesClass] is only reported as risky when it is collected.
# The PHP 8.6 build fix (krakjoe/pcov#134) is not released yet: remove this step and the coverage condition
# above once a pcov release supports PHP 8.6.
- name: Build pcov from source (PHP 8.6)
if: matrix.php-version == '8.6'
run: |
curl -fsSL https://github.com/krakjoe/pcov/archive/3795c08561d69ca7f55f693492de59a65a6a182d.tar.gz | tar xz -C /tmp
cd /tmp/pcov-3795c08561d69ca7f55f693492de59a65a6a182d
phpize && ./configure && make -j"$(nproc)" && sudo make install
echo 'extension=pcov' | sudo tee "$(php-config --ini-dir)/20-pcov.ini"
php --ri pcov
- name: Add PHPUnit matcher
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Install Composer dependencies (${{ matrix.dependencies }})
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Latest

### Changes
* [#84](https://github.com/cleverage/cache-process-bundle/issues/84) Tests on PHPUnit 12.5 and 13 (PHPUnit 10 and 11 dropped), with the lowest dependencies on PHP 8.3 and 8.5.
* [#87](https://github.com/cleverage/cache-process-bundle/issues/87) Support PHP 8.6: tests on PHP 8.6 (lowest dependencies, highest with Symfony 7.4 and 8.x), PHPStan and Rector on PHP 8.6, `symfony/polyfill-php86` is required so that the PHP 8.6 functions can be used on PHP 8.3 to 8.5, `symfony/dependency-injection` 7.4.17 or 8.1.5 is required (the former versions call `spl_object_hash()`, deprecated by PHP 8.6).

v2.4
------
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ make tests
## PHP version

The bundle supports PHP 8.3 and later: do not use a syntax introduced by a later version (property hooks, asymmetric
visibility, pipe operator...). The functions of PHP 8.4 and 8.5 (`array_find()`, `array_any()`, `mb_trim()`,
`array_first()`...) can be used: they are provided by the required `symfony/polyfill-php84` and
`symfony/polyfill-php85` packages on the older versions. Rector (`make quality`) is configured accordingly.
visibility, pipe operator...). The functions of PHP 8.4, 8.5 and 8.6 (`array_find()`, `array_any()`, `mb_trim()`,
`array_first()`, `clamp()`...) can be used: they are provided by the required `symfony/polyfill-php84`,
`symfony/polyfill-php85` and `symfony/polyfill-php86` packages on the older versions. Rector (`make quality`) is configured accordingly.

## Deprecations notices

Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,13 @@
"psr/cache": "^2|^3",
"symfony/cache": "^7.4|^8",
"symfony/config": "^7.4|^8",
"symfony/dependency-injection": "^7.4|^8",
"symfony/dependency-injection": "^7.4.17|^8.1.5",
"symfony/deprecation-contracts": "^2.5|^3",
"symfony/http-kernel": "^7.4|^8",
"symfony/options-resolver": "^7.4|^8",
"symfony/polyfill-php84": "^1.33",
"symfony/polyfill-php85": "^1.33",
"symfony/polyfill-php86": "^1.34",
"symfony/service-contracts": "^2.5|^3"
},
"require-dev": {
Expand Down