Skip to content

Add lints to CI pipeline#79

Merged
guillaume-sainthillier merged 9 commits intomainfrom
claude/add-lints-ci-lamanias-011CUpNRbDnSS8VpXvek5ii4
Nov 5, 2025
Merged

Add lints to CI pipeline#79
guillaume-sainthillier merged 9 commits intomainfrom
claude/add-lints-ci-lamanias-011CUpNRbDnSS8VpXvek5ii4

Conversation

@guillaume-sainthillier
Copy link
Member

This commit adds comprehensive backend linting to the CircleCI workflow:

  • Added lint scripts to composer.json for PHP-CS-Fixer, PHPStan, Twig-CS-Fixer, and Rector
  • Created a new 'lint' job in CircleCI that runs all linting tools
  • Updated workflow to run linting before building
  • Added fix scripts for automatic code fixes

The lint job includes:

  • PHP CS Fixer (code style validation)
  • PHPStan (static analysis at level 9)
  • Twig CS Fixer (template linting)
  • Rector (code quality checks)

claude and others added 8 commits November 5, 2025 14:19
This commit adds comprehensive backend linting to the CircleCI workflow:

- Added lint scripts to composer.json for PHP-CS-Fixer, PHPStan, Twig-CS-Fixer, and Rector
- Created a new 'lint' job in CircleCI that runs all linting tools
- Updated workflow to run linting before building
- Added fix scripts for automatic code fixes

The lint job includes:
- PHP CS Fixer (code style validation)
- PHPStan (static analysis at level 9)
- Twig CS Fixer (template linting)
- Rector (code quality checks)
This commit adds a comprehensive GitHub Actions CI workflow following the Laminas CI pattern:

- Created .github/workflows/continuous-integration.yml with Laminas CI matrix
- Added .laminas-ci.json configuration for custom linting checks
- Configured matrix generation using laminas/laminas-ci-matrix-action
- Integrated laminas/laminas-continuous-integration-action for QA checks

The workflow includes:
- Automatic job matrix generation based on project configuration
- PHP CS Fixer validation
- PHPStan static analysis (level 9)
- Twig CS Fixer for template linting
- Rector code quality checks

Triggers on:
- Pull requests
- Push to main/develop branches
- Tag creation

This provides a modern, scalable CI solution that complements the existing CircleCI workflow.
Fixed the GitHub Actions workflow to match the correct Laminas CI pattern:

- Removed checkout step from matrix job (laminas-ci-matrix-action handles it)
- Changed job parameter from toJSON(matrix.job) to matrix.job
- Simplified branch triggers to only main branch
- Fixed .laminas-ci.json structure with proper job nesting
- Each check now has 'name' and 'job' at the same level

This follows the working pattern from the by-night.fr reference implementation.
Removed unsupported properties from job objects in additional_checks:
- Removed 'extensions' array (not allowed in additional_checks job schema)
- Removed 'ini' array (not allowed in additional_checks job schema)

The simplified configuration now only includes:
- php: version
- dependencies: locked
- command: the lint command to run

The Laminas CI container includes standard PHP extensions by default.
Consolidated all linting checks into a single job following the by-night.fr pattern:
- Combined PHP CS Fixer, PHPStan, Twig CS Fixer, and Rector into one "Backend Linting" job
- All commands run sequentially using && to ensure each must pass
- Simplified from 4 separate jobs to 1 combined job
- Removed unnecessary "dependencies" property

This matches the recommended Laminas CI pattern of combining related checks.
Changes made:
- Reverted CircleCI config to original state (removed lint job and workflow dependency)
- Emptied additional_checks in .laminas-ci.json
- Added friendsofphp/php-cs-fixer ^3.64 to composer.json dev dependencies

The linting scripts remain available in composer.json for local use.
Note: twig-cs-fixer (vincentlanglet/twig-cs-fixer) was already present.
@guillaume-sainthillier guillaume-sainthillier force-pushed the claude/add-lints-ci-lamanias-011CUpNRbDnSS8VpXvek5ii4 branch from 51ada9b to 173fc0a Compare November 5, 2025 13:20
@guillaume-sainthillier guillaume-sainthillier merged commit 1d8cb50 into main Nov 5, 2025
5 of 6 checks passed
@guillaume-sainthillier guillaume-sainthillier deleted the claude/add-lints-ci-lamanias-011CUpNRbDnSS8VpXvek5ii4 branch November 5, 2025 13:25
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