PHP MIT

cakephp-ide-helper

IDE Helper plugin for CakePHP

D

dereuromark

Dernière activité 25 sept. 2026
dereuromark/cakephp-ide-helper

189

étoiles

42

forks

4

issues ouvertes

annotationsautocompletioncakephpcakephp-pluginide-helperphpsupport-annotationstypehinting

Ce README est souvent en anglais.

CakePHP IdeHelper Plugin

CI Coverage Status PHPStan Latest Stable Version Minimum PHP Version License Total Downloads

IdeHelper plugin for CakePHP applications.

Start with Installation, then follow Getting started. Composer defines the supported dependencies. For older CakePHP versions see the version map.

Features

The main idea is to improve IDE compatibility and use annotations to make the IDE understand the "magic" of CakePHP, so you can click through the class methods and object chains as well as spot obvious issues and mistakes easier. The IDE will usually mark problematic code yellow (missing, wrong method etc).

This also improves compatibility with tools like PHPStan. Those can then follow the code easier and provide more valuable help.

  • Add annotations to existing code (e.g. when upgrading an application) just like baking would to new code.
  • Can run multiple times without adding the annotations again.
  • It can also replace or remove outdated annotations.
  • Works with your application as well as any loaded plugin.
  • CI check support, hook it up just like the coding standards check.
  • Set up as watcher and have live in-real-time annotations added/updated.

Supports annotations for:

  • Models (Tables and Entities)
  • Controllers (including prefixes like Admin) and Components
  • View (AppView) and Helpers
  • Templates (.php PHP template files including elements)
  • Commands and Tasks
  • ... and more

Screenshot

Supports code completion help for:

  • Behaviors (property access on the BehaviorRegistry)

Supports IDE autocomplete/typehinting of (magic)strings as well as return types/values for:

  • Plugins, Components, Behaviors, Helpers, Mailers
  • Associations, Validation
  • I18n Translation, Cache
  • Elements and layouts
  • Tables and their fields
  • Route paths, Request/ENV, Connection
  • ... and more (using PhpStorm meta file)

Supports better IDE usage with Illuminator tasks to enhance existing code:

  • EntityFieldTask adds all entity fields as class constants for easier usage in IDEs

IDE support

Annotations work in editors and static analyzers that understand PHPDoc. PhpStorm and VS Code with Intelephense can also use the generated metadata. See IDE support for setup links and indexing advice.

Plugin with Annotator tasks

Plugins with meta file generator tasks

The following plugins use this plugin to improve IDE compatibility around factory and magic string usage:

Plugins with Illuminator tasks

  • StateMachine for syncing states from XML into PHP.
  • ... (add yours here)

More

More collections of useful tasks can be found in the IdeHelperExtra plugin.

Install, Setup, Usage

See the Documentation for details.

Powered by

PhpStorm logo.

They are sponsoring my IDE for my FOSS work on this repository and beyond.

Projets similaires

IDE Helper for Laravel

PHPautocompletionhacktoberfestlaravel
Bbarryvdh
15 k étoiles1,2 k

📘 Swoole IDE Helper

PHPautocompletionide-helpersphp
Sswoole
518 étoiles69

Add PHP annotation support for PhpStorm and IntelliJ

Kotlinannotationdoctrineintellij
HHaehnchen
257 étoiles43