Closed LordSimal closed 4 years ago
As you can see in my composer.json in the Issue I use cakephp/cakephp:^4.0
To be specific I use 4.0.6
Von: webrider notifications@github.com
Gesendet: Freitag, 1. Mai 2020 15:47
An: pakacuda/cakephp-fixture-factories cakephp-fixture-factories@noreply.github.com
Cc: Kevin Pfeifer info@pfiff.me; Author author@noreply.github.com
Betreff: Re: [pakacuda/cakephp-fixture-factories] Template file No bake template found for "fixture_factory" skipping file generation.
could not be found (#2)
Hi,
thanks for giving it a try. Are you using CakePHP 3.x or 4.x?
For 3.x use "^0.1.0", 4.x use "^0.2.0"
I'll update the documentation.
Let me know if this fixed you issue!
@LordSimal indeed, I saw only after that you had given your full composer.
Well first thanks for trying out the vendor, and for your feedback. I have applied a fix. Would you mind trying again by reinstalling the vendor?
Since composer needs some time to update I just applied your change in the vendor/pakacuda/cakephp-fixture-factories/src/Command/FixtureFactoryCommand.php manually and now the command works and the factories got generated!
Thanks for that quick fix!
PS: I found your repository because you were in the "CakePHP Online Meetup 2020-04 with Mark Scherer" stream 😄 And since I have a CakePHP project with 44 tables and basically no testing I was quite intrigued by your factory.
What is the error?
What did I do?
This successfully added the plugin to the vendor
Then i manually added the Plugin into the bootstrapCli() function in the src/Application.php
After that I executed
For me it seems like it can't find the vendor/pakacuda/cakephp-fixture-factories/templates/bake/fixture_factory.twig even though it is present.
My composer.json
``` { "name": "cakephp/app", "description": "CakePHP skeleton app", "homepage": "https://cakephp.org", "type": "project", "license": "MIT", "require": { "php": ">=7.2", "ext-curl": "*", "ext-ftp": "*", "ext-json": "*", "cakephp/cakephp": "^4.0", "cakephp/migrations": "3.0.0-beta2", "cakephp/plugin-installer": "^1.0", "gamez/mite": "^1.0", "guzzlehttp/guzzle": "^6.5", "jeroendesloovere/vcard": "^1.7", "mobiledetect/mobiledetectlib": "2.*", "phan/phan": "^2.4", "phpoffice/phpspreadsheet": "^1.9" }, "require-dev": { "cakephp/bake": "^2.0", "cakephp/cakephp-codesniffer": "dev-next", "cakephp/debug_kit": "^4.0", "dereuromark/cakephp-ide-helper": "^1.5", "easybill/php-sdk": "^2.0", "josegonzalez/dotenv": "3.*", "pakacuda/cakephp-fixture-factories": "^0.2.4", "phpseclib/phpseclib": "^2.0", "phpunit/phpunit": "^8.0", "psy/psysh": "@stable" }, "suggest": { "markstory/asset_compress": "An asset compression plugin which provides file concatenation and a flexible filter system for preprocessing and minification.", "dereuromark/cakephp-ide-helper": "After baking your code, this keeps your annotations in sync with the code evolving from there on for maximum IDE and PHPStan compatibility." }, "autoload": { "psr-4": { "App\\": "src/" } }, "autoload-dev": { "psr-4": { "App\\Test\\": "tests/", "Cake\\Test\\": "vendor/cakephp/cakephp/tests/" } }, "scripts": { "post-install-cmd": "App\\Console\\Installer::postInstall", "post-create-project-cmd": "App\\Console\\Installer::postInstall", "post-autoload-dump": "Cake\\Composer\\Installer\\PluginInstaller::postAutoloadDump", "check": [ "@test", "@cs-check" ], "cs-check": "phpcs --colors -p --standard=vendor/cakephp/cakephp-codesniffer/CakePHP src/ tests/", "cs-fix": "phpcbf --colors --standard=vendor/cakephp/cakephp-codesniffer/CakePHP src/ tests/", "stan": "phpstan analyse src/", "stan-setup": "cp composer.json composer.backup && composer require --dev phpstan/phpstan-shim:^0.11 && mv composer.backup composer.json", "test": "phpunit --colors=always" }, "prefer-stable": true, "config": { "sort-packages": true }, "minimum-stability": "dev" } ```My phpunit.xml
```