Repository navigation
Releases: svnjn/php-standards
Releases · svnjn/php-standards
Release list
v1.1.0
Added
svnjn.unusedParameter: every method and function parameter must be used, unless a parent class or interface sets the signature. Closures and magic methods are exempt.config/phpstan-laravel.neonskipssrc/Laravel,src/Filament,src/Dashboardandworkbench/, where Laravel calls methods by name.
Fixed
- Rector no longer makes methods private. Frameworks call some methods by name from their base class, like Livewire's
rules(), and a private one failed at runtime. - The docs checker only ever writes to and empties its own work directory (
build/docs-check), andsvnjn-linkonly its.svnjnfolder. Mutation testing runs altered code for real, and an altered path could delete the project or overwrite itsphpstan.neon.
v1.0.0
Added
- Base PHPStan config: max level, bleeding edge, extra strict options, PHP 8.3–8.5.
- Custom PHPStan rules: no key-value arrays or
mixedfrom public methods and properties, no error suppression, noglobalor$GLOBALS, no magic accessors,JSON_THROW_ON_ERRORrequired. - Shared Pint config and Rector set.
svnjnPest arch preset.svnjn-docs-check,svnjn-linkandsvnjn-unlinkcommands.- Guidelines in
docs/guidelines. - Reusable
package-ci.ymlandpackage-release.ymlworkflows. config/phpstan-laravel.neon: Larastan's strict checks,env()allowed in the package'sconfig/, schema from package, workbench and Testbench migrations.SvnjnRectorrewrites syntax newer than the package's lowest PHP version (Rector's downgrade sets), socomposer lintcatches it.