Hi,
i’am using cake 3.6 and wanted to use the Friends of Cake Plugin Search. Since this version plugins shall be load in src/Application.php and not like in previous versions in conf/bootstrap.php
So in the file i 've wrote this.
public function bootstrap()
{
..
try {
$this->addPlugin(SearchPlugin::class,['routes'=>true,'bootstrap'=>true]);
LOG::write(LOG_DEBUG,'SearchPlugin-Loaded');
} catch (MissingPluginException $e) {
LOG::write(LOG_DEBUG,$e);
}
}
When i take a look in debug.log i found the “SearchPlugin Loaded”
In the ModelTable i call
public function initialize(array $config) {
parent::initialize($config);
$this->addBehavior('Search');
When i call now my action, i get an Missing Behavior Error SearchBehavior could not be found.
Error: Create the class SearchBehavior below in file: src/Model/Behavior/SearchBehavior.php
It seems that the Plugin is not loaded successfully.
Does anyone know that?