bellangelo / phpstan-migration-rules
PHPStan rules for database migration tools (Phinx, Symfony, Laravel)
Installs: 5
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:phpstan-extension
pkg:composer/bellangelo/phpstan-migration-rules
Requires
- php: ^7.4 || ^8.0
Requires (Dev)
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^9.5|^10.0
- rector/rector: ^2.3
- robmorgan/phinx: ^0.13
- squizlabs/php_codesniffer: ^4.0
- staabm/annotate-pull-request-from-checkstyle: ^1.8
README
A collection of PHPStan rules to enforce best practices and standards in database migration files for various frameworks and tools.
Installation
composer require --dev bellangelo/phpstan-migration-rules
The extension will be automatically registered if you have phpstan/extension-installer installed. Otherwise, add it manually to your phpstan.neon:
includes: - vendor/bellangelo/phpstan-migration-rules/extension.neon
Rules
Phinx
-
EnforceCollationRule - Enforces that all Phinx
table()method calls specify a collation (default:utf8)Configuration example:
parameters: phpstanMigrationRules: phinx: requiredCollation: utf8mb4
Laravel
Rules for Laravel Migrations are coming soon.