ecphp/php-conventions
Predefined GrumPHP configuration for PHP projects at the European Commission. Adds quality checks via git hooks (or manual runs): license file, composer validation/normalization, linters (YAML/JSON/PHP), Twig CS, PHP-CS-Fixer, PHPCS, PHPStan, Psalm.
ECPHP-179, .gitattributes) are non-functional, confirming the package’s stagnation. No breaking changes or new features were introduced.__get, __set), or existing tooling (e.g., nunomaduro/collision) remain unresolved.$fillable, protected $guarded) to avoid false positives.php-cs-fixer:^3.0, phpunit/phpunit), increasing CI/CD pipeline failures.Strategic Justification:
Alignment with Team Standards:
phpcs.xml.dist/phpstan.neon configurations?protected $guarded) requiring manual overrides?Maintenance Commitment:
php-cs-fixer:^3.0) become incompatible with newer PHP/Laravel versions?Integration Validation:
Performance Impact:
PHPCS/PHPStan Integration:
<!-- phpcs.xml.dist -->
<config defaultStandard="PSR12">
<ruleSetPath>vendor/ecphp/php-conventions/ruleset.xml</ruleSetPath>
</config>
<!-- phpstan.neon -->
includes:
- vendor/ecphp/php-conventions/extension.neon
CI/CD Pipeline:
- name: Run PHP Conventions
run: vendor/bin/phpcs --standard=vendor/ecphp/php-conventions
IDE Integration:
Audit Existing Codebase:
__get() in controllers).--ignore flags to exclude problematic files initially.Incremental Adoption:
Toolchain Alignment:
phpcs.xml.dist:
<rule ref="PSR12">
<exclude name="Classes.PropertyDeclaration.Underscore"/>
</rule>
Custom Rule Overrides:
protected $fillable).company/php-conventions-laravel).PHP/Laravel Version Support:
php-cs-fixer:^3.0 → ^4.0) if incompatibilities arise.Toolchain Conflicts:
phpstan.neon, exclude conflicting rules:
excludes:
- app/Models/*.php
Laravel-Specific Edge Cases:
$model->relation).__call, __set).Proof of Concept (PoC):
Configuration Hardening:
phpcs.xml.dist:
<file>app/Models/*.php</file>
<exclude name="Classes.PropertyDeclaration.Underscore"/>
CI/CD Rollout:
Documentation:
Dependency Updates:
php-cs-fixer, phpunit/phpunit).Rule Maintenance:
#[Spatial] attributes).Toolchain Drift:
Debugging Complexity:
__get() method failing?").README snippet for the team.Onboarding:
Community Support:
phpcs --cache).How can I help you explore Laravel packages today?