Skip to content

Conversation

@konradmichalik
Copy link
Contributor

@konradmichalik konradmichalik commented Nov 11, 2025

ddev composer fix # php cs fixer & co
ddev composer sca # phpstan
ddev composer migration # rector

Summary by CodeRabbit

  • Documentation

    • Updated development instructions with new command syntax for linting and static analysis.
  • New Features

    • Added static code analysis capabilities as composer scripts.
    • Introduced code migration functionality via new composer scripts.
  • Chores

    • Restructured CI workflows and lint/fix command configurations.
    • Added new GitHub Actions workflow for code quality checks.

@coderabbitai
Copy link

coderabbitai bot commented Nov 11, 2025

Walkthrough

Documentation and Composer scripts were updated to use ddev-prefixed commands, reorganize fix/lint scripts, add migration and static analysis script groups, add a new CGL GitHub Actions workflow, and remove the previous SCA workflow file.

Changes

Cohort / File(s) Summary
Documentation
CONTRIBUTING.md
Replaced standalone composer lint and related commands with ddev composer variants and added a "Run static code analysis" section documenting ddev composer sca and ddev composer sca:php.
Composer scripts
composer.json
Reworked scripts: consolidated scripts.fix to @fix:php, @fix:typoscript, @fix:yaml; changed fix:php to use php vendor/bin/php-cs-fixer --config=.php-cs-fixer.php fix; removed --no-check-lock from fix:composer; changed fix:editorconfig to @lint:editorconfig --fix; added migration/migration:rector and sca/sca:php script groups. Lint scripts now delegate to fix variants with --dry-run and simplified lint steps (retain YAML and Typoscript).
Workflows added
.github/workflows/cgl.yml
Added new "CGL" GitHub Actions workflow that reuses a remote workflow and sets php-version: '8.4', triggered on push.
Workflows removed
.github/workflows/sca.yml
Removed the previous Static Code Analysis workflow that performed ddev setup, dependency installs, composer audit, static analysis (ddev composer lint and ddev npm run lint), and annotation steps for php-cs-fixer and phpstan.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant Dev as Developer
  participant DDEV as ddev
  participant Composer as composer.json scripts
  participant PHPStan as phpstan
  participant Rector as rector
  participant CI as GitHub Actions

  Dev->>DDEV: run ddev composer sca
  DDEV->>Composer: execute `@sca`:php
  Composer->>PHPStan: phpstan analyse --memory-limit=2G
  PHPStan-->>Composer: analysis results
  Composer-->>DDEV: return status
  note right of CI `#DDEEFF`: CI can trigger similar via\n.github/workflows/cgl.yml
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Verify equivalence of refactored fix/lint commands to prior behavior (especially fix:php and fix:composer).
  • Confirm new migration and sca script groups work locally and in CI.
  • Validate CONTRIBUTING.md ddev instructions match project ddev configuration and developers' expectations.
  • Review removal of .github/workflows/sca.yml to ensure no CI functionality is lost or duplicated.

Poem

🐇 In burrows bright I tap and cheer,

Scripts now tidy, linters near,
Rector hops, and PHPStan sings,
ddev drums with clever wings,
A carrot cake of cleaner things.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately reflects the main change: refactoring and updating composer scripts for improved linting and fixing commands, which aligns with the substantial modifications to composer.json and CONTRIBUTING.md.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch composer-scripts

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b102e4e and 49c1a0c.

📒 Files selected for processing (2)
  • .github/workflows/cgl.yml (1 hunks)
  • .github/workflows/sca.yml (0 hunks)
💤 Files with no reviewable changes (1)
  • .github/workflows/sca.yml
✅ Files skipped from review due to trivial changes (1)
  • .github/workflows/cgl.yml

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants