PHPackages                             ariddlestone/phpstan-cakephp2 - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. ariddlestone/phpstan-cakephp2

ActiveLibrary[Testing &amp; Quality](/categories/testing)

ariddlestone/phpstan-cakephp2
=============================

An extension to help test CakePHP 2 projects with PHPStan

v0.1.5(2y ago)253.0k—8.1%3[6 issues](https://github.com/ariddlestone/phpstan-cakephp2/issues)[2 PRs](https://github.com/ariddlestone/phpstan-cakephp2/pulls)MITPHPPHP ^7.4

Since Feb 20Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/ariddlestone/phpstan-cakephp2)[ Packagist](https://packagist.org/packages/ariddlestone/phpstan-cakephp2)[ RSS](/packages/ariddlestone-phpstan-cakephp2/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (6)Dependencies (5)Versions (10)Used By (0)

PHPStan-CakePHP2
================

[](#phpstan-cakephp2)

PHPStan extensions to help test CakePHP 2 projects with PHPStan

Requirements
------------

[](#requirements)

- PHP 7.4
- phpstan/phpstan 1.9+
- cakephp/cakephp 2.x

Installation
------------

[](#installation)

Installation is best done through composer:

```
composer require --dev ariddlestone/phpstan-cakephp2
```

You will need to make sure the extension is included in your phpstan config:

```
# phpstan.neon
includes:
  - vendor/ariddlestone/phpstan-cakephp2/extension.neon
```

If you have behavior classes in odd locations (perhaps in a vendor directory) you will need to add those locations to your configuration. For example:

```
# phpstan.neon
parameters:
  ModelBehaviorsExtension:
    behaviorPaths:
      - vendor/my-vendor/my-plugin/src/Model/Behavior/*.php
```

See `extension.neon` for the default list of behavior locations.

Features
--------

[](#features)

The following features are added to PHPStan:

- Treat behavior methods as extra methods on all models (`$model->behaviorMethod()`)
- Treat controller properties named after model classes as instances of those classes (`$controller->Model`)
- Treat controller properties named after component classes as instances of those classes (`$controller->Component`)
- Treat component properties names after component classes as instances of those classes (`$component->Component`)
- Treat `ClassRegistry::init($className)` as returning an instance of `$className` where possible

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity34

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 94.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~47 days

Recently: every ~58 days

Total

6

Last Release

995d ago

PHP version history (2 changes)v0.1.0PHP ^7.2|^8.0

v0.1.4PHP ^7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/f29c5f34a3e241347d2e70d10d3d15a076042227b72bd0bb45b664da38da4e80?d=identicon)[ariddlestone](/maintainers/ariddlestone)

---

Top Contributors

[![ariddlestone](https://avatars.githubusercontent.com/u/1448695?v=4)](https://github.com/ariddlestone "ariddlestone (33 commits)")[![sidz](https://avatars.githubusercontent.com/u/1302230?v=4)](https://github.com/sidz "sidz (2 commits)")

---

Tags

cakephp2phpphp7phpstan-extensionstatic-analysisstatic-code-analysis

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ariddlestone-phpstan-cakephp2/health.svg)

```
[![Health](https://phpackages.com/badges/ariddlestone-phpstan-cakephp2/health.svg)](https://phpackages.com/packages/ariddlestone-phpstan-cakephp2)
```

###  Alternatives

[larastan/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

6.5k55.4M8.4k](/packages/larastan-larastan)[phpstan/phpstan-symfony

Symfony Framework extensions and rules for PHPStan

79475.7M2.2k](/packages/phpstan-phpstan-symfony)[phpstan/phpstan-doctrine

Doctrine extensions for PHPStan

67272.8M1.4k](/packages/phpstan-phpstan-doctrine)[shipmonk/dead-code-detector

Dead code detector to find unused PHP code via PHPStan extension. Can automatically remove dead PHP code. Supports libraries like Symfony, Doctrine, PHPUnit etc. Detects dead cycles. Can detect dead code that is tested.

4853.5M91](/packages/shipmonk-dead-code-detector)[spaze/phpstan-disallowed-calls

PHPStan rules to detect disallowed method &amp; function calls, constant, namespace, attribute, property &amp; superglobal usages, with powerful rules to re-allow a call or a usage in places where it should be allowed.

33422.6M549](/packages/spaze-phpstan-disallowed-calls)[tomasvotruba/cognitive-complexity

PHPStan rules to measure cognitive complexity of your classes and methods

1635.6M289](/packages/tomasvotruba-cognitive-complexity)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
