feat(deps): support PHP 8.5#67
Merged
Merged
Conversation
- Bump default PHP version to 8.5 in Makefile, docker-compose, Dockerfile and CI matrices
- Bump xdebug from 3.4.0 to 3.5.1 (PHP 8.5 support added in 3.5.x)
- Generalize pspell installation: PECL for PHP 8.4+, bundled for 8.2/8.3
- Update PHPStan and Scrutinizer matrices to test against PHP 8.5
- Move --display-deprecations PHPUnit flag to PHP 8.5 (highest supported)
- Fix two static analysis issues surfaced by newer PHPStan:
- LanguageToolApiClient::getSupportedLanguages now types the API response
explicitly so array_unique receives an array of strings
- preg_replace() return annotation aligned with native behavior
(array<string> preserves keys, not list<string>)
Tested with PHPUnit suite on PHP 8.5.6 + Symfony 7 (prefer-stable) and
PHP 8.2.31 (prefer-lowest): 94/94 tests pass, zero deprecations.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds PHP 8.5 support to the library and CI, bringing the project in line with the PHP active-support cycle (PHP 8.5 was released November 2025). Lower bound stays at PHP 8.2.
Changes
Makefile,docker-compose.ymldefaults bumped from 8.4 → 8.5run-tests.yml(8.5 prefer-stable + 8.2 prefer-lowest),phpstan.yml(8.2 + 8.5),.scrutinizer.yml(8.5)--display-deprecationsflag moved to 8.5 (the new highest version)PHPStan fixes
Two type issues surfaced by newer PHPStan releases (the project gitignores
composer.lock, so CI always picks up the latest):LanguageToolApiClient::getSupportedLanguages()— typed the/v2/languagesresponse shape soarray_uniquereceives a guaranteed array of stringspreg_replace()wrapper — return annotation aligned with native PHP behavior (keys are preserved on array input, so it'sarray<string>notlist<string>)Not changed
composer.json—"php": "^8.2"already covers 8.5 syntactically; lower bound intentionally preserved (8.2 has security support until end of 2026)symfony/process: ^6.4 | ^7— already supports the latest Symfony majorTest plan
PHP_VERSION=8.5 make build && make tests→ 94/94 tests pass on PHP 8.5.6 + Symfony 7.4.11, zero deprecationsPHP_VERSION=8.2 DEPS_STRATEGY=--prefer-lowest make tests→ 94/94 tests pass on PHP 8.2.31make phpstanon both 8.2 and 8.5 → 0 errorsmake examples-teston 8.5 → all examples run cleanlymake phpcs→ 0 fix needed