ci: add PHPStan L9 + PHPCS PSR12 + coverage (S1/S2)#5
Merged
Conversation
S1 (CI gap — no static analysis), S2 (coverage gap) - Add phpstan/phpstan and squizlabs/php_codesniffer as dev dependencies - Create phpstan.neon at root — level 9, include src/ - Create phpcs.xml at root — PSR12 standard, include src/, exclude vendor/ - Update .github/workflows/test.yml to run PHPStan + PHPCS after PHPUnit - Update phpunit.xml to enable coverage output to coverage.xml - Update composer.json with scripts for phpstan and phpcs - Fix PHPStan error: remove unused $container property (property.onlyWritten) Gate: vendor/bin/phpunit green + vendor/bin/phpstan analyse src --level=9 clean + vendor/bin/phpcs src --standard=PSR12 clean
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
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.
Summary
Implements S1 (CI gap — no static analysis) and S2 (coverage gap) for
phlix-plugin-example.Changes
phpstan/phpstandev dependency +phpstan.neon(level 9, include src/)squizlabs/php_codesnifferdev dependency +phpcs.xml(PSR12, include src/, exclude vendor/)phpunit.xmlupdated with Cobertura XML output tocoverage.xml.github/workflows/test.yml— PHP 8.3 + 8.4 matrix, pcov coverage driver, PHPStan + PHPCS steps after PHPUnit"phpstan": "vendor/bin/phpstan analyse src --level=9"and"phpcs": "vendor/bin/phpcs src --standard=PSR12"$containerproperty that PHPStan L9 flagged (property.onlyWritten)Gate Output
Success Conditions
vendor/bin/phpstan analyse src --level=9cleanvendor/bin/phpcs src --standard=PSR12cleanvendor/bin/phpunitgreenFinding(s): S1 (CI gap — no static analysis), S2 (coverage gap)
Dependencies: B3 done separately in phlix-server
Consumer impact: None — devinfra only