Repository navigation
Move static analysis to the shared v1 workflow and update tooling - #40
Conversation
- static-analysis.yml now calls ray-di/.github static-analysis.yml@v1 with php_version 8.4 and has_crc_config. - Drop the unused operating-system matrix axis: the job always ran on ubuntu-latest (the Redis/Memcached services need Linux), so every Windows entry duplicated an Ubuntu run. - Bump actions/checkout to v5 and codecov/codecov-action to v5 (files input).
- psalm 5 -> 6, phpstan 1 -> 2, PHP_CodeSniffer 3 -> 4, doctrine/coding-standard 11 -> 14, phpmd 2 -> 3; drop the unused psalm/plugin-phpunit. - phpcs php_version follows the PHP 8.2 floor; src is reformatted by phpcbf (T|null, trailing commas, no behavior change). - Mark the extendable adapters, providers and exceptions @psalm-api instead of making them final, which would break extending them. - psalm: ensureOverrideAttribute off because #[Override] needs PHP 8.3; schema path points to vendor-bin. - composer: remove the setup script for the missing bin/setup.php; sa runs the vendor psalm and phpmd.
- @Depends doc-comments become #[Depends] (doc-comment metadata is removed in PHPUnit 12). - Serialization tests assert the class name in the payload instead of the always-true assertIsString. - Bind FakeFoo explicitly: Ray.Di deprecates just-in-time binding of unbound concrete classes. - Remove the empty <coverage> element.
- .gitattributes export-ignores the CI, test, tool and agent files (tests-pecl-ext, tests-php8, src-files, vendor-bin, .github, CLAUDE.md, psalm.xml, composer-require-checker.json) and drops entries for files that no longer exist. - Remove .scrutinizer.yml: Scrutinizer is not used (no badge, no workflow). - README: remove the PHP 7.4 doc-comment example; the package requires PHP 8.2 and attributes only.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 1.x #40 +/- ##
===========================================
Coverage 100.00% 100.00%
Complexity 38 38
===========================================
Files 24 24
Lines 90 90
===========================================
Hits 90 90 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@coderabbitai review |
Action performed
|
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Summary
ray-di/.githubstatic-analysis.yml@v2(a stale 2024 branch: PHP fixed at 8.3, nophp_versioninput). It now calls@v1withphp_version: 8.4andhas_crc_config: true(composer-require-checker.jsonis kept). Coding Standards was already on@v1(8.4); Continuous Integration is a local workflow because the tests need Redis and Memcached services.operating-systemmatrix axis. The job always ran onubuntu-latest, so the Windows entries were duplicate Ubuntu runs (20 jobs → 10). Matrix stays PHP 8.2–8.6 × lowest/highest.actions/checkoutandcodecov/codecov-actionmove to v5.psalm/plugin-phpunitis removed.php_versionnow matches the 8.2 floor (it said 7.3). phpcbf reformattedsrc(T|null, trailing commas); this does not change behavior.ClassMustBeFinalfor the adapters, providers and exceptions. Making them final would stop users from extending them, so they are marked@psalm-apiinstead (Doctrine CS forbids@api).ensureOverrideAttributeis off because#[Override]needs PHP 8.3.@dependsdoc-comments become#[Depends]. The always-trueassertIsStringchecks become class-name assertions.FakeFoois now bound explicitly, which clears Ray.Di's JIT-binding deprecation. The empty<coverage>element is removed. The suite runs with no deprecations..scrutinizer.yml(not used) and the deadsetupscript (bin/setup.phpdoes not exist). Thesascript now runs the vendor psalm and phpmd..gitattributeskeeps tests, CI, tool and agent files out of the dist archive. README drops the PHP 7.4 doc-comment example.Local checks (PHP 8.4)
phpunit (23 tests, Redis/Memcached running), phpcs, phpstan, psalm, phpmd and composer-require-checker 4.24 all pass. On PHP 8.2, phpunit passes with both lowest and highest dependencies.
Summary by CodeRabbit