Repository navigation
Declare the dependencies the main code really uses - #72
Merged
tattali merged 2 commits intoOct 18, 2026
Merged
Conversation
The tests passing says nothing about whether they would notice a wrong change in the code. Infection mutates src and fails the run when the tests catch fewer mutants than today. infection.json5 sets minMsi and minCoveredMsi to 87, the score measured on PHP 8.4 with Symfony 8.1 (313 of 358 mutants killed, 87.43%), rounded down. The current CI job runs it after PHPUnit; ci.yml is regenerated with the CI generator.
Nothing checked that composer.json lists what the code uses, so a package installed only through another one could disappear in a dependency update. shipmonk/composer-dependency-analyser now runs in the current CI job and reports no issue. Before this change it found 2 shadow and 2 unused dependencies: - ext-filter is now required (FILTER_VALIDATE_URL). - symfony/event-dispatcher leaves require: no class of it is used, the listener is registered with kernel.event_listener tags, and symfony/http-kernel requires it anyway. - symfony/dotenv leaves require-dev: nothing uses it. - symfony/yaml stays: the extension loads services.yaml with it at runtime, so its "unused" report is ignored with that reason. - symfony/var-dumper is not added: its Data class is only named in the return type copied from DataCollector, so its "shadow" report is ignored with that reason. ci.yml is regenerated with the CI generator.
|
tattali
changed the base branch from
mutation-tests-with-infection-main
to
main
October 18, 2026 22:18
tattali
deleted the
check-dependencies-with-composer-dependency-analyser-main
branch
October 18, 2026 22:19
This branch was successfully deployed
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.



Stacked on #71.
Nothing checked that composer.json lists what the code uses, so a package installed only through another one could disappear in a dependency update.
shipmonk/composer-dependency-analyser(^1.8, require-dev) now runs in the CI job that lints (PHP 8.4, Symfony 8.1) and reports 0 issues. Before this change it found 2 shadow dependencies and 2 unused dependencies.ext-filter(FILTER_VALIDATE_URLin the extension and the listener).symfony/event-dispatcher. No class of the package is used (the listener is registered withkernel.event_listenertags), andsymfony/http-kernelrequires it anyway (^7.4|^8.0), so applications keep it.symfony/dotenv, not used anywhere.composer-dependency-analyser.php:symfony/yaml(reported unused): no class of it is referenced in PHP code, but the extension loadsResources/config/services.yamlwith it at runtime.symfony/var-dumper(reported shadow):DeviceDataCollector::getData()only names itsDataclass in thearray|Datareturn type copied fromDataCollector::$dataof symfony/http-kernel, and PHP does not load a class named only in a return type..github/workflows/ci.ymlis regenerated with the CI generator; it now has the full set of current-job checks (php-cs-fixer, PHPStan, dependencies, PHPUnit with coverage, Infection, SonarCloud).Local checks (local PHPs are 8.3, 8.4 and 8.5; the 8.6 nightly is covered by CI only): PHPUnit passes (120 tests) on PHP 8.4 and 8.5 with Symfony 8.0 (v8.0.15) and 8.1 (v8.1.9) and with lowest dependencies (Symfony 8.0.0) on PHP 8.4; on PHP 8.4 with Symfony 8.1, PHPStan (0 errors), php-cs-fixer, Infection (MSI 87.43%, thresholds 87 of #71) and the dependency analyser (0 issues) pass.