[SOLVED] Questions about the new Cake 3.6 plugin facilities

Loading plugins in App\Application::bootstrap is preferred to config/bootstrap.php now?

Plugins have to provide a plugins/<…>/src/Plugin.php to be considered Cake 3.6+ compatible?

Please read the migration guide and the documentation, both has been updated:

The console environment no longer automatically loads plugins specified by the --plugin option. Instead you must ensure that your application bootstrapping loads all the required plugins

I read those. That’s all fine. But this doesn’t really answer why half the plugins out there (including CakePHP maintained) fail at Application loading because they don’t have a Plugin.php class.

Loading a plugin in bootstrap and loading in Application doesn’t seem interchangeable at the moment. Application loading is a suggestion at best.

CakePHP developers are all volunteers that give up their free time to build and maintain CakePHP and CakePHP Plugins. That does mean that some plugins don’t get updated as quickly as they should, or get missed.

If you find any plugins that have not been updated to CakePHP 3.6, please take a moment of your time and either upgrade them (Pull Requests are always welcome!), or at the very least create an issue so that we get reminded what needs upgrading!

Sorry if there was a miscommunication. I don’t want other people doing work for me. I just wanted to make sure if that work is necessary or if I misunderstood something, which wasn’t clear when 3.6 was released.

So I assume the answer is Yes and every plugin should have a Plugin.php from now on.

Sorry for the misunderstanding :slight_smile:

While the recommended way is loading plugins in Application.php, you can still load legacy plugins the old way. There is nothing wrong with combining the two methods and moving the loading over as plugins get updated.

Please do open issues or pull requests on plugins that you find that don’t yet have a Plugin.php file.