fix: PHP 8.4 nullable deprecations + modernise CI matrix - #9
Merged
Conversation
PHP 8.4 deprecates implicitly nullable parameters (a typed param with a null default). Make the nullability explicit with ?type in the serializer normalizers and Connection, removing the deprecation warnings: Implicitly marking parameter $x as nullable is deprecated, the explicit nullable type must be used instead - TimeWindowNormalizer, LocationNormalizer, ArrivalNormalizer: $format - Connection: $uri No behavioural change; tests, PHPStan and PHP-CS-Fixer stay green.
The matrix tested PHP 7.4-8.1 against Symfony 5.4/6.0, all of which the package no longer supports (composer.json already requires PHP ^8.2 and Symfony ^6.4|^7.0). Replace it with the currently supported range: - Symfony 7.4: PHP 8.2, 8.3, 8.4, 8.5 - Symfony 8.0/8.1: PHP 8.4, 8.5 (Symfony 8.x requires PHP >= 8.4) Also: - Allow Symfony 8 in composer.json (additive |^8.0, no BC break) - Bump php-cs-fixer job to PHP 8.2 (the supported floor) - actions/checkout@v2 -> v4, actions/cache@v4 - Replace removed ::set-output with $GITHUB_OUTPUT - Activate the symfony/flex plugin and use 'composer update' (no lock is committed) Verified locally: Symfony 7.4.10 and 8.1.0 both green (phpunit 3/3).
rvmourik
approved these changes
Jun 16, 2026
Symfony 7.0-7.3 are out of maintenance; 7.4 is the LTS on the 7.x line. Narrow the constraint from ^7.0 to ^7.4 (6.4 LTS and 8.x kept). Constraints are now: ^6.4 (LTS) | ^7.4 (LTS) | ^8.0 (current). This matches the CI matrix, which already targets 7.4/8.0/8.1.
composer.json supports ^6.4 but CI did not exercise it. Add Symfony 6.4 across PHP 8.2-8.5 (6.4 supports PHP 8.1+; package floor is 8.2), closing the gap between the declared and tested support range. Verified locally: Symfony 6.4.37 green (phpunit 3/3).
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.
Targets the
v3.0branch.1. Explicit nullable types (PHP 8.4 deprecations)
PHP 8.4 deprecates implicitly nullable parameters (a typed parameter whose default is
null). Made explicit with?type:src/Serializer/Normalizer/TimeWindowNormalizer.php$format×2src/Serializer/Normalizer/LocationNormalizer.php$format×4src/Serializer/Normalizer/ArrivalNormalizer.php$format×2src/Connection.php$uri(constructor)The 8 normalizer locations are the ones surfaced in MKO-1330;
Connection::__constructhad the same pattern and is fixed too. No behavioural change.2. Supported-version policy + CI matrix
Supported Symfony lines are now LTS + current only:
|^8.0)^7.0→^7.4)CI matrix replaced (was PHP 7.4–8.1 × Symfony 5.4/6.0, none supported) and now exercises the full declared range:
(Symfony 8.x requires PHP ≥ 8.4.)
Supporting CI changes: php-cs-fixer job 8.1 → 8.2;
actions/checkout@v2→@v4,actions/cache@v2→@v4; removed::set-output→$GITHUB_OUTPUT; activatesymfony/flexand usecomposer update(no lock committed).Semver note
Narrowing
^7.0→^7.4drops (EOL) 7.1–7.3, so this is not purely additive — suggest releasing as a minor (3.1.0) rather than a 3.0.1 patch.Verification (local, PHP 8.5)
--dry-run: 0 files ·php -l: clean ·composer validate: validRef: MKO-1330