Console commands not registered in Symfony 4
Closed this issue · 2 comments
I can't register deployments in a new Symfony 4 app because the commands are not being registered.
To reproduce:
$ composer create-project symfony/skeleton ekino-example
$ cd ekino-example
$ composer require ekino/newrelic-bundle
# then prompted for recipe/flex - select default (n)
Update config/bundles.php
:
return [
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
Ekino\Bundle\NewRelicBundle\EkinoNewRelicBundle::class => ['all' => true],
];
List console commands:
$ php bin/console list
No commands for newrelic
registered.
Add config:
$ vi config/ekino.yaml
Add the following:
ekino_new_relic:
enabled: true # Defaults to true
application_name: Awesome Application # default value in newrelic is "PHP Application", or whatever is set
# as php ini-value
deployment_names: ~ # default value is 'application_name', supports string array or semi-colon separated string
api_key: XXX # New Relic API
List console commands:
$ php bin/console list
No commands for newrelic
registered.
Then I tried again using the flex recipe:
$ cd ../
$ rm -rf ekino-example
$ composer create-project symfony/skeleton ekino-example
$ cd ekino-example
$ composer require ekino/newrelic-bundle
# then prompted for recipe/flex - select Y
The recipe adds config for prod only but the same result whether I run in a prod environment or I update bundles to register it in all environments and move the config yaml file into the root level of the config directory.
I am investigating why this is but in case you don't know already, or know where I should start to look, I'm adding this issue.
I am seeing the services registered in the container when I run php bin/console debug:container --show-private
Thanks Tobias - have forked master which seems promising in dev. will give it a whirl in staging.
Matt