Skip to content

feat(deps): support PHP 8.5#67

Merged
tigitz merged 1 commit into
masterfrom
feature/php-8.5-support
May 17, 2026
Merged

feat(deps): support PHP 8.5#67
tigitz merged 1 commit into
masterfrom
feature/php-8.5-support

Conversation

@tigitz
Copy link
Copy Markdown
Owner

@tigitz tigitz commented May 17, 2026

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

  • Default PHP version: Makefile, docker-compose.yml defaults bumped from 8.4 → 8.5
  • Dockerfile: xdebug 3.4.0 → 3.5.1 (8.5 support added in xdebug 3.5.x); pspell install logic generalized — PECL for PHP 8.4+, bundled extension for 8.2/8.3
  • CI matrices: run-tests.yml (8.5 prefer-stable + 8.2 prefer-lowest), phpstan.yml (8.2 + 8.5), .scrutinizer.yml (8.5)
  • PHPUnit --display-deprecations flag 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/languages response shape so array_unique receives a guaranteed array of strings
  • preg_replace() wrapper — return annotation aligned with native PHP behavior (keys are preserved on array input, so it's array<string> not list<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 major

Test plan

  • PHP_VERSION=8.5 make build && make tests → 94/94 tests pass on PHP 8.5.6 + Symfony 7.4.11, zero deprecations
  • PHP_VERSION=8.2 DEPS_STRATEGY=--prefer-lowest make tests → 94/94 tests pass on PHP 8.2.31
  • make phpstan on both 8.2 and 8.5 → 0 errors
  • make examples-test on 8.5 → all examples run cleanly
  • make phpcs → 0 fix needed

- 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.
@tigitz tigitz merged commit 14a629d into master May 17, 2026
10 checks passed
@tigitz tigitz deleted the feature/php-8.5-support branch May 17, 2026 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant