Improvements
PHPStorm generator
Added Query::find() auto-complete besides the existing Table::find(), e.g. in callbacks:
$searchManager
->callback('tag', [
'callback' => function (QueryInterface $query, array $args) {
$query->find('tagged', $args);
}
]);
The tagged
finder would be autocompleted now.
Here is an example in PHPStorm:
Added class annotating
In order to run certain "fixers" over all classes, class annotations and their tasks are now available.
Out of the box it will already ship with one: ModelAware annotating.
Inside any non-ORM business logic class, e.g. Service/FooBar layer:
$this->loadModel('Posts');
automatically annotates
@property \App\Model\Table\PostsTable $Posts
above the class then.
This does, however, impact existing ones in terms of -r (remove) cleanup option as it is not completely in sync.
So use this only without the -r option for now.