Closed thasmo closed 6 years ago
Hey there!
Yea, I think that env local part is your issue: it means your app is running in a non-existent “local” environment, and MakerBundle only runs in dev. Are you on Homestead or on a machine that also runs Laravel apps? Something is setting the APP_ENV environment variable and that’s borking things :)
Hey! Thanks for the hint, that actually got me on the right track. I somehow had an old APP_ENV=local
line in my .zprofile
file. Thanks! :)
@weaverryan I have the same problem and i'm in dev env...
I use Homestead but not Laravel apps or anything else, just this project. I need to install Doctrine to have the make command.
$ composer require symfony/maker-bundle --dev
$ php bin/console
Symfony 4.0.6 (kernel: src, env: dev, debug: true)
Usage:
command [options] [arguments]
Options:
-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
-e, --env=ENV The Environment name. [default: "dev"]
--no-debug Switches off debug mode.
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Available commands:
about Displays information about the current project
help Displays help for a command
list Lists commands
assets
assets:install Installs bundles web assets under a public directory
cache
cache:clear Clears the cache
cache:pool:clear Clears cache pools
cache:pool:prune Prune cache pools
cache:warmup Warms up an empty cache
config
config:dump-reference Dumps the default configuration for an extension
debug
debug:autowiring Lists classes/interfaces you can use for autowiring
debug:config Dumps the current configuration for an extension
debug:container Displays current services for an application
debug:event-dispatcher Displays configured listeners for an application
debug:router Displays current routes for an application
lint
lint:yaml Lints a file and outputs encountered errors
router
router:match Helps debug routes by simulating a path info match
security
security:check Checks security issues in your project dependencies
I have the same problem. Any solution?
If the bundle is added to your kernel (which is automatic in Symfony 4 + Flex), the commands will be available. If they are not there, the bundle is (for some reason) not registered with your kernel.
I used sf4 and flex. No make command :/
Check your bundles.php file - it should have been added there automatically on install.
Just try to add bellow line in AppKernel.php
under dev section
if ('dev' === $this->getEnvironment()) {
......
$bundles[] = new \Symfony\Bundle\MakerBundle\MakerBundle();
......
}
Look in your .env file, on local APP_ENV is set on prod
Try this "composer require symfony/maker-bundle --dev"
after executing composer require symfony/maker-bundle restart / open new command prompt or terminal and try php bin/console
In bundles.php
append the below line
Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true],
@vrkansagara Thanks for the solution.
Change dev by local :
Symfony\Bundle\MakerBundle\MakerBundle::class => ['local' => true],
Maker Bundle is not registering
make
commands, although I've followed the instructions in the docs carefully.uname
:CYGWIN_NT-10.0
(Windows 10)php -v
:PHP 7.1.3 (cli) (built: Mar 14 2017 23:33:35) ( NTS MSVC14 (Visual C++ 2015) x64 )
composer --version
:Composer version 1.5.6 2017-12-18 12:09:18
Also, it says
env: local
althoughAPP_ENV=dev
is set in.env
.