Skip to content

Commit

Permalink
Merge pull request #8 from mybuilder/fix-deprecations
Browse files Browse the repository at this point in the history
PSR-4 composer + autowire and register commands (Symfony 3.3+)
  • Loading branch information
angelsk authored May 28, 2020
2 parents 08c31ae + c081fb9 commit 9e36297
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
3 changes: 2 additions & 1 deletion DependencyInjection/MopaBootstrapExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ public function load(array $configs, ContainerBuilder $container)
$yamlloader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
$yamlloader->load('twig_extensions.yml');
$yamlloader->load("form_extensions.yml");

$yamlloader->load("commands.yml");

if (isset($config['form'])) {
foreach ($config['form'] as $key => $value) {
if (is_array($value)) {
Expand Down
6 changes: 6 additions & 0 deletions Resources/config/commands.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
services:
Mopa\Bundle\BootstrapBundle\Command\:
resource: '../../Command'
autowire: true
exclude: '../../Command/BaseBootstrapSymlinkCommand.php'
tags: ['console.command']
7 changes: 3 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,12 @@
}
],
"autoload": {
"psr-0": {
"Mopa\\Bundle\\BootstrapBundle": ""
"psr-4": {
"Mopa\\Bundle\\BootstrapBundle\\": ""
}
},
"target-dir": "Mopa/Bundle/BootstrapBundle",
"require": {
"symfony/symfony": "~2.3|~3.0",
"symfony/symfony": "^3.3",
"mopa/composer-bridge": "1.3.*",
"twig/twig": "~1.23"
},
Expand Down

0 comments on commit 9e36297

Please sign in to comment.