Skip to content

ci: Modify PHP version matrix in CI workflow - #401

Open
Chris53897 wants to merge 4 commits into
geocoder-php:masterfrom
Chris53897:patch-1
Open

Chris53897 wants to merge 4 commits into
geocoder-php:masterfrom
Chris53897:patch-1

Conversation

@Chris53897

Copy link
Copy Markdown
Contributor

Updated PHP versions in CI configuration to include PHP 8.6 and removed Symfony 7.3 support.

Please adjust to your needs.

Updated PHP versions in CI configuration to include PHP 8.6 and removed Symfony 7.3 support.
Updated Symfony version in CI matrix to include 8.1.* and exclude 8.0.*.
@norkunas

Copy link
Copy Markdown
Member

new deprecations as always :D

@Chris53897

Copy link
Copy Markdown
Contributor Author

I will try to fix them, as soon as i have some spare time

@Chris53897

Copy link
Copy Markdown
Contributor Author

With the help of claude.

Context:
PHPStan now reports No errors on PHP 8.4, the version your CI job uses. I also checked it on PHP 8.5, and the tests still pass (58 tests, 201 assertions) with no deprecation notices.
What was wrong: In src/DependencyInjection/BazingaGeocoderExtension.php, the processed bundle config had no type, so PHPStan treated every value as "could be anything". Before, each of those complaints was silenced with its own line in phpstan-baseline.php. Changes in the newer Symfony versions shifted how often some of them occur, so those lines no longer matched and PHPStan failed. The baseline line for src/Mapping/Driver/AttributeDriver.php was failing for a similar reason: that error no longer occurs at all.
The fix: I described the config's structure for PHPStan instead of silencing more errors. These are comments only; no runtime code changed.
Added three shared type descriptions to the class: PluginConfig, ProviderConfig and BundleConfig. They match the tree defined in src/DependencyInjection/Configuration.php.
load() marks the result of processConfiguration() as BundleConfig, because Symfony only says it returns a plain array.
loadProviders() now expects a BundleConfig and configureProviderPlugins() a ProviderConfig.
Baseline: I regenerated phpstan-baseline.php on PHP 8.4. It went from 38 entries to 16. I compared the old and new files and nothing new was added; only entries that no longer occur were removed. I also kept the file in the project's existing code style.
configureProviderPlugins() is public, and its declared parameter type is now stricter. This doesn't change how the code runs, but anyone who calls it from their own code and runs PHPStan on it may see new PHPStan errors.

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.

3 participants