From e12b2a769443340f0e787c2a9b1dc40faacbcad6 Mon Sep 17 00:00:00 2001 From: vjandrea Date: Mon, 13 Jul 2020 15:08:07 +0200 Subject: [PATCH] Fixed Symfony 4.4+ deprecations --- .coveralls.yml | 2 +- DependencyInjection/Configuration.php | 4 ++-- composer.json | 16 ++++++++-------- phpspec.yml | 2 +- .../CoopTilleulsOvhExtensionSpec.php | 1 + 5 files changed, 13 insertions(+), 12 deletions(-) diff --git a/.coveralls.yml b/.coveralls.yml index 5db4cfa..6acc77d 100644 --- a/.coveralls.yml +++ b/.coveralls.yml @@ -1,5 +1,5 @@ service_name: travis-ci -src_dir: . +entry_point: . coverage_clover: coverage.xml json_path: coveralls-upload.json diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index 5397a69..150f185 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -26,8 +26,8 @@ class Configuration implements ConfigurationInterface */ public function getConfigTreeBuilder() { - $treeBuilder = new TreeBuilder(); - $rootNode = $treeBuilder->root('coop_tilleuls_ovh'); + $treeBuilder = new TreeBuilder('coop_tilleuls_ovh'); + $rootNode = $treeBuilder->getRootNode(); $rootNode ->children() ->scalarNode('application_key')->isRequired()->cannotBeEmpty()->end() diff --git a/composer.json b/composer.json index 290c3ee..64934cf 100644 --- a/composer.json +++ b/composer.json @@ -13,18 +13,18 @@ } ], "require": { - "php": ">=5.5", - "symfony/dependency-injection" : "~2.3|~3.0|~4.0", - "symfony/config" : "~2.3|~3.0|~4.0", - "symfony/http-kernel": "~2.3|~3.0|~4.0", - "ovh/ovh": "~2.0" + "php": ">=7.2", + "symfony/dependency-injection" : "~4.0|~5.0", + "symfony/config" : "~4.0|~5.0", + "symfony/http-kernel": "~4.0|~5.0", + "ovh/ovh": "^2.0" }, "autoload": { "psr-4": { "CoopTilleuls\\OvhBundle\\": "" } }, "require-dev": { - "phpspec/phpspec": "~2.1", - "henrikbjorn/phpspec-code-coverage": "~1.0", - "satooshi/php-coveralls": "~0.6" + "phpspec/phpspec": "^2.1", + "friends-of-phpspec/phpspec-code-coverage": "^1.0", + "php-coveralls/php-coveralls": "^2.0" } } diff --git a/phpspec.yml b/phpspec.yml index edd01cd..b15575a 100644 --- a/phpspec.yml +++ b/phpspec.yml @@ -1,5 +1,5 @@ extensions: - - PhpSpec\Extension\CodeCoverageExtension + - LeanPHP\PhpSpec\CodeCoverage\CodeCoverageExtension code_coverage: format: clover diff --git a/spec/CoopTilleuls/OvhBundle/DependencyInjection/CoopTilleulsOvhExtensionSpec.php b/spec/CoopTilleuls/OvhBundle/DependencyInjection/CoopTilleulsOvhExtensionSpec.php index 347fe56..86b6679 100644 --- a/spec/CoopTilleuls/OvhBundle/DependencyInjection/CoopTilleulsOvhExtensionSpec.php +++ b/spec/CoopTilleuls/OvhBundle/DependencyInjection/CoopTilleulsOvhExtensionSpec.php @@ -45,6 +45,7 @@ function it_loads(ContainerBuilder $container) $container->setDefinition('coop_tilleuls_ovh.api', Argument::type('Symfony\Component\DependencyInjection\Definition'))->shouldBeCalled(); $container->setAlias('ovh', Argument::type('Symfony\Component\DependencyInjection\Alias'))->shouldBeCalled(); $container->setAlias('Ovh\Api', Argument::type('Symfony\Component\DependencyInjection\Alias'))->shouldBeCalled(); + $container->removeBindings('coop_tilleuls_ovh.api')->shouldBeCalled(); $configs = array( array(