cakephp-ide-helper

IDE Helper plugin for CakePHP

MIT License

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

Published by dereuromark over 1 year ago

Fixes

  • Remove return type for Controller events for now
cakephp-ide-helper - 1.18.8

Published by dereuromark over 1 year ago

Fixes

Fixed compatibility with differ library versions.

cakephp-ide-helper - 1.18.7

Published by dereuromark over 1 year ago

Improvements

  • Allow sebastian/diff v5

Note: PHP 7.4+ from here on

cakephp-ide-helper - 1.18.6

Published by dereuromark almost 2 years ago

Fixes

New Contributors

Full Changelog: https://github.com/dereuromark/cakephp-ide-helper/compare/1.18.5...1.18.6

cakephp-ide-helper - 1.18.5

Published by dereuromark almost 2 years ago

Fixes

Fixed code completion scripts to have valid method signature and body for IDE not to report it.

cakephp-ide-helper - 1.18.4

Published by dereuromark about 2 years ago

Improvements

Enhanced further signature autocompletes for event callbacks.

cakephp-ide-helper - 1.18.3

Published by dereuromark about 2 years ago

Improvements

Added missing autocomplete for the "event" callback methods for

  • Controllers, components
  • Models, behaviors
  • Helpers

It includes full signature.

Just run bin/cake code_completion generate and enjoy!

E.g.:
Untitled

Thx to @toggenation for his initiative and work on this one.

cakephp-ide-helper - 1.18.2

Published by dereuromark about 2 years ago

Fixes

Fixed dependency to be declared directly.

cakephp-ide-helper - 1.18.1

Published by dereuromark about 2 years ago

Fixes

Fixed template docblocks to be recognized as main docblocks if clearly not license ones.

Improvements

Allow entity virtual fields to be annotated with @see tag to directly link property and method in IDE.

cakephp-ide-helper - 1.18.0

Published by dereuromark about 2 years ago

Improvements

PHP docblock parsing is now using PHPStan's functionality.
This allows for more complex types, e.g. generics (array<int, int>), to be recognized and handled.

Note: The old alternative of @property \Cake\Controller\Component\SecurityComponent Security is now not working anymore, always needs a $ in front of property name now to be found as existing annotation (@property \Cake\Controller\Component\SecurityComponent $Security).

Also, added config objectAsGenerics (default false) allows to control the object collection annotations.
It seems IDEs (e.g. PHPStorm) are not able to handle those yet, specifically inside templates. See this for details.
It completes the existing arrayAsGenerics config which now only handles simple arrays.

It is recommended to use config 'templateCollectionObject' => 'iterable' here for templates if you are not passing your collections always as arrays.

Example config:

    'arrayAsGenerics' => true,
    'objectAsGenerics' => true,
    'templateCollectionObject' => 'iterable',
cakephp-ide-helper - 1.17.2

Published by dereuromark over 2 years ago

Improvements

  • Completed arrayAsGenerics config for controller and model classes
cakephp-ide-helper - 0.14.11

Published by dereuromark over 2 years ago

Fixes

  • Quick fixed an issue with directives
cakephp-ide-helper - 1.17.1

Published by dereuromark over 2 years ago

Fixes

  • Fix for templates with declare() in PHP open tag
  • Fix generator's TableFinderTask to not fail on union types, thx to @passchn
  • Skip routes annotation if present already anywhere in file
cakephp-ide-helper - 1.17.0

Published by dereuromark almost 3 years ago

Improvements

FQCN usage in associations

Support FQCN in belongsToMany through option, thx to @andrii-pukhalevych

Inline annotations

Annotation support for inline topics have been added:

Form
/** @uses \App\Form\ReleaseForm::_execute() */
$result = $releaseForm->execute($data);
Mailer
/** @uses \App\Mailer\NotificationMailer::notify() */
$notificationMailer->send('notify', [$username]);
Custom

You can use the new inline annotator functionality to add custom ones on top.

cakephp-ide-helper - 1.16.0

Published by dereuromark almost 3 years ago

Improvements

  • Added routes annotation for new dynamic style (as static setup is deprecated).
    Adds the following into routes.php files:
 <?php
+/**
+ * @var \Cake\Routing\RouteBuilder $routes
+ */
 
 $routes->...
 ...
  • Make sure virtual fields and relation-based (association) properties are also autocompleted for EntityTask of meta file generator.
... = $entity->get('group_id'); // field $entity->group_id
... = $entity->get('group'); // association $entity->group
cakephp-ide-helper - 1.15.0

Published by dereuromark almost 3 years ago

Improvements

  • Cell autocomplete - thanks to @LordSimal

  • Array generics support in doc blocks using arrayAsGenerics config. It is disabled by default for BC, but recommended to enable if it fits to your coding standards.

Updates for CakePHP 4.3+:

  • LocatorAwareTrait::fetchTable() autocomplete and return type support. Best to use this together with PHPStan extension.

The main advantages of this release and the plugin in general can be used together with PHPStorm IDE, as that one provides the most comprehensive support for meta data.

Note: This plugin is now CakePHP 4.2+ and PHP 7.3+.

cakephp-ide-helper - 1.14.1

Published by dereuromark about 3 years ago

Fixes

Fixed up Component annotator to respect configured application namespace (defaults to App otherwise)

cakephp-ide-helper - 1.14.0

Published by dereuromark about 3 years ago

Improvements

  • Allow also inherited loadModel() annotating.
cakephp-ide-helper - 1.13.0

Published by dereuromark over 3 years ago

Improvements

Reusing existing argument sets

If you want to reuse existing argument sets from other tasks, you can now use the ArgumentsSet value object referencing them within your task:

use IdeHelper\Generator\Directive\ExpectedArguments;
use IdeHelper\ValueObject\ArgumentsSet;

$method = '\\' . static::CLASS_FORMAT_HELPER . '::sidebarLink()';
$list = [
    ArgumentsSet::create(FormatIconFontAwesome5Task::SET_ICONS_FONTAWESOME),
];
$directive = new ExpectedArguments($method, 1, $list);

Just make sure those argument sets are actually available, as this is not checked for you.

cakephp-ide-helper - 1.12.0

Published by dereuromark over 3 years ago

Improvements

Disabling object collection annotation in templates is now possible using config templateCollectionObject set to false
This way, if you always pass arrays of Entities for find() or paginate() calls, you can now reflect that.
You can also set a custom FQCN if you need to.

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