Following the documentation found here I enter php bin/console make:entity Product in Terminal and get the following error:
[Symfony\Component\Console\Exception\CommandNotFoundException]
There are no commands defined in the "make" namespace.
prod environment?The website-skeleton puts the Maker Bundle in the require-dev section of your composer.json by default:
"require-dev": {
...
"symfony/maker-bundle": "^1.0",
...
}
If you've set APP_ENV=prod in your .env file and ran bin/console it would ignore all dev requirements and thus wouldn't enable the Maker Bundle.
Simply enabling the dev environment again (APP_ENV=dev) would do the trick then.
make is a command of doctrine component. Just add doctrine maker.
composer require doctrine maker
https://symfony.com/doc/current/doctrine.html#installing-doctrine
You need Symfony 3.4 or higher. For Symfony 3.4 you will need to add it to the registerBundles function in config/AppKernerl():
if (in_array($this->getEnvironment(), array('dev', 'test'))) {
// [...]
$bundles[] = new \Symfony\Bundle\MakerBundle\MakerBundle();
}
Bear in mind that the environment where it is installed is 'dev'.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With