diff --git a/Command/PopulateCommand.php b/Command/PopulateCommand.php index 026465b..989c783 100644 --- a/Command/PopulateCommand.php +++ b/Command/PopulateCommand.php @@ -10,14 +10,14 @@ namespace Bazinga\Bundle\FakerBundle\Command; -use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; +use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; /** * @author William Durand */ -class PopulateCommand extends ContainerAwareCommand +class PopulateCommand extends Command { /** * {@inheritDoc} diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index 8e2a48d..461dc37 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -25,8 +25,8 @@ class Configuration implements ConfigurationInterface */ public function getConfigTreeBuilder() { - $treeBuilder = new TreeBuilder(); - $rootNode = $treeBuilder->root('faker'); + $treeBuilder = new TreeBuilder('faker'); + $rootNode = method_exists(TreeBuilder::class, 'getRootNode') ? $treeBuilder->getRootNode() : $treeBuilder->root('faker'); $rootNode ->beforeNormalization() diff --git a/composer.json b/composer.json index 331cb3d..b33dbc0 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "willdurand/faker-bundle", + "name": "herz3h/faker-bundle-sf4", "description": "Put the awesome Faker lib into the DIC and populate your database with fake data.", "keywords": ["faker", "fixtures", "data"], "type": "symfony-bundle",