Search by

pieceofcake2 / phpstan-cakephp2

ttsuru

PHPStan extension for CakePHP 2: models, components, tasks, behavior methods and ClassRegistry::init()

Package info

github.com/pieceofcake2/phpstan-cakephp2

pkg:composer/pieceofcake2/phpstan-cakephp2

Statistics

Installs: 30 367

Dependents: 34

Suggesters: 0

Stars: 0

v1.1.0 2026-10-19 10:19 UTC

This package is auto-updated.

Last update: 2026-10-22 07:14:45 UTC


README

GitHub License Packagist Version PHP PHPStan CI Codecov

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

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.