ci: migrate checks to use setup-php and setup-node#11551
Conversation
Replace docker-based composer/node invocations in the format and analyze jobs with shivammathur/setup-php@v2 and actions/setup-node@v4. Split locale check and composer validate/audit into dedicated jobs for clarity. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughReworks CI: adds a new Composer job for PHP 8.3 + Composer v2 (validate, install, audit) and replaces Docker-based Composer checks in Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Security Scan Results for PRDocker Image Scan Results
Source Code Scan Results🎉 No vulnerabilities found! |
Use composer analyze (renamed from composer check in 1.8.x). Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Greptile SummaryThis PR removes Docker-based Key observations:
Confidence Score: 4/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
PR[Pull Request / workflow_dispatch] --> DEP[Checks / Dependencies\npull_request only]
PR --> SEC[Checks / Image\npull_request only]
PR --> COMP[Checks / Composer\ncomposer validate + audit]
PR --> FMT[Checks / Format\ncomposer lint on HEAD^2]
PR --> ANA[Checks / Analyze\nPHPStan via composer check]
PR --> LOC[Checks / Locale\nnode locale/index.js]
PR --> MATRIX[Tests / Matrix\ngenerate DB × mode matrix]
PR --> BUILD[Build\nDocker image]
BUILD --> UNIT[Tests / Unit]
BUILD --> E2E_GEN[Tests / E2E / General]
BUILD --> E2E_SVC[Tests / E2E / Service matrix]
BUILD --> E2E_ABUSE[Tests / E2E / Abuse]
BUILD --> E2E_SS[Tests / E2E / Screenshots]
BUILD --> BENCH[Benchmark]
MATRIX --> E2E_SVC
MATRIX --> E2E_ABUSE
MATRIX --> E2E_SS
COMP:::new
LOC:::new
classDef new fill:#d4edda,stroke:#28a745
Last reviewed commit: bc2a0d5 |
setup-php sets COMPOSER_NO_AUDIT=1 by default, which causes composer audit to skip. Override it to 0 for the audit step. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
composer audit requires packages to be installed to check them. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.github/workflows/ci.yml (1)
124-132: Reduce duplicated PHP setup/install steps across jobs.
formatandanalyzenow share the same PHP/composer bootstrap. Consider extracting this into a reusable workflow or composite action to reduce drift in future CI edits.Also applies to: 144-152
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/ci.yml around lines 124 - 132, The repeated "Setup PHP" (shivammathur/setup-php@v2) and "Install dependencies" (composer install ...) steps used in the format and analyze jobs should be extracted into a single reusable unit (either a reusable workflow or a composite action named e.g. php-setup/php-bootstrap) and invoked from both jobs; create the composite/reusable that runs the php-version/tools/coverage settings and composer install, then replace the inline steps in the jobs that contain the "Setup PHP" and "Install dependencies" steps (also the duplicate block at lines referenced in the review) with a single uses: call to that new action/workflow so both format and analyze call the same shared bootstrap.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In @.github/workflows/ci.yml:
- Around line 124-132: The repeated "Setup PHP" (shivammathur/setup-php@v2) and
"Install dependencies" (composer install ...) steps used in the format and
analyze jobs should be extracted into a single reusable unit (either a reusable
workflow or a composite action named e.g. php-setup/php-bootstrap) and invoked
from both jobs; create the composite/reusable that runs the
php-version/tools/coverage settings and composer install, then replace the
inline steps in the jobs that contain the "Setup PHP" and "Install dependencies"
steps (also the duplicate block at lines referenced in the review) with a single
uses: call to that new action/workflow so both format and analyze call the same
shared bootstrap.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 0cb991f0-f6ea-4827-8aaa-aa6c453352e5
📒 Files selected for processing (1)
.github/workflows/ci.yml
phpbench pulled in doctrine/annotations which has a security advisory. The bench script and its only benchmark file are unused in CI. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
🔄 PHP-Retry SummaryFlaky tests detected across commits: |
✨ Benchmark results
⚡ Benchmark Comparison
|
Summary
composer:2.8invocations informatandanalyzejobs withshivammathur/setup-php@v2node:24-alpineinvocation withactions/setup-node@v4Checks / Localejobcomposer validate+composer auditinto its ownChecks / ComposerjobTest plan
Checks / Composerjob runscomposer validateandcomposer auditsuccessfullyChecks / Formatjob installs dependencies and runs linter successfullyChecks / Analyzejob runs PHPStan successfullyChecks / Localejob runs locale key check successfully🤖 Generated with Claude Code