From ff47516ea079a7075f14f9126229056a88d6eeaa Mon Sep 17 00:00:00 2001 From: "Alexander M. Turek" Date: Mon, 7 Sep 2020 22:06:42 +0200 Subject: [PATCH 01/19] Upgrade PHPUnit to 8.5 (php 7.2) and 9.3 (php >= 7.3). --- phpunit | 6 +++--- .../Bridge/PhpUnit/Legacy/SymfonyTestsListenerTrait.php | 4 ++-- src/Symfony/Bundle/FrameworkBundle/composer.json | 2 +- src/Symfony/Component/Form/composer.json | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/phpunit b/phpunit index 2b4412dc4d..e1b1aea0e4 100755 --- a/phpunit +++ b/phpunit @@ -12,10 +12,10 @@ if (!getenv('SYMFONY_PHPUNIT_VERSION')) { if (false === getenv('SYMFONY_PHPUNIT_REMOVE_RETURN_TYPEHINT') && false !== strpos(@file_get_contents(__DIR__.'/src/Symfony/Component/HttpKernel/Kernel.php'), 'const MAJOR_VERSION = 3;')) { putenv('SYMFONY_PHPUNIT_REMOVE_RETURN_TYPEHINT=1'); } - if (\PHP_VERSION_ID >= 80000) { - putenv('SYMFONY_PHPUNIT_VERSION=9.3'); + if (\PHP_VERSION_ID < 70300) { + putenv('SYMFONY_PHPUNIT_VERSION=8.5'); } else { - putenv('SYMFONY_PHPUNIT_VERSION=8.3'); + putenv('SYMFONY_PHPUNIT_VERSION=9.3'); } } elseif (\PHP_VERSION_ID >= 70000) { putenv('SYMFONY_PHPUNIT_VERSION=6.5'); diff --git a/src/Symfony/Bridge/PhpUnit/Legacy/SymfonyTestsListenerTrait.php b/src/Symfony/Bridge/PhpUnit/Legacy/SymfonyTestsListenerTrait.php index b6d05cb0f1..dc579e408f 100644 --- a/src/Symfony/Bridge/PhpUnit/Legacy/SymfonyTestsListenerTrait.php +++ b/src/Symfony/Bridge/PhpUnit/Legacy/SymfonyTestsListenerTrait.php @@ -49,8 +49,8 @@ class SymfonyTestsListenerTrait \PHPUnit_Util_Blacklist::$blacklistedClassNames[__CLASS__] = 2; } elseif (method_exists('PHPUnit\Util\Blacklist', 'addDirectory')) { eval(" // PHP 5.3 compat - (new BlackList())->getBlacklistedDirectories(); - Blacklist::addDirectory(\dirname((new \ReflectionClass(__CLASS__))->getFileName(), 2)); + (new \PHPUnit\Util\Blacklist())->getBlacklistedDirectories(); + \PHPUnit\Util\Blacklist::addDirectory(\dirname(__FILE__, 2)); "); } else { Blacklist::$blacklistedClassNames[__CLASS__] = 2; diff --git a/src/Symfony/Bundle/FrameworkBundle/composer.json b/src/Symfony/Bundle/FrameworkBundle/composer.json index aad4e3fc61..c9750dc8df 100644 --- a/src/Symfony/Bundle/FrameworkBundle/composer.json +++ b/src/Symfony/Bundle/FrameworkBundle/composer.json @@ -25,7 +25,7 @@ "symfony/debug": "~2.8|~3.0|~4.0", "symfony/event-dispatcher": "~3.4|~4.0", "symfony/http-foundation": "^3.4.38|^4.3", - "symfony/http-kernel": "^3.4.31|^4.3.4", + "symfony/http-kernel": "^3.4.44|^4.3.4", "symfony/polyfill-mbstring": "~1.0", "symfony/filesystem": "~2.8|~3.0|~4.0", "symfony/finder": "~2.8|~3.0|~4.0", diff --git a/src/Symfony/Component/Form/composer.json b/src/Symfony/Component/Form/composer.json index c69ac107bd..5e2010acbe 100644 --- a/src/Symfony/Component/Form/composer.json +++ b/src/Symfony/Component/Form/composer.json @@ -26,7 +26,7 @@ }, "require-dev": { "doctrine/collections": "~1.0", - "symfony/validator": "^3.4.3|^4.0.3", + "symfony/validator": "^3.4.44|^4.0.3", "symfony/dependency-injection": "~3.3|~4.0", "symfony/config": "~2.7|~3.0|~4.0", "symfony/expression-language": "~3.4|~4.0", From 4fcb41c3ba49a0b27073ef9a5a3b4911a8d85c51 Mon Sep 17 00:00:00 2001 From: vladyslavstartsev <17382248+vladyslavstartsev@users.noreply.github.com> Date: Mon, 14 Sep 2020 19:22:49 +0300 Subject: [PATCH 02/19] Change 'cache_key' to AbstractRendererEngine::CACHE_KEY_VAR The purpose of this change is to find all usages of AbstractRendererEngine::CACHE_KEY_VAR. Currently, if you search for AbstractRendererEngine::CACHE_KEY_VAR you will see only access to it, i.e. (`$view->vars[AbstractRendererEngine::CACHE_KEY_VAR]`), but you can't find it in write level. With this pull request you can see where is was used for write. --- src/Symfony/Component/Form/Extension/Core/Type/BaseType.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/Form/Extension/Core/Type/BaseType.php b/src/Symfony/Component/Form/Extension/Core/Type/BaseType.php index 05d215f63c..2b3c25889b 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/BaseType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/BaseType.php @@ -11,6 +11,7 @@ namespace Symfony\Component\Form\Extension\Core\Type; +use Symfony\Component\Form\AbstractRendererEngine; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Form\FormInterface; @@ -100,7 +101,7 @@ abstract class BaseType extends AbstractType // collection form have different types (dynamically), they should // be rendered differently. // https://github.com/symfony/symfony/issues/5038 - 'cache_key' => $uniqueBlockPrefix.'_'.$form->getConfig()->getType()->getBlockPrefix(), + AbstractRendererEngine::CACHE_KEY_VAR => $uniqueBlockPrefix.'_'.$form->getConfig()->getType()->getBlockPrefix(), ]); } From ab1a96c999cdc4c519e8a2f5689c807c662cd01c Mon Sep 17 00:00:00 2001 From: Youssef BENHSSAIEN Date: Sun, 13 Sep 2020 11:20:47 +0200 Subject: [PATCH 03/19] [HttpClient][HttpClientTrait] don't calculate alternatives if option is auth_ntlm --- .../Component/HttpClient/HttpClientTrait.php | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/Symfony/Component/HttpClient/HttpClientTrait.php b/src/Symfony/Component/HttpClient/HttpClientTrait.php index d5ec607bc9..8bf573b543 100644 --- a/src/Symfony/Component/HttpClient/HttpClientTrait.php +++ b/src/Symfony/Component/HttpClient/HttpClientTrait.php @@ -111,7 +111,7 @@ trait HttpClientTrait } if (isset($options['auth_bearer']) && (!\is_string($options['auth_bearer']) || !preg_match('{^[-._=~+/0-9a-zA-Z]++$}', $options['auth_bearer']))) { - throw new InvalidArgumentException(sprintf('Option "auth_bearer" must be a string containing only characters from the base 64 alphabet, %s given.', \is_string($options['auth_bearer']) ? 'invalid string' : '"'.\gettype($options['auth_bearer']).'"')); + throw new InvalidArgumentException(sprintf('Option "auth_bearer" must be a string containing only characters from the base 64 alphabet, '.(\is_string($options['auth_bearer']) ? 'invalid string given.' : '"%s" given.'), \gettype($options['auth_bearer']))); } if (isset($options['auth_basic'], $options['auth_bearer'])) { @@ -197,6 +197,16 @@ trait HttpClientTrait continue; } + if ('auth_ntlm' === $name) { + if (!\extension_loaded('curl')) { + $msg = 'try installing the "curl" extension to use "%s" instead.'; + } else { + $msg = 'try using "%s" instead.'; + } + + throw new InvalidArgumentException(sprintf('Option "auth_ntlm" is not supported by "%s", '.$msg, __CLASS__, CurlHttpClient::class)); + } + $alternatives = []; foreach ($defaultOptions as $key => $v) { @@ -205,10 +215,6 @@ trait HttpClientTrait } } - if ('auth_ntlm' === $name) { - throw new InvalidArgumentException(sprintf('Option "auth_ntlm" is not supported by "%s", try using CurlHttpClient instead.', __CLASS__)); - } - throw new InvalidArgumentException(sprintf('Unsupported option "%s" passed to "%s", did you mean "%s"?', $name, __CLASS__, implode('", "', $alternatives ?: array_keys($defaultOptions)))); } From ed1bffeed7b8a2de6d8816bfba2c57a8f01c14ab Mon Sep 17 00:00:00 2001 From: Alexey Kopytko Date: Tue, 15 Sep 2020 16:51:47 +0900 Subject: [PATCH 04/19] [PhpUnitBridge] Fix error with ReflectionClass --- src/Symfony/Bridge/PhpUnit/Legacy/CoverageListenerTrait.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Bridge/PhpUnit/Legacy/CoverageListenerTrait.php b/src/Symfony/Bridge/PhpUnit/Legacy/CoverageListenerTrait.php index bd8a452777..c1b276cea2 100644 --- a/src/Symfony/Bridge/PhpUnit/Legacy/CoverageListenerTrait.php +++ b/src/Symfony/Bridge/PhpUnit/Legacy/CoverageListenerTrait.php @@ -109,7 +109,7 @@ class CoverageListenerTrait // Exclude internal classes; PHPUnit 9.1+ is picky about tests covering, say, a \RuntimeException $covers = array_filter($covers, function ($class) { - $reflector = new ReflectionClass($class); + $reflector = new \ReflectionClass($class); return $reflector->isUserDefined(); }); From d3f909bff31655838d91a693837de8e313503326 Mon Sep 17 00:00:00 2001 From: SenTisso <38100632+SenTisso@users.noreply.github.com> Date: Sat, 12 Sep 2020 17:15:36 +0200 Subject: [PATCH 05/19] [Console] work around disabled putenv() --- src/Symfony/Component/Console/Application.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Component/Console/Application.php b/src/Symfony/Component/Console/Application.php index da5c98756e..bc3f23b5e4 100644 --- a/src/Symfony/Component/Console/Application.php +++ b/src/Symfony/Component/Console/Application.php @@ -114,8 +114,10 @@ class Application implements ResetInterface */ public function run(InputInterface $input = null, OutputInterface $output = null) { - putenv('LINES='.$this->terminal->getHeight()); - putenv('COLUMNS='.$this->terminal->getWidth()); + if (\function_exists('putenv')) { + @putenv('LINES='.$this->terminal->getHeight()); + @putenv('COLUMNS='.$this->terminal->getWidth()); + } if (null === $input) { $input = new ArgvInput(); @@ -980,7 +982,9 @@ class Application implements ResetInterface $input->setInteractive(false); } - putenv('SHELL_VERBOSITY='.$shellVerbosity); + if (\function_exists('putenv')) { + @putenv('SHELL_VERBOSITY='.$shellVerbosity); + } $_ENV['SHELL_VERBOSITY'] = $shellVerbosity; $_SERVER['SHELL_VERBOSITY'] = $shellVerbosity; } From 94e390b96a27a631039d9ca5ea4c1eee59258ffc Mon Sep 17 00:00:00 2001 From: Laurent VOULLEMIER Date: Tue, 15 Sep 2020 17:33:03 +0200 Subject: [PATCH 06/19] [FrameworkBundle] Fix error in xsd which prevent to register more than one metadata --- .../Resources/config/schema/symfony-1.0.xsd | 2 +- .../Tests/DependencyInjection/Fixtures/php/workflows.php | 4 ++++ .../Tests/DependencyInjection/Fixtures/xml/workflows.xml | 4 ++++ .../Tests/DependencyInjection/Fixtures/yml/workflows.yml | 3 +++ .../Tests/DependencyInjection/FrameworkExtensionTest.php | 9 ++++++++- 5 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Resources/config/schema/symfony-1.0.xsd b/src/Symfony/Bundle/FrameworkBundle/Resources/config/schema/symfony-1.0.xsd index 5931d1261b..faa88efbbf 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Resources/config/schema/symfony-1.0.xsd +++ b/src/Symfony/Bundle/FrameworkBundle/Resources/config/schema/symfony-1.0.xsd @@ -348,7 +348,7 @@ - + diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/workflows.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/workflows.php index 7c7f7ed0b4..d0abe507e5 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/workflows.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/workflows.php @@ -10,6 +10,10 @@ $container->loadFromExtension('framework', [ FrameworkExtensionTest::class, ], 'initial_marking' => ['draft'], + 'metadata' => [ + 'title' => 'article workflow', + 'description' => 'workflow for articles' + ], 'places' => [ 'draft', 'wait_for_journalist', diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/workflows.xml b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/workflows.xml index 0c6a638df4..290ab50e7d 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/workflows.xml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/workflows.xml @@ -35,6 +35,10 @@ approved_by_spellchecker published + + article workflow + workflow for articles + diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/workflows.yml b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/workflows.yml index 225106383d..e4ac9c0189 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/workflows.yml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/workflows.yml @@ -5,6 +5,9 @@ framework: supports: - Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\FrameworkExtensionTest initial_marking: [draft] + metadata: + title: article workflow + description: workflow for articles places: # simple format - draft diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php index 77a3c8c9c6..f28402eaad 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php @@ -55,6 +55,7 @@ use Symfony\Component\Validator\DependencyInjection\AddConstraintValidatorsPass; use Symfony\Component\Validator\Mapping\Loader\PropertyInfoLoader; use Symfony\Component\Validator\Util\LegacyTranslatorProxy; use Symfony\Component\Workflow; +use Symfony\Component\Workflow\Metadata\InMemoryMetadataStore; use Symfony\Contracts\Translation\TranslatorInterface; abstract class FrameworkExtensionTest extends TestCase @@ -242,6 +243,12 @@ abstract class FrameworkExtensionTest extends TestCase ); $this->assertCount(4, $workflowDefinition->getArgument(1)); $this->assertSame(['draft'], $workflowDefinition->getArgument(2)); + $metadataStoreDefinition = $workflowDefinition->getArgument(3); + $this->assertSame(InMemoryMetadataStore::class, $metadataStoreDefinition->getClass()); + $this->assertSame([ + 'title' => 'article workflow', + 'description' => 'workflow for articles', + ], $metadataStoreDefinition->getArgument(0)); $this->assertTrue($container->hasDefinition('state_machine.pull_request'), 'State machine is registered as a service'); $this->assertSame('state_machine.abstract', $container->getDefinition('state_machine.pull_request')->getParent()); @@ -266,7 +273,7 @@ abstract class FrameworkExtensionTest extends TestCase $metadataStoreDefinition = $stateMachineDefinition->getArgument(3); $this->assertInstanceOf(Definition::class, $metadataStoreDefinition); - $this->assertSame(Workflow\Metadata\InMemoryMetadataStore::class, $metadataStoreDefinition->getClass()); + $this->assertSame(InMemoryMetadataStore::class, $metadataStoreDefinition->getClass()); $workflowMetadata = $metadataStoreDefinition->getArgument(0); $this->assertSame(['title' => 'workflow title'], $workflowMetadata); From 69187ac9cec6b7c49835b7f6f83677709c15130c Mon Sep 17 00:00:00 2001 From: Wouter de Jong Date: Wed, 16 Sep 2020 12:14:09 +0200 Subject: [PATCH 07/19] Fixed exception message formatting --- .../FrameworkBundle/DependencyInjection/Configuration.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php index cbdc103ee1..d23bdbc480 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php @@ -1325,7 +1325,7 @@ class Configuration implements ConfigurationInterface return $middleware; } if (1 < \count($middleware)) { - throw new \InvalidArgumentException(sprintf('Invalid middleware at path "framework.messenger": a map with a single factory id as key and its arguments as value was expected, %s given.', json_encode($middleware))); + throw new \InvalidArgumentException('Invalid middleware at path "framework.messenger": a map with a single factory id as key and its arguments as value was expected, '.json_encode($middleware).' given.'); } return [ From 73647e5ffefced91db4676df95383eed076d61cb Mon Sep 17 00:00:00 2001 From: "Alexander M. Turek" Date: Wed, 16 Sep 2020 23:01:09 +0200 Subject: [PATCH 08/19] Upgrade PHPUnit to 8.5 (php 7.2) and 9.3 (php >= 7.3). --- phpunit | 6 +++--- src/Symfony/Component/Form/composer.json | 2 +- src/Symfony/Component/HttpClient/composer.json | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/phpunit b/phpunit index 2b4412dc4d..e1b1aea0e4 100755 --- a/phpunit +++ b/phpunit @@ -12,10 +12,10 @@ if (!getenv('SYMFONY_PHPUNIT_VERSION')) { if (false === getenv('SYMFONY_PHPUNIT_REMOVE_RETURN_TYPEHINT') && false !== strpos(@file_get_contents(__DIR__.'/src/Symfony/Component/HttpKernel/Kernel.php'), 'const MAJOR_VERSION = 3;')) { putenv('SYMFONY_PHPUNIT_REMOVE_RETURN_TYPEHINT=1'); } - if (\PHP_VERSION_ID >= 80000) { - putenv('SYMFONY_PHPUNIT_VERSION=9.3'); + if (\PHP_VERSION_ID < 70300) { + putenv('SYMFONY_PHPUNIT_VERSION=8.5'); } else { - putenv('SYMFONY_PHPUNIT_VERSION=8.3'); + putenv('SYMFONY_PHPUNIT_VERSION=9.3'); } } elseif (\PHP_VERSION_ID >= 70000) { putenv('SYMFONY_PHPUNIT_VERSION=6.5'); diff --git a/src/Symfony/Component/Form/composer.json b/src/Symfony/Component/Form/composer.json index 51bbdba436..88ae84a4f8 100644 --- a/src/Symfony/Component/Form/composer.json +++ b/src/Symfony/Component/Form/composer.json @@ -27,7 +27,7 @@ }, "require-dev": { "doctrine/collections": "~1.0", - "symfony/validator": "^3.4.31|^4.3.4|^5.0", + "symfony/validator": "^3.4.44|^4.3.4|^5.0", "symfony/dependency-injection": "^3.4|^4.0|^5.0", "symfony/expression-language": "^3.4|^4.0|^5.0", "symfony/config": "^3.4|^4.0|^5.0", diff --git a/src/Symfony/Component/HttpClient/composer.json b/src/Symfony/Component/HttpClient/composer.json index 2fa79adc82..3674c189a6 100644 --- a/src/Symfony/Component/HttpClient/composer.json +++ b/src/Symfony/Component/HttpClient/composer.json @@ -23,7 +23,7 @@ "require": { "php": ">=7.1.3", "psr/log": "^1.0", - "symfony/http-client-contracts": "^1.1.8|^2", + "symfony/http-client-contracts": "^1.1.10|^2", "symfony/polyfill-php73": "^1.11", "symfony/service-contracts": "^1.0|^2" }, From 45fa6b8f244e6d399fd2082761436cb905e878e3 Mon Sep 17 00:00:00 2001 From: "Alexander M. Turek" Date: Thu, 17 Sep 2020 00:10:08 +0200 Subject: [PATCH 09/19] [HttpClient] Support for CURLOPT_LOCALPORT. --- .../Component/HttpClient/CurlHttpClient.php | 9 ++++++++- .../HttpClient/Tests/CurlHttpClientTest.php | 15 +++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/HttpClient/CurlHttpClient.php b/src/Symfony/Component/HttpClient/CurlHttpClient.php index 8a87e29d3f..9cb7fb5295 100644 --- a/src/Symfony/Component/HttpClient/CurlHttpClient.php +++ b/src/Symfony/Component/HttpClient/CurlHttpClient.php @@ -267,7 +267,14 @@ final class CurlHttpClient implements HttpClientInterface, LoggerAwareInterface, } if ($options['bindto']) { - $curlopts[file_exists($options['bindto']) ? \CURLOPT_UNIX_SOCKET_PATH : \CURLOPT_INTERFACE] = $options['bindto']; + if (file_exists($options['bindto'])) { + $curlopts[\CURLOPT_UNIX_SOCKET_PATH] = $options['bindto']; + } elseif (preg_match('/^(.*):(\d+)$/', $options['bindto'], $matches)) { + $curlopts[\CURLOPT_INTERFACE] = $matches[1]; + $curlopts[\CURLOPT_LOCALPORT] = $matches[2]; + } else { + $curlopts[\CURLOPT_INTERFACE] = $options['bindto']; + } } if (0 < $options['max_duration']) { diff --git a/src/Symfony/Component/HttpClient/Tests/CurlHttpClientTest.php b/src/Symfony/Component/HttpClient/Tests/CurlHttpClientTest.php index 45362b1195..6793818d55 100644 --- a/src/Symfony/Component/HttpClient/Tests/CurlHttpClientTest.php +++ b/src/Symfony/Component/HttpClient/Tests/CurlHttpClientTest.php @@ -35,6 +35,21 @@ class CurlHttpClientTest extends HttpClientTestCase return new CurlHttpClient(); } + public function testBindToPort() + { + $client = $this->getHttpClient(__FUNCTION__); + $response = $client->request('GET', 'http://localhost:8057', ['bindto' => '127.0.0.1:9876']); + $response->getStatusCode(); + + $r = new \ReflectionProperty($response, 'handle'); + $r->setAccessible(true); + + $curlInfo = curl_getinfo($r->getValue($response)); + + self::assertSame('127.0.0.1', $curlInfo['local_ip']); + self::assertSame(9876, $curlInfo['local_port']); + } + /** * @requires PHP 7.2.17 */ From 05a9660a1e5a51b8dcd8bc6c696c35931a80ec77 Mon Sep 17 00:00:00 2001 From: Tom Klingenberg Date: Thu, 17 Sep 2020 01:48:05 +0200 Subject: [PATCH 10/19] remove superfluous cast in YAML component. minor. --- src/Symfony/Component/Yaml/Parser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Yaml/Parser.php b/src/Symfony/Component/Yaml/Parser.php index 51a0fa9127..9cfd1d45cb 100644 --- a/src/Symfony/Component/Yaml/Parser.php +++ b/src/Symfony/Component/Yaml/Parser.php @@ -725,7 +725,7 @@ class Parser if (self::preg_match('/^(?:'.self::TAG_PATTERN.' +)?'.self::BLOCK_SCALAR_HEADER_PATTERN.'$/', $value, $matches)) { $modifiers = isset($matches['modifiers']) ? $matches['modifiers'] : ''; - $data = $this->parseBlockScalar($matches['separator'], preg_replace('#\d+#', '', $modifiers), (int) abs((int) $modifiers)); + $data = $this->parseBlockScalar($matches['separator'], preg_replace('#\d+#', '', $modifiers), abs((int) $modifiers)); if ('' !== $matches['tag']) { if ('!!binary' === $matches['tag']) { From 981a11beed0a2e348b5f4989458419d4b53dc840 Mon Sep 17 00:00:00 2001 From: David Molineus Date: Wed, 16 Sep 2020 17:27:48 +0200 Subject: [PATCH 11/19] [HttpKernel] Do not override max_redirects option in HttpClientKernel --- .../Component/HttpKernel/HttpClientKernel.php | 3 +- .../HttpKernel/Tests/HttpClientKernelTest.php | 46 +++++++++++++++++++ .../Component/HttpKernel/composer.json | 1 + 3 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 src/Symfony/Component/HttpKernel/Tests/HttpClientKernelTest.php diff --git a/src/Symfony/Component/HttpKernel/HttpClientKernel.php b/src/Symfony/Component/HttpKernel/HttpClientKernel.php index 2056a673a6..7acb04c893 100644 --- a/src/Symfony/Component/HttpKernel/HttpClientKernel.php +++ b/src/Symfony/Component/HttpKernel/HttpClientKernel.php @@ -35,7 +35,7 @@ final class HttpClientKernel implements HttpKernelInterface public function __construct(HttpClientInterface $client = null) { - if (!class_exists(HttpClient::class)) { + if (null === $client && !class_exists(HttpClient::class)) { throw new \LogicException(sprintf('You cannot use "%s" as the HttpClient component is not installed. Try running "composer require symfony/http-client".', __CLASS__)); } @@ -53,7 +53,6 @@ final class HttpClientKernel implements HttpKernelInterface $response = $this->client->request($request->getMethod(), $request->getUri(), [ 'headers' => $headers, 'body' => $body, - 'max_redirects' => 0, ] + $request->attributes->get('http_client_options', [])); $response = new Response($response->getContent(!$catch), $response->getStatusCode(), $response->getHeaders(!$catch)); diff --git a/src/Symfony/Component/HttpKernel/Tests/HttpClientKernelTest.php b/src/Symfony/Component/HttpKernel/Tests/HttpClientKernelTest.php new file mode 100644 index 0000000000..2b904bf9a2 --- /dev/null +++ b/src/Symfony/Component/HttpKernel/Tests/HttpClientKernelTest.php @@ -0,0 +1,46 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpKernel\HttpClientKernel; +use Symfony\Contracts\HttpClient\HttpClientInterface; +use Symfony\Contracts\HttpClient\ResponseInterface; + +class HttpClientKernelTest extends TestCase +{ + public function testHandlePassesMaxRedirectsHttpClientOption() + { + $request = new Request(); + $request->attributes->set('http_client_options', ['max_redirects' => 50]); + + $response = $this->getMockBuilder(ResponseInterface::class)->getMock(); + $response->expects($this->once())->method('getStatusCode')->willReturn(200); + + $client = $this->getMockBuilder(HttpClientInterface::class)->getMock(); + $client + ->expects($this->once()) + ->method('request') + ->willReturnCallback(function (string $method, string $uri, array $options) use ($request, $response) { + $this->assertSame($request->getMethod(), $method); + $this->assertSame($request->getUri(), $uri); + $this->assertArrayHasKey('max_redirects', $options); + $this->assertSame(50, $options['max_redirects']); + + return $response; + }); + + $kernel = new HttpClientKernel($client); + $kernel->handle($request); + } +} diff --git a/src/Symfony/Component/HttpKernel/composer.json b/src/Symfony/Component/HttpKernel/composer.json index 2ae07df884..1dce985571 100644 --- a/src/Symfony/Component/HttpKernel/composer.json +++ b/src/Symfony/Component/HttpKernel/composer.json @@ -19,6 +19,7 @@ "php": ">=7.1.3", "symfony/error-handler": "^4.4", "symfony/event-dispatcher": "^4.4", + "symfony/http-client-contracts": "^1.1|^2", "symfony/http-foundation": "^4.4|^5.0", "symfony/polyfill-ctype": "^1.8", "symfony/polyfill-php73": "^1.9", From c2c03e050fad47a77afbe0437e2e76b58f581a19 Mon Sep 17 00:00:00 2001 From: Lars Strojny Date: Thu, 17 Sep 2020 11:19:24 +0200 Subject: [PATCH 12/19] [Cache] Allow cache tags to be objects implementing __toString() --- src/Symfony/Component/Cache/CacheItem.php | 5 ++-- .../Component/Cache/Tests/CacheItemTest.php | 5 +++- .../Cache/Tests/Fixtures/StringableTag.php | 30 +++++++++++++++++++ 3 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 src/Symfony/Component/Cache/Tests/Fixtures/StringableTag.php diff --git a/src/Symfony/Component/Cache/CacheItem.php b/src/Symfony/Component/Cache/CacheItem.php index 7245fe8207..3de8ddc81c 100644 --- a/src/Symfony/Component/Cache/CacheItem.php +++ b/src/Symfony/Component/Cache/CacheItem.php @@ -119,9 +119,10 @@ final class CacheItem implements ItemInterface $tags = [$tags]; } foreach ($tags as $tag) { - if (!\is_string($tag)) { - throw new InvalidArgumentException(sprintf('Cache tag must be string, "%s" given.', \is_object($tag) ? \get_class($tag) : \gettype($tag))); + if (!\is_string($tag) && !(\is_object($tag) && method_exists($tag, '__toString'))) { + throw new InvalidArgumentException(sprintf('Cache tag must be string or object that implements __toString(), "%s" given.', \is_object($tag) ? \get_class($tag) : \gettype($tag))); } + $tag = (string) $tag; if (isset($this->newMetadata[self::METADATA_TAGS][$tag])) { continue; } diff --git a/src/Symfony/Component/Cache/Tests/CacheItemTest.php b/src/Symfony/Component/Cache/Tests/CacheItemTest.php index 3b756f571f..01914e4a36 100644 --- a/src/Symfony/Component/Cache/Tests/CacheItemTest.php +++ b/src/Symfony/Component/Cache/Tests/CacheItemTest.php @@ -13,6 +13,7 @@ namespace Symfony\Component\Cache\Tests; use PHPUnit\Framework\TestCase; use Symfony\Component\Cache\CacheItem; +use Symfony\Component\Cache\Tests\Fixtures\StringableTag; class CacheItemTest extends TestCase { @@ -61,9 +62,11 @@ class CacheItemTest extends TestCase $this->assertSame($item, $item->tag('foo')); $this->assertSame($item, $item->tag(['bar', 'baz'])); + $this->assertSame($item, $item->tag(new StringableTag('qux'))); + $this->assertSame($item, $item->tag([new StringableTag('quux'), new StringableTag('quuux')])); (\Closure::bind(function () use ($item) { - $this->assertSame(['foo' => 'foo', 'bar' => 'bar', 'baz' => 'baz'], $item->newMetadata[CacheItem::METADATA_TAGS]); + $this->assertSame(['foo' => 'foo', 'bar' => 'bar', 'baz' => 'baz', 'qux' => 'qux', 'quux' => 'quux', 'quuux' => 'quuux'], $item->newMetadata[CacheItem::METADATA_TAGS]); }, $this, CacheItem::class))(); } diff --git a/src/Symfony/Component/Cache/Tests/Fixtures/StringableTag.php b/src/Symfony/Component/Cache/Tests/Fixtures/StringableTag.php new file mode 100644 index 0000000000..caaf55c026 --- /dev/null +++ b/src/Symfony/Component/Cache/Tests/Fixtures/StringableTag.php @@ -0,0 +1,30 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Cache\Tests\Fixtures; + +class StringableTag +{ + /** + * @var string + */ + private $tag; + + public function __construct(string $tag) + { + $this->tag = $tag; + } + + public function __toString(): string + { + return $this->tag; + } +} From 6175d528e8b2e2111261a75d51ab72447dccaeeb Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Fri, 18 Sep 2020 10:10:16 +0200 Subject: [PATCH 13/19] deal with errors being thrown on PHP 8 --- src/Symfony/Component/VarDumper/Caster/SplCaster.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Symfony/Component/VarDumper/Caster/SplCaster.php b/src/Symfony/Component/VarDumper/Caster/SplCaster.php index 7ecbb577d2..360a1a416e 100644 --- a/src/Symfony/Component/VarDumper/Caster/SplCaster.php +++ b/src/Symfony/Component/VarDumper/Caster/SplCaster.php @@ -108,6 +108,14 @@ class SplCaster $a[$prefix.'⚠'] = 'The parent constructor was not called: the object is in an invalid state'; + return $a; + } catch (\Error $e) { + if ('Object not initialized' !== $e->getMessage()) { + throw $e; + } + + $a[$prefix.'⚠'] = 'The parent constructor was not called: the object is in an invalid state'; + return $a; } } From 080ea5a0f7ca785d17bff66b2605b5492c0cc24c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Sch=C3=A4dlich?= Date: Wed, 9 Sep 2020 13:50:45 +0200 Subject: [PATCH 14/19] [Translator] Make sure a null locale is handled properly --- .../Translation/Tests/TranslatorTest.php | 17 +++++++++++++++-- .../Component/Translation/Translator.php | 2 +- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Component/Translation/Tests/TranslatorTest.php b/src/Symfony/Component/Translation/Tests/TranslatorTest.php index c52898954f..6df6d71564 100644 --- a/src/Symfony/Component/Translation/Tests/TranslatorTest.php +++ b/src/Symfony/Component/Translation/Tests/TranslatorTest.php @@ -19,6 +19,19 @@ use Symfony\Component\Translation\Translator; class TranslatorTest extends TestCase { + private $defaultLocale; + + protected function setUp(): void + { + $this->defaultLocale = \Locale::getDefault(); + \Locale::setDefault('en'); + } + + protected function tearDown(): void + { + \Locale::setDefault($this->defaultLocale); + } + /** * @dataProvider getInvalidLocalesTests */ @@ -45,7 +58,7 @@ class TranslatorTest extends TestCase { $translator = new Translator(null); - $this->assertNull($translator->getLocale()); + $this->assertSame('en', $translator->getLocale()); } public function testSetGetLocale() @@ -87,7 +100,7 @@ class TranslatorTest extends TestCase $translator = new Translator('en'); $translator->setLocale(null); - $this->assertNull($translator->getLocale()); + $this->assertSame('en', $translator->getLocale()); } public function testGetCatalogue() diff --git a/src/Symfony/Component/Translation/Translator.php b/src/Symfony/Component/Translation/Translator.php index 0817959ea0..75ac17c788 100644 --- a/src/Symfony/Component/Translation/Translator.php +++ b/src/Symfony/Component/Translation/Translator.php @@ -171,7 +171,7 @@ class Translator implements LegacyTranslatorInterface, TranslatorInterface, Tran */ public function getLocale() { - return $this->locale; + return $this->locale ?? \Locale::getDefault(); } /** From 35b223aaa4e5bf4146179838b5fa7a26979df375 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Fri, 18 Sep 2020 10:50:51 +0200 Subject: [PATCH 15/19] fix parsing comments not prefixed by a space --- src/Symfony/Component/Yaml/Inline.php | 2 +- src/Symfony/Component/Yaml/Tests/InlineTest.php | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/Yaml/Inline.php b/src/Symfony/Component/Yaml/Inline.php index 5f8fd55c79..64ac48a9c6 100644 --- a/src/Symfony/Component/Yaml/Inline.php +++ b/src/Symfony/Component/Yaml/Inline.php @@ -127,7 +127,7 @@ class Inline } // some comments are allowed at the end - if (preg_replace('/\s+#.*$/A', '', substr($value, $i))) { + if (preg_replace('/\s*#.*$/A', '', substr($value, $i))) { throw new ParseException(sprintf('Unexpected characters near "%s".', substr($value, $i)), self::$parsedLineNumber + 1, $value, self::$parsedFilename); } diff --git a/src/Symfony/Component/Yaml/Tests/InlineTest.php b/src/Symfony/Component/Yaml/Tests/InlineTest.php index d1eb2f7a5d..f64cc682c3 100644 --- a/src/Symfony/Component/Yaml/Tests/InlineTest.php +++ b/src/Symfony/Component/Yaml/Tests/InlineTest.php @@ -860,4 +860,14 @@ class InlineTest extends TestCase { self::assertSame('-0123456789', Inline::parse('-0123456789')); } + + public function testParseCommentNotPrefixedBySpaces() + { + self::assertSame('foo', Inline::parse('"foo"#comment')); + } + + public function testParseUnquotedStringContainingHashTagNotPrefixedBySpace() + { + self::assertSame('foo#nocomment', Inline::parse('foo#nocomment')); + } } From 012ee4fa59549c64320b4cfe1bea166e9bd30ae3 Mon Sep 17 00:00:00 2001 From: Markus Fasselt Date: Fri, 18 Sep 2020 10:16:56 +0200 Subject: [PATCH 16/19] [Yaml Parser] Fix edge cases when parsing multiple documents --- src/Symfony/Component/Yaml/Parser.php | 1 + .../Component/Yaml/Tests/ParserTest.php | 33 +++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/src/Symfony/Component/Yaml/Parser.php b/src/Symfony/Component/Yaml/Parser.php index 9cfd1d45cb..ddd85676ea 100644 --- a/src/Symfony/Component/Yaml/Parser.php +++ b/src/Symfony/Component/Yaml/Parser.php @@ -153,6 +153,7 @@ class Parser $this->refs = []; $this->skippedLineNumbers = []; $this->locallySkippedLineNumbers = []; + $this->totalNumberOfLines = null; if (null !== $e) { throw $e; diff --git a/src/Symfony/Component/Yaml/Tests/ParserTest.php b/src/Symfony/Component/Yaml/Tests/ParserTest.php index b6e6a1141b..883d2c0c3d 100644 --- a/src/Symfony/Component/Yaml/Tests/ParserTest.php +++ b/src/Symfony/Component/Yaml/Tests/ParserTest.php @@ -2362,6 +2362,39 @@ YAML; $this->parser->parse($yaml) ); } + + /** + * This is a regression test for a bug where a YAML block with a nested multiline string using | was parsed without + * a trailing \n when a shorter YAML document was parsed before. + * + * When a shorter document was parsed before, the nested string did not have a \n at the end of the string, because + * the Parser thought it was the end of the file, even though it is not. + */ + public function testParsingMultipleDocuments() + { + $shortDocument = 'foo: bar'; + $longDocument = << ['b' => "row\nrow2\n"], 'c' => 'd']; + + // The parser was not used before, so there is a new line after row2 + $this->assertSame($expected, $this->parser->parse($longDocument)); + + $parser = new Parser(); + // The first parsing set and fixed the totalNumberOfLines in the Parser before, so parsing the short document here + // to reproduce the issue. If the issue would not have been fixed, the next assertion will fail + $parser->parse($shortDocument); + + // After the total number of lines has been rset the result will be the same as if a new parser was used + // (before, there was no \n after row2) + $this->assertSame($expected, $parser->parse($longDocument)); + } } class B From fb0d7beaaf53fec5c293f99175b618ebadd66631 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Fri, 18 Sep 2020 11:45:13 +0200 Subject: [PATCH 17/19] catch ValueError thrown on PHP 8 --- .../Component/Validator/Constraints/TimezoneValidator.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/Validator/Constraints/TimezoneValidator.php b/src/Symfony/Component/Validator/Constraints/TimezoneValidator.php index cf52239d0c..ab6b4eed62 100644 --- a/src/Symfony/Component/Validator/Constraints/TimezoneValidator.php +++ b/src/Symfony/Component/Validator/Constraints/TimezoneValidator.php @@ -78,7 +78,11 @@ class TimezoneValidator extends ConstraintValidator private static function getPhpTimezones(int $zone, string $countryCode = null): array { if (null !== $countryCode) { - return @\DateTimeZone::listIdentifiers($zone, $countryCode) ?: []; + try { + return @\DateTimeZone::listIdentifiers($zone, $countryCode) ?: []; + } catch (\ValueError $e) { + return []; + } } return \DateTimeZone::listIdentifiers($zone); From 86a7e3289ba3223f3912826719ef2a4a6fb1cc9f Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Fri, 18 Sep 2020 13:57:55 +0200 Subject: [PATCH 18/19] drop logger mock in favor of using the BufferingLogger --- .../Debug/TraceableEventDispatcherTest.php | 51 ++++++++++++------- .../Component/EventDispatcher/composer.json | 1 + 2 files changed, 35 insertions(+), 17 deletions(-) diff --git a/src/Symfony/Component/EventDispatcher/Tests/Debug/TraceableEventDispatcherTest.php b/src/Symfony/Component/EventDispatcher/Tests/Debug/TraceableEventDispatcherTest.php index 4f2f5be51b..4ba622d194 100644 --- a/src/Symfony/Component/EventDispatcher/Tests/Debug/TraceableEventDispatcherTest.php +++ b/src/Symfony/Component/EventDispatcher/Tests/Debug/TraceableEventDispatcherTest.php @@ -12,6 +12,7 @@ namespace Symfony\Component\EventDispatcher\Tests\Debug; use PHPUnit\Framework\TestCase; +use Symfony\Component\Debug\BufferingLogger; use Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher; use Symfony\Component\EventDispatcher\Event; use Symfony\Component\EventDispatcher\EventDispatcher; @@ -167,41 +168,57 @@ class TraceableEventDispatcherTest extends TestCase public function testLogger() { - $logger = $this->getMockBuilder('Psr\Log\LoggerInterface')->getMock(); + $logger = new BufferingLogger(); $dispatcher = new EventDispatcher(); $tdispatcher = new TraceableEventDispatcher($dispatcher, new Stopwatch(), $logger); $tdispatcher->addListener('foo', $listener1 = function () {}); $tdispatcher->addListener('foo', $listener2 = function () {}); - $logger->expects($this->exactly(2)) - ->method('debug') - ->withConsecutive( - ['Notified event "{event}" to listener "{listener}".', ['event' => 'foo', 'listener' => 'closure']], - ['Notified event "{event}" to listener "{listener}".', ['event' => 'foo', 'listener' => 'closure']] - ); - $tdispatcher->dispatch('foo'); + + $this->assertSame([ + [ + 'debug', + 'Notified event "{event}" to listener "{listener}".', + ['event' => 'foo', 'listener' => 'closure'], + ], + [ + 'debug', + 'Notified event "{event}" to listener "{listener}".', + ['event' => 'foo', 'listener' => 'closure'], + ], + ], $logger->cleanLogs()); } public function testLoggerWithStoppedEvent() { - $logger = $this->getMockBuilder('Psr\Log\LoggerInterface')->getMock(); + $logger = new BufferingLogger(); $dispatcher = new EventDispatcher(); $tdispatcher = new TraceableEventDispatcher($dispatcher, new Stopwatch(), $logger); $tdispatcher->addListener('foo', $listener1 = function (Event $event) { $event->stopPropagation(); }); $tdispatcher->addListener('foo', $listener2 = function () {}); - $logger->expects($this->exactly(3)) - ->method('debug') - ->withConsecutive( - ['Notified event "{event}" to listener "{listener}".', ['event' => 'foo', 'listener' => 'closure']], - ['Listener "{listener}" stopped propagation of the event "{event}".', ['event' => 'foo', 'listener' => 'closure']], - ['Listener "{listener}" was not called for event "{event}".', ['event' => 'foo', 'listener' => 'closure']] - ); - $tdispatcher->dispatch('foo'); + + $this->assertSame([ + [ + 'debug', + 'Notified event "{event}" to listener "{listener}".', + ['event' => 'foo', 'listener' => 'closure'], + ], + [ + 'debug', + 'Listener "{listener}" stopped propagation of the event "{event}".', + ['event' => 'foo', 'listener' => 'closure'], + ], + [ + 'debug', + 'Listener "{listener}" was not called for event "{event}".', + ['event' => 'foo', 'listener' => 'closure'], + ], + ], $logger->cleanLogs()); } public function testDispatchCallListeners() diff --git a/src/Symfony/Component/EventDispatcher/composer.json b/src/Symfony/Component/EventDispatcher/composer.json index 75b881b917..eab9464257 100644 --- a/src/Symfony/Component/EventDispatcher/composer.json +++ b/src/Symfony/Component/EventDispatcher/composer.json @@ -22,6 +22,7 @@ "symfony/dependency-injection": "~3.3|~4.0", "symfony/expression-language": "~2.8|~3.0|~4.0", "symfony/config": "~2.8|~3.0|~4.0", + "symfony/debug": "~3.4|~4.4", "symfony/stopwatch": "~2.8|~3.0|~4.0", "psr/log": "~1.0" }, From 50f37f0ccc8b3e8ffb2a460e7c710bd8c0ca4e01 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Fri, 18 Sep 2020 16:07:46 +0200 Subject: [PATCH 19/19] fix merge --- .../Tests/Debug/TraceableEventDispatcherTest.php | 2 +- src/Symfony/Component/EventDispatcher/composer.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/EventDispatcher/Tests/Debug/TraceableEventDispatcherTest.php b/src/Symfony/Component/EventDispatcher/Tests/Debug/TraceableEventDispatcherTest.php index 4462519196..9b044a2f0a 100644 --- a/src/Symfony/Component/EventDispatcher/Tests/Debug/TraceableEventDispatcherTest.php +++ b/src/Symfony/Component/EventDispatcher/Tests/Debug/TraceableEventDispatcherTest.php @@ -12,7 +12,7 @@ namespace Symfony\Component\EventDispatcher\Tests\Debug; use PHPUnit\Framework\TestCase; -use Symfony\Component\Debug\BufferingLogger; +use Symfony\Component\ErrorHandler\BufferingLogger; use Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher; use Symfony\Component\EventDispatcher\Event; use Symfony\Component\EventDispatcher\EventDispatcher; diff --git a/src/Symfony/Component/EventDispatcher/composer.json b/src/Symfony/Component/EventDispatcher/composer.json index 16c35a156c..d86b1184a7 100644 --- a/src/Symfony/Component/EventDispatcher/composer.json +++ b/src/Symfony/Component/EventDispatcher/composer.json @@ -23,7 +23,7 @@ "symfony/dependency-injection": "^3.4|^4.0|^5.0", "symfony/expression-language": "^3.4|^4.0|^5.0", "symfony/config": "^3.4|^4.0|^5.0", - "symfony/debug": "~3.4|~4.4", + "symfony/error-handler": "~3.4|~4.4", "symfony/http-foundation": "^3.4|^4.0|^5.0", "symfony/service-contracts": "^1.1|^2", "symfony/stopwatch": "^3.4|^4.0|^5.0",