cakephp-ide-helper

IDE Helper plugin for CakePHP

MIT License

Downloads
1.5M
Stars
183
Committers
25
cakephp-ide-helper - 1.1.1

Published by dereuromark over 4 years ago

Fixes

Fixed prefixed (e.g. Admin) Controller to be annotated properly.

cakephp-ide-helper - 1.1.0

Published by dereuromark over 4 years ago

Improvements

  • Allow for custom project namespace (default is usually App).
  • Annotate binaryuuid Type class type as string in entities.
cakephp-ide-helper - 0.14.8

Published by dereuromark over 4 years ago

Improvements

Allow for custom project namespace (App).

cakephp-ide-helper - 1.0.1

Published by dereuromark over 4 years ago

Bugfixes

Fixed skipping of abstract classes.

cakephp-ide-helper - 0.14.7

Published by dereuromark over 4 years ago

Bugfixes

Small regression fix.

cakephp-ide-helper - 0.14.6

Published by dereuromark over 4 years ago

Bugfixes

Fixed skipping of abstract classes.

cakephp-ide-helper - 1.0.0

Published by dereuromark almost 5 years ago

Stable release

For CakePHP 4.0+ apps.

Highlights:

New Table method annotations

This is the result when you run the annotator on an upgraded project or plugin:

--- a/src/Model/Table/UsersTable.php
+++ b/src/Model/Table/UsersTable.php
@@ -6,17 +6,22 @@
 
 /**
  * @mixin \Cake\ORM\Behavior\TimestampBehavior
  * @property \App\Model\Table\RolesTable&\Cake\ORM\Association\BelongsTo $Roles
  * @method \App\Model\Entity\User get($primaryKey, $options = [])
- * @method \App\Model\Entity\User newEntity($data = null, array $options = [])
+ * @method \App\Model\Entity\User newEntity(array $data, array $options = [])
  * @method \App\Model\Entity\User[] newEntities(array $data, array $options = [])
  * @method \App\Model\Entity\User|false save(\Cake\Datasource\EntityInterface $entity, $options = [])
  * @method \App\Model\Entity\User patchEntity(\Cake\Datasource\EntityInterface $entity, array $data, array $options = [])
- * @method \App\Model\Entity\User[] patchEntities($entities, array $data, array $options = [])
- * @method \App\Model\Entity\User findOrCreate($search, callable $callback = null, $options = [])
+ * @method \App\Model\Entity\User[] patchEntities(iterable $entities, array $data, array $options = [])
+ * @method \App\Model\Entity\User findOrCreate($search, ?callable $callback = null, $options = [])
  * @method \App\Model\Entity\User saveOrFail(\Cake\Datasource\EntityInterface $entity, $options = [])
+ * @method \App\Model\Entity\User newEmptyEntity()
+ * @method \App\Model\Entity\User[]|\Cake\Datasource\ResultSetInterface|false saveMany(iterable $entities, $options = [])
+ * @method \App\Model\Entity\User[]|\Cake\Datasource\ResultSetInterface saveManyOrFail(iterable $entities, $options = [])
+ * @method \App\Model\Entity\User[]|\Cake\Datasource\ResultSetInterface|false deleteMany(iterable $entities, $options = [])
+ * @method \App\Model\Entity\User[]|\Cake\Datasource\ResultSetInterface deleteManyOrFail(iterable $entities, $options = [])
  */
 class UsersTable extends Table {

Router::pathUrl()

It contains the new 4.x path string autocomplete:

cakephp-ide-helper - 0.14.5

Published by dereuromark almost 5 years ago

Improvements

Added the saveMany() method to the Table annotations:

@method \App\Model\Entity\BarBarsAbstract[]|\Cake\Datasource\ResultSetInterface|false saveMany($entities, $options = [])

Also added newEmptyEntity() if Shim plugin is used and added new 3.9 methods already for once this minor is released and those methods become available.

cakephp-ide-helper - 1.0.0-rc

Published by dereuromark almost 5 years ago

CakePHP 4 compatible pre-release.

API should now be stable. Please test and give feedback.

cakephp-ide-helper - 0.14.4

Published by dereuromark almost 5 years ago

Bugfixes

Fixed hasOne() annotations for Entity classes to show nullable relation as |null in all cases.

cakephp-ide-helper - 0.14.3

Published by dereuromark almost 5 years ago

Fixes

  • Fixed Plugin AppControllers to be skipped for controller model annotation.
  • Also fixed controllers to not have non-existing primary model name annotated.

Improvements

  • Better detection of entity name for a table class.
cakephp-ide-helper - 0.14.2

Published by dereuromark almost 5 years ago

Bugfixes

  • Fixed an unhandled notice on template parsing.
  • Fixed template annotations return code for dry-running it.
cakephp-ide-helper - 1.0.0-beta

Published by dereuromark almost 5 years ago

CakePHP 4 compatible pre-release.

Please help to finalize for stable release.

Router::pathUrl()

It already contains the new 4.x path string autocomplete:

cakephp-ide-helper - 0.14.1

Published by dereuromark almost 5 years ago

Bugfixes

  • Fix casing for finders.
  • Fixed some small exceptions to not cause the whole generation to fail.
  • Sorting is now consistent across all meta directives.
cakephp-ide-helper - 0.14.0

Published by dereuromark almost 5 years ago

Improvements

Added an improved IDE meta file generator, using value objects and now supporting all (new) directives:

  • override() (already used a lot) for input+output coupling
  • expectedArguments() for arguments
  • expectedReturnValues() for return values
  • registerArgumentsSet() as helper

You can now easily add tasks for any method you want to improve the typehinting/autocomplete for.
See Generator (task) docs for details.

This is mainly for PHPStorm, as probably not many others support such a meta file.

Examples

Validator::requirePresence()

validation_autocomplete_validator_require_presence

Now not just bool true/false, but also the possible "magic strings" are typehinted and usable as single click/enter.

Upgrading

Make sure you upgrade custom generator tasks, and if you use Queue or other plugins that those also are updated to the matching new minor version there.

cakephp-ide-helper - 0.13.22

Published by dereuromark about 5 years ago

Bugfixes

Removed false positives on the custom finder list for the IDE meta map.
Now the finder autocomplete works for all valid custom finders found:

finder_autocomplete

cakephp-ide-helper - 0.13.21

Published by dereuromark about 5 years ago

Bugfixes

  • Fixed annotation handling around non-instantiable classes (abstract ones). Big thx to @dakota for his contribution.
cakephp-ide-helper - 0.13.20

Published by dereuromark about 5 years ago

Bugfixes

Fixed a view more template annotation collecting issues.

cakephp-ide-helper - 0.13.19

Published by dereuromark about 5 years ago

Improvements

Allow auto-collecting view template variables from (ctp/php) files.
This has two key benefits:

  • Adding them into the annotations on the top, including some auto-guessing of types
  • Prevents adding invalid annotations (for local scoped or assignment variables)

Demo

This is how your template could currently look like:
Screenshot from 2019-09-03 11-45-57

This is what IdeHelper template annotator finds and displayes in dry-run output:
Screenshot from 2019-09-03 11-45-19
Let's apply them for real (without -d).

After letting the annotator update the annotations the errors go away:
Screenshot from 2019-09-03 11-48-33

cakephp-ide-helper - 0.13.18

Published by dereuromark about 5 years ago

Improvements

Allow @property-read tag to be used for virtual entity properties.

Package Rankings
Top 1.19% on Packagist.org
Badges
Extracted from project README
CI Coverage Status PHPStan Minimum PHP Version