From 516248fc06d7f00d31b5be4e8119645f3f6c6b4b Mon Sep 17 00:00:00 2001 From: Thomas Crepain Date: Sat, 18 Apr 2020 14:57:02 +0200 Subject: [PATCH 1/3] Update composer.json Bump required Symfony/framework bundle to ^5.0 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index ad66eb1..a462b3a 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,7 @@ "require": { "php": "^7.1", - "symfony/framework-bundle": "^4.0", + "symfony/framework-bundle": "^5.0", "acelaya/doctrine-enum-type": "^2.2" }, From 2be417c58f39df960733e96ad46a5025ba1e78c3 Mon Sep 17 00:00:00 2001 From: Thomas Crepain Date: Sat, 18 Apr 2020 15:13:31 +0200 Subject: [PATCH 2/3] Fix treebuilder deprecation --- .idea/.gitignore | 8 ++++++++ .idea/doctrine-enum-type-bundle.iml | 12 ++++++++++++ .idea/inspectionProfiles/Project_Default.xml | 5 +++++ .idea/misc.xml | 6 ++++++ .idea/modules.xml | 8 ++++++++ .idea/php.xml | 4 ++++ .idea/vagrant.xml | 7 +++++++ .idea/vcs.xml | 6 ++++++ DependencyInjection/Configuration.php | 13 ++++++++++--- 9 files changed, 66 insertions(+), 3 deletions(-) create mode 100644 .idea/.gitignore create mode 100644 .idea/doctrine-enum-type-bundle.iml create mode 100644 .idea/inspectionProfiles/Project_Default.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/php.xml create mode 100644 .idea/vagrant.xml create mode 100644 .idea/vcs.xml diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..73f69e0 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/.idea/doctrine-enum-type-bundle.iml b/.idea/doctrine-enum-type-bundle.iml new file mode 100644 index 0000000..7488dbd --- /dev/null +++ b/.idea/doctrine-enum-type-bundle.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..8d66637 --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..28a804d --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..24bb185 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/php.xml b/.idea/php.xml new file mode 100644 index 0000000..10b171f --- /dev/null +++ b/.idea/php.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/vagrant.xml b/.idea/vagrant.xml new file mode 100644 index 0000000..a5aa786 --- /dev/null +++ b/.idea/vagrant.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index d23eaec..353c292 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -12,9 +12,16 @@ class Configuration implements ConfigurationInterface */ public function getConfigTreeBuilder() { - $treeBuilder = new TreeBuilder(); - $treeBuilder->root('doctrine_enum_type') - ->children() + $treeBuilder = new TreeBuilder('doctrine_enum_type'); + + if (method_exists($treeBuilder, 'getRootNode')) { + $rootNode = $treeBuilder->getRootNode(); + } else { + // for symfony/config 4.1 and older + $rootNode = $treeBuilder->root('doctrine_enum_type'); + } + + $rootNode->children() ->arrayNode('types') ->useAttributeAsKey('name') ->prototype('scalar')->end() From 1bdad9a08395773c83525376600e6b0111c41d52 Mon Sep 17 00:00:00 2001 From: Thomas Crepain Date: Sat, 18 Apr 2020 15:18:59 +0200 Subject: [PATCH 3/3] Remove .idea files --- .idea/.gitignore | 8 -------- .idea/doctrine-enum-type-bundle.iml | 12 ------------ .idea/inspectionProfiles/Project_Default.xml | 5 ----- .idea/misc.xml | 6 ------ .idea/modules.xml | 8 -------- .idea/php.xml | 4 ---- .idea/vagrant.xml | 7 ------- .idea/vcs.xml | 6 ------ 8 files changed, 56 deletions(-) delete mode 100644 .idea/.gitignore delete mode 100644 .idea/doctrine-enum-type-bundle.iml delete mode 100644 .idea/inspectionProfiles/Project_Default.xml delete mode 100644 .idea/misc.xml delete mode 100644 .idea/modules.xml delete mode 100644 .idea/php.xml delete mode 100644 .idea/vagrant.xml delete mode 100644 .idea/vcs.xml diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index 73f69e0..0000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Datasource local storage ignored files -/dataSources/ -/dataSources.local.xml -# Editor-based HTTP Client requests -/httpRequests/ diff --git a/.idea/doctrine-enum-type-bundle.iml b/.idea/doctrine-enum-type-bundle.iml deleted file mode 100644 index 7488dbd..0000000 --- a/.idea/doctrine-enum-type-bundle.iml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml deleted file mode 100644 index 8d66637..0000000 --- a/.idea/inspectionProfiles/Project_Default.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index 28a804d..0000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index 24bb185..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/php.xml b/.idea/php.xml deleted file mode 100644 index 10b171f..0000000 --- a/.idea/php.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/vagrant.xml b/.idea/vagrant.xml deleted file mode 100644 index a5aa786..0000000 --- a/.idea/vagrant.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 94a25f7..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file