Obs.: The steps below works fine in CakePHP 3.5.13
I create a new application:
composer create-project --prefer-dist cakephp/app crud
Configure database
cd crud
composer require ribafs/cake-acl-br
bin/cake plugin load CakeAclBr --bootstrap
I receive:
Your Application class does not have a bootstrap() method. Please add one.
Then I add in src/Application.php
public function bootstrap()
{
$this->addPlugin('CakeAclBr', ['bootstrap' => true]);
parent::bootstrap();
}
Repeat
bin/cake plugin load CakeAclBr --bootstrap
Now work
Then execute
bin/cake bake all groups -t CakeAclBr
Then receive:
PHP Fatal error: Uncaught InvalidArgumentException: The plugin class CakeAclBr\Plugin
cannot be found. Ensure your autoloader is correct. in /backup/www/cake361/vendor/cakephp/cakephp/src/Http/BaseApplication.php:127
Stack trace:
#0 /backup/www/cake361/vendor/cakephp/cakephp/src/Http/BaseApplication.php(95): Cake\Http\BaseApplication->makePlugin(‘CakeAclBr\Plugi…’, Array)
#1 /backup/www/cake361/src/Application.php(34): Cake\Http\BaseApplication->addPlugin(‘CakeAclBr’, Array)
#2 /backup/www/cake361/vendor/cakephp/cakephp/src/Console/CommandRunner.php(188): App\Application->bootstrap()
#3 /backup/www/cake361/vendor/cakephp/cakephp/src/Console/CommandRunner.php(134): Cake\Console\CommandRunner->bootstrap()
#4 /backup/www/cake361/bin/cake.php(12): Cake\Console\CommandRunner->run(Array)
#5 {main}
thrown in /backup/www/cake361/vendor/cakephp/cakephp/src/Http/BaseApplication.php on line 127
The procedures work fine:
- Create new application in CakePHP 3.5.13
- Install and load plugin
- Install and execute migrations plugin
- Create CRUD with bake without problem.
- My app with CakePHP 3.6.1