-
Notifications
You must be signed in to change notification settings - Fork 101
Closed
Labels
Milestone
Description
Description
When baking a plugin, the resulting plugin class file is name 'Plugin.php'.
bin\cake bake plugin OneKit
Plugin Name: OneKit
Plugin Directory: D:\laragon\www\sandbox-one\plugins\OneKit
-------------------------------------------------------------------------------
Look okay? (y/n/q)
[y] >
Generating src\Controller\AppController.php file...
Creating file D:\laragon\www\sandbox-one\plugins\OneKit\src\Controller\AppController.php
Wrote `D:\laragon\www\sandbox-one\plugins\OneKit\src\Controller\AppController.php`
Generating src\Plugin.php file...
Creating file D:\laragon\www\sandbox-one\plugins\OneKit\src\Plugin.php
Wrote `D:\laragon\www\sandbox-one\plugins\OneKit\src\Plugin.php`
Generating webroot\.gitkeep file...
Creating file D:\laragon\www\sandbox-one\plugins\OneKit\webroot\.gitkeep
Wrote `D:\laragon\www\sandbox-one\plugins\OneKit\webroot\.gitkeep`
Plugin added successfully to `CONFIG/plugins.php`
Generating autoload files
Generated autoload files
-------------------------------------------------------------------------------
Created: OneKit in D:\laragon\www\sandbox-one\plugins\OneKit
Deleted `D:\laragon\www\sandbox-one\plugins\.gitkeep`
Any attempt to run the app after this results in this error:
deprecated: 16384 :: Since 5.3.0: Loading plugins without a plugin class is deprecated. You can create the missing class using `bin/cake bake plugin OneKit --class-only`.
D:\laragon\www\sandbox-one\vendor\cakephp\cakephp\src\Core\PluginCollection.php, line: 118
I found the solution is to actually do as the cookbook says and re-name the plugin filename, after it was generated by bake:
"Plugin classes live in src/{PluginName}Plugin.php."
Would Excpect the bake command to have used the proper filename for the baked plugin instead of using 'Plugin.php'
Note: the form requires "PHP Version" but the microhelp says "The version of CakePHP used"... Using PHP 8.5.1 by the way
Bake Version
3.6.0
PHP Version
5.3
Reactions are currently unavailable