I’m having a problem when trying to bake a new factory.
It seems the db configuration is not being found and used?
Stack Trace: - /Users/dondrake/Sites/ck5/vendor/vierge-noire/cakephp-fixture-factories/src/Command/BakeFixtureFactoryCommand.php:219 - /Users/dondrake/Sites/ck5/vendor/cakephp/cakephp/src/Console/BaseCommand.php:192 - /Users/dondrake/Sites/ck5/vendor/cakephp/cakephp/src/Console/CommandRunner.php:327 - /Users/dondrake/Sites/ck5/vendor/cakephp/cakephp/src/Console/CommandRunner.php:168 - /Users/dondrake/Sites/ck5/bin/cake.php:10 - [main]: [TypeError] Cannot assign null to property Bake\Command\BakeCommand::$connection of type string in /Users/dondrake/Sites/ck5/vendor/cakephp/bake/src/Utility/CommonOptionsTrait.php on line 77 Stack Trace: Bake\Command\BakeCommand->extractCommonProperties() - ROOT/vendor/vierge-noire/cakephp-fixture-factories/src/Command/BakeFixtureFactoryCommand.php, line 219 CakephpFixtureFactories\Command\BakeFixtureFactoryCommand->execute() - CORE/src/Console/BaseCommand.php, line 192 Cake\Console\BaseCommand->run() - CORE/src/Console/CommandRunner.php, line 327 Cake\Console\CommandRunner->runCommand() - CORE/src/Console/CommandRunner.php, line 168 Cake\Console\CommandRunner->run() - ROOT/bin/cake.php, line 10 [main] - [main], line 0
What I’ve done so far
The traditional, built-in Cake fixtures work with the testing db and several unit tests that use fixture data work fine.
I composed in the new version of Fixture Factory and loaded the plugin as instructed in the Setup instructions.
bake fixture_factory <model-name> produces the error shown.
My original efforts were in a Docker environment. The db config in this installation was a url in an
Thinking I might have something wrong there I made a new CakePHP 5.x app and did the setup for Fixture Factory. In this case I made the db config by setting the various array keys appropriately.
The home page shows green for all the Cake pieces.
Baking a new Factory yields the same error.