Published by dereuromark over 1 year ago
Published by dereuromark over 1 year ago
Fixed compatibility with differ library versions.
Published by dereuromark over 1 year ago
sebastian/diff
v5Note: PHP 7.4+ from here on
Published by dereuromark almost 2 years ago
Full Changelog: https://github.com/dereuromark/cakephp-ide-helper/compare/1.18.5...1.18.6
Published by dereuromark almost 2 years ago
Fixed code completion scripts to have valid method signature and body for IDE not to report it.
Published by dereuromark about 2 years ago
Enhanced further signature autocompletes for event callbacks.
Published by dereuromark about 2 years ago
Added missing autocomplete for the "event" callback methods for
It includes full signature.
Just run bin/cake code_completion generate
and enjoy!
E.g.:
Thx to @toggenation for his initiative and work on this one.
Published by dereuromark about 2 years ago
Fixed dependency to be declared directly.
Published by dereuromark about 2 years ago
Fixed template docblocks to be recognized as main docblocks if clearly not license ones.
Allow entity virtual fields to be annotated with @see
tag to directly link property and method in IDE.
Published by dereuromark about 2 years ago
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',
Published by dereuromark over 2 years ago
arrayAsGenerics
config for controller and model classesPublished by dereuromark over 2 years ago
Published by dereuromark over 2 years ago
Published by dereuromark almost 3 years ago
Support FQCN in belongsToMany through option, thx to @andrii-pukhalevych
Annotation support for inline topics have been added:
/** @uses \App\Form\ReleaseForm::_execute() */
$result = $releaseForm->execute($data);
/** @uses \App\Mailer\NotificationMailer::notify() */
$notificationMailer->send('notify', [$username]);
You can use the new inline annotator functionality to add custom ones on top.
Published by dereuromark almost 3 years ago
<?php
+/**
+ * @var \Cake\Routing\RouteBuilder $routes
+ */
$routes->...
...
... = $entity->get('group_id'); // field $entity->group_id
... = $entity->get('group'); // association $entity->group
Published by dereuromark almost 3 years ago
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+.
Published by dereuromark about 3 years ago
Fixed up Component annotator to respect configured application namespace (defaults to App
otherwise)
Published by dereuromark about 3 years ago
loadModel()
annotating.Published by dereuromark over 3 years ago
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.
Published by dereuromark over 3 years ago
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.