From fc1ed2425c38ca6d7a4f25aec4ac08d30b52430a Mon Sep 17 00:00:00 2001 From: Tudor Placinta Date: Tue, 28 Jun 2022 15:26:19 +0300 Subject: [PATCH] Symfony fixes --- DependencyInjection/Configuration.php | 8 +- .../Service/JsonFileComparatorTest.php | 4 +- composer.json | 3 +- composer.lock | 86 ++----------------- 4 files changed, 13 insertions(+), 88 deletions(-) diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index 532531c..f6287e3 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -8,8 +8,8 @@ class Configuration implements ConfigurationInterface { public function getConfigTreeBuilder() { - $treeBuilder = new TreeBuilder(); - $rootNode = $treeBuilder->root('test_api_rest'); + $treeBuilder = new TreeBuilder('test_api_rest'); + $rootNode = $treeBuilder->getRootNode(); $rootNode ->children() @@ -31,6 +31,4 @@ public function getConfigTreeBuilder() return $treeBuilder; } -} - -?> \ No newline at end of file +} \ No newline at end of file diff --git a/Tests/TestApiRestBundle/Service/JsonFileComparatorTest.php b/Tests/TestApiRestBundle/Service/JsonFileComparatorTest.php index 7695752..b40d118 100644 --- a/Tests/TestApiRestBundle/Service/JsonFileComparatorTest.php +++ b/Tests/TestApiRestBundle/Service/JsonFileComparatorTest.php @@ -18,14 +18,14 @@ class JsonFileComparatorTest extends TestCase protected function buildJsonFileComparator($left, $right, $matcherReturn = true, $sub_right = null) { $matcher = $this->getMockBuilder('EveryCheck\TestApiRestBundle\Matcher\Matcher') - ->setMethods(['match','getError']) + ->addMethods(['match','getError']) ->getMock(); $matcher->method('match')->willReturn($matcherReturn); $matcher->method('getError')->willReturn('mock error'); $jsonFileComparator = $this->getMockBuilder('EveryCheck\TestApiRestBundle\Service\JsonFileComparator') - ->setMethods(['loadJSONFromString','loadJSONFromFile']) + ->addMethods(['loadJSONFromString','loadJSONFromFile']) ->setConstructorArgs([$matcher]) ->getMock(); diff --git a/composer.json b/composer.json index 762f512..4c33291 100644 --- a/composer.json +++ b/composer.json @@ -24,8 +24,7 @@ "symfony/monolog-bundle": "^3.1", "symfony/polyfill-apcu": "^1.0", "symfony/swiftmailer-bundle": "^3.1", - "symfony/symfony": "4.4.|^5.4", - "symfony/web-server-bundle": "^4.4|^5.4", + "symfony/symfony": "^5.4", "twig/extensions": "^1.5" }, "autoload": { diff --git a/composer.lock b/composer.lock index 5c05b7e..1515106 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "87d8ba220c3b5b6155be032e6a7a800b", + "content-hash": "414cbcd4467ad900cfcee1a201e4b003", "packages": [ { "name": "coduo/php-matcher", @@ -3140,16 +3140,16 @@ }, { "name": "symfony/contracts", - "version": "v2.5.1", + "version": "v2.5.2", "source": { "type": "git", "url": "https://github.com/symfony/contracts.git", - "reference": "3373e197760d9ca59c56ae508ce66bdc55da4f4d" + "reference": "d3da2932c17d3cc0d6cd167518cc63ab7b909f38" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/contracts/zipball/3373e197760d9ca59c56ae508ce66bdc55da4f4d", - "reference": "3373e197760d9ca59c56ae508ce66bdc55da4f4d", + "url": "https://api.github.com/repos/symfony/contracts/zipball/d3da2932c17d3cc0d6cd167518cc63ab7b909f38", + "reference": "d3da2932c17d3cc0d6cd167518cc63ab7b909f38", "shasum": "" }, "require": { @@ -3221,7 +3221,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/contracts/tree/v2.5.1" + "source": "https://github.com/symfony/contracts/tree/v2.5.2" }, "funding": [ { @@ -3237,7 +3237,7 @@ "type": "tidelift" } ], - "time": "2022-03-13T20:07:29+00:00" + "time": "2022-06-27T16:58:25+00:00" }, { "name": "symfony/phpunit-bridge", @@ -6683,78 +6683,6 @@ "abandoned": "symfony/mailer", "time": "2022-02-06T08:03:40+00:00" }, - { - "name": "symfony/web-server-bundle", - "version": "v4.4.37", - "source": { - "type": "git", - "url": "https://github.com/symfony/web-server-bundle.git", - "reference": "8cbf9d741b57f4dc298478768865d2e8385552c0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/web-server-bundle/zipball/8cbf9d741b57f4dc298478768865d2e8385552c0", - "reference": "8cbf9d741b57f4dc298478768865d2e8385552c0", - "shasum": "" - }, - "require": { - "php": ">=7.1.3", - "symfony/config": "^3.4|^4.0|^5.0", - "symfony/console": "^3.4|^4.0|^5.0", - "symfony/dependency-injection": "^3.4|^4.0|^5.0", - "symfony/http-kernel": "^3.4|^4.0|^5.0", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-php80": "^1.16", - "symfony/process": "^3.4.2|^4.0.2|^5.0" - }, - "suggest": { - "symfony/expression-language": "For using the filter option of the log server.", - "symfony/monolog-bridge": "For using the log server." - }, - "type": "symfony-bundle", - "autoload": { - "psr-4": { - "Symfony\\Bundle\\WebServerBundle\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides commands for running applications using the PHP built-in web server", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/web-server-bundle/tree/v4.4.37" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-01-02T09:41:36+00:00" - }, { "name": "twig/extensions", "version": "v1.5.4",