From 2266270818e7e900851a63acd45fa80588894c82 Mon Sep 17 00:00:00 2001 From: Ahmed El Moden Date: Thu, 21 Jan 2021 15:16:18 +0100 Subject: [PATCH 1/3] Fixes root deprecation symfony 4 Issue #34 --- DependencyInjection/Configuration.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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() From 5cace74704c3a00c54c59b98c6d7b077633d5024 Mon Sep 17 00:00:00 2001 From: Ahmed El Moden Date: Fri, 18 Jun 2021 10:14:11 +0200 Subject: [PATCH 2/3] Fix: ContainerAwareCommand deprecation for sf4. --- Command/PopulateCommand.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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} From 41269c1221a949df9c000fff672f106d7296979f Mon Sep 17 00:00:00 2001 From: Ahmed El Moden Date: Fri, 18 Jun 2021 10:15:13 +0200 Subject: [PATCH 3/3] Rename composer package. --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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",