Merged
Conversation
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.
51ada9b to
173fc0a
Compare
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.
This commit adds comprehensive backend linting to the CircleCI workflow:
The lint job includes: