nazonohito51/cakephp2-ide-helper

Improve auto-completion for cakephp2

0.2.5 2021-06-22 01:13 UTC

This package is auto-updated.

Last update: 2024-11-22 08:37:14 UTC


README

Installation

composer global require "nazonohito51/cakephp2-ide-helper"

Recommend adding .gitignore_global or .gitignore.

.phpstorm.meta.php
_ide_helper.php

Basic Usage

generate:meta

path/to/your/vendor/bin/cakephp2-ide-helper generate:meta --app-dir=./app

Generate .phpstorm.meta.php. see sample.

generate:helper

path/to/your/vendor/bin/cakephp2-ide-helper generate:helper --app-dir=./app

Generate _ide_helper.php. see sample.

generate:model

path/to/your/vendor/bin/cakephp2-ide-helper generate:controller --app-dir=./app --git-root=./

Update phpdoc of models, for code complement of behavior methods. If there is duplicate models, this command will be failed. When this case, you need --ignore options.

generate:controller

path/to/your/vendor/bin/cakephp2-ide-helper generate:controller --app-dir=./app --git-root=./

Update phpdoc of controller.

generate:shell

path/to/your/vendor/bin/cakephp2-ide-helper generate:shell --app-dir=./app --git-root=./

Update phpdoc of shell.

path/to/your/vendor/bin/cakephp2-ide-helper generate:model --app-dir=./app --git-root=./ --ignore=Model/SomeDuplicateClass.php

TODO

  • read actsAs from Model
  • read public methods from Behavior
  • update phpdoc on Model with diff(use str_replace)
  • analyze return type of Behavior
  • deprecate Behavior method by model extends graph
  • consider git manage files
  • skip update model when phpdoc is empty
  • ClassRegistry argument helper
  • Fabricate argument helper
  • fixtures argument helper(phpstorm meta)
  • model property in controller
  • getDataSource
  • Model::find('first', 'count' ...)
  • Model::find('', ['condition'...])
  • withRead argument
  • ignore unload behavior
  • disable behavior extend
  • Controller/Shell uses property
  • Consider Behavior extends
  • ignore abstract behavior, or assign abstract keyword
  • consider about duplicate behaviors