pieceofcake2 / phpstan-cakephp2
PHPStan extension for CakePHP 2: models, components, tasks, behavior methods and ClassRegistry::init()
Requires
- php: >=8.0
- phpstan/phpstan: ^2.0
Requires (Dev)
- cakephp/cakephp-codesniffer: ^5.0
- phpstan/phpstan-phpunit: ^2.0
- phpunit/phpunit: ^9.6
- pieceofcake2/cakephp: ^2.12
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
A PHPStan extension for CakePHP 2 applications and plugins running on
pieceofcake2/cakephp. It teaches PHPStan the magic
of CakePHP 2: models, components and tasks loaded as properties, behavior methods called on
models, and ClassRegistry::init(). This is a fork of
sidz/phpstan-cakephp2.
Documentation
- Website: https://pieceofcake2.github.io/phpstan-cakephp2/ (日本語: https://pieceofcake2.github.io/phpstan-cakephp2/ja/)
- Markdown: docs/README.md (日本語: docs/ja/README.md) (for AI tools and offline reading)
The Markdown documentation is also included in the Composer package, at vendor/pieceofcake2/phpstan-cakephp2/docs/README.md. Install the package with --dev if you only need it for development.
Requirements
- PHP 8.0+
- phpstan/phpstan 2.x
- pieceofcake2/cakephp 2.x
Installation
composer require --dev pieceofcake2/phpstan-cakephp2
Then include the extension in your PHPStan configuration:
# phpstan.neon includes: - vendor/pieceofcake2/phpstan-cakephp2/extension.neon
Contributing
See the contribution guidelines.
Origin
This package is a maintained fork of
sidz/phpstan-cakephp2 (sidz/phpstan-cakephp2 on
Packagist, last upstream version 0.2.0), originally by Oleg Zhulnev. It is maintained for CakePHP 2
on modern PHP by pieceofcake2. Changes from the original are
listed in the
commit history since the fork.
License
Licensed under the MIT License. See LICENSE.