Repository navigation
chore: require all directly used packages - #73
Merged
Merged
Conversation
Add pb30/phpstan-composer-analysis to report packages used directly but only installed transitively, and add the 10 missing requirements at their installed versions. composer.lock adds only the analysis packages.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #73 +/- ##
==========================================
Coverage 74.39% 74.39%
Complexity 264 264
==========================================
Files 30 30
Lines 738 738
==========================================
Hits 549 549
Misses 189 189
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Open
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.
Require all packages that the code uses directly, and let PHPStan check this. This is step 3 of the quarterly update.
Changes
pb30/phpstan-composer-analysis(^1.1) torequire-dev. Configure it inphpstan.dist.neonwith the same settings asevent-database-imports(chore: require all directly used packages event-database-imports#117), withoutadditionalDevPaths.psr/container^2.0symfony/dependency-injection,symfony/http-foundation,symfony/http-kernel,symfony/routing,symfony/security-core,symfony/security-http,symfony/string,symfony/type-info~7.4.0symfony/http-client-contracts^3.7composer.lockadds onlypb30/phpstan-composer-analysisandshipmonk/composer-dependency-analyser. No installed version changes.Why
The quarterly update runs
composer update --with-all-dependencies. A package that is only a transitive dependency can then get a new major version that nobody chose. With the packages incomposer.json, Composer keeps them in the given versions.The PHPStan check fails in CI if new code uses a package that is not in
composer.json.Checks
composer validate --strictandcomposer normalize --dry-run: no problems.