From 2993fc9fc52b88e0b95355b1b38f2d07a5d39fa2 Mon Sep 17 00:00:00 2001 From: Vincent Langlet Date: Tue, 18 Feb 2020 23:28:46 +0100 Subject: [PATCH 01/10] Return int if scale = 0 --- .../Core/DataTransformer/NumberToLocalizedStringTransformer.php | 2 +- .../DataTransformer/NumberToLocalizedStringTransformerTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/Form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php b/src/Symfony/Component/Form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php index 8eddd85070..fe9002fe47 100644 --- a/src/Symfony/Component/Form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php +++ b/src/Symfony/Component/Form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php @@ -282,7 +282,7 @@ class NumberToLocalizedStringTransformer implements DataTransformerInterface break; } - $number /= $roundingCoef; + $number = 1 === $roundingCoef ? (int) $number : $number / $roundingCoef; } return $number; diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/NumberToLocalizedStringTransformerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/NumberToLocalizedStringTransformerTest.php index 30b93c66fe..fc76f9b53e 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/NumberToLocalizedStringTransformerTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/NumberToLocalizedStringTransformerTest.php @@ -370,7 +370,7 @@ class NumberToLocalizedStringTransformerTest extends TestCase { $transformer = new NumberToLocalizedStringTransformer($scale, null, $roundingMode); - $this->assertEquals($output, $transformer->reverseTransform($input)); + $this->assertSame($output, $transformer->reverseTransform($input)); } public function testReverseTransformDoesNotRoundIfNoScale() From 847d6dc8f367135a10bc783c8890eddf170f4f50 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Mon, 24 Feb 2020 15:33:45 +0100 Subject: [PATCH 02/10] prevent method calls on null values --- .../Component/Serializer/Encoder/XmlEncoder.php | 11 ++++++++++- .../Serializer/Normalizer/ArrayDenormalizer.php | 4 ++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/Serializer/Encoder/XmlEncoder.php b/src/Symfony/Component/Serializer/Encoder/XmlEncoder.php index c1e1109130..dada438e29 100644 --- a/src/Symfony/Component/Serializer/Encoder/XmlEncoder.php +++ b/src/Symfony/Component/Serializer/Encoder/XmlEncoder.php @@ -11,6 +11,7 @@ namespace Symfony\Component\Serializer\Encoder; +use Symfony\Component\Serializer\Exception\BadMethodCallException; use Symfony\Component\Serializer\Exception\NotEncodableValueException; /** @@ -375,7 +376,7 @@ class XmlEncoder extends SerializerAwareEncoder implements EncoderInterface, Dec { $append = true; - if (\is_array($data) || ($data instanceof \Traversable && !$this->serializer->supportsNormalization($data, $this->format))) { + if (\is_array($data) || ($data instanceof \Traversable && (null === $this->serializer || !$this->serializer->supportsNormalization($data, $this->format)))) { foreach ($data as $key => $data) { //Ah this is the magic @ attribute types. if (0 === strpos($key, '@') && $this->isElementNameValid($attributeName = substr($key, 1))) { @@ -410,6 +411,10 @@ class XmlEncoder extends SerializerAwareEncoder implements EncoderInterface, Dec } if (\is_object($data)) { + if (null === $this->serializer) { + throw new BadMethodCallException(sprintf('The serializer needs to be set to allow %s() to be used with object data.', __METHOD__)); + } + $data = $this->serializer->normalize($data, $this->format, $this->context); if (null !== $data && !is_scalar($data)) { return $this->buildXml($parentNode, $data, $xmlRootNodeName); @@ -484,6 +489,10 @@ class XmlEncoder extends SerializerAwareEncoder implements EncoderInterface, Dec } elseif ($val instanceof \Traversable) { $this->buildXml($node, $val); } elseif (\is_object($val)) { + if (null === $this->serializer) { + throw new BadMethodCallException(sprintf('The serializer needs to be set to allow %s() to be used with object data.', __METHOD__)); + } + return $this->selectNodeType($node, $this->serializer->normalize($val, $this->format, $this->context)); } elseif (is_numeric($val)) { return $this->appendText($node, (string) $val); diff --git a/src/Symfony/Component/Serializer/Normalizer/ArrayDenormalizer.php b/src/Symfony/Component/Serializer/Normalizer/ArrayDenormalizer.php index 93d6fc009b..702b8bfecd 100644 --- a/src/Symfony/Component/Serializer/Normalizer/ArrayDenormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/ArrayDenormalizer.php @@ -68,6 +68,10 @@ class ArrayDenormalizer implements DenormalizerInterface, SerializerAwareInterfa */ public function supportsDenormalization($data, $type, $format = null/*, array $context = []*/) { + if (null === $this->serializer) { + throw new BadMethodCallException(sprintf('The serializer needs to be set to allow %s() to be used.', __METHOD__)); + } + $context = \func_num_args() > 3 ? func_get_arg(3) : []; return '[]' === substr($type, -2) From 55734a297fd74e5966b96ab3a8041fb101a61fa5 Mon Sep 17 00:00:00 2001 From: Alessandro Chitolina Date: Sun, 23 Feb 2020 21:16:04 +0100 Subject: [PATCH 03/10] [ErrorHandler] fix parsing static return type on interface method annotation (fix #35836) --- .../Component/ErrorHandler/DebugClassLoader.php | 10 +++++----- .../ErrorHandler/Tests/DebugClassLoaderTest.php | 1 + .../ErrorHandler/Tests/Fixtures/VirtualInterface.php | 3 ++- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/Symfony/Component/ErrorHandler/DebugClassLoader.php b/src/Symfony/Component/ErrorHandler/DebugClassLoader.php index 9e410ccc3d..71f21f50fa 100644 --- a/src/Symfony/Component/ErrorHandler/DebugClassLoader.php +++ b/src/Symfony/Component/ErrorHandler/DebugClassLoader.php @@ -428,17 +428,17 @@ class DebugClassLoader } } - if ($refl->isInterface() && false !== strpos($doc, 'method') && preg_match_all('#\n \* @method\s+(static\s+)?+(?:[\w\|&\[\]\\\]+\s+)?(\w+(?:\s*\([^\)]*\))?)+(.+?([[:punct:]]\s*)?)?(?=\r?\n \*(?: @|/$|\r?\n))#', $doc, $notice, PREG_SET_ORDER)) { + if ($refl->isInterface() && false !== strpos($doc, 'method') && preg_match_all('#\n \* @method\s+(static\s+)?+([\w\|&\[\]\\\]+\s+)?(\w+(?:\s*\([^\)]*\))?)+(.+?([[:punct:]]\s*)?)?(?=\r?\n \*(?: @|/$|\r?\n))#', $doc, $notice, PREG_SET_ORDER)) { foreach ($notice as $method) { - $static = '' !== $method[1]; - $name = $method[2]; - $description = $method[3] ?? null; + $static = '' !== $method[1] && !empty($method[2]); + $name = $method[3]; + $description = $method[4] ?? null; if (false === strpos($name, '(')) { $name .= '()'; } if (null !== $description) { $description = trim($description); - if (!isset($method[4])) { + if (!isset($method[5])) { $description .= '.'; } } diff --git a/src/Symfony/Component/ErrorHandler/Tests/DebugClassLoaderTest.php b/src/Symfony/Component/ErrorHandler/Tests/DebugClassLoaderTest.php index adf55432ee..d0ff0afba8 100644 --- a/src/Symfony/Component/ErrorHandler/Tests/DebugClassLoaderTest.php +++ b/src/Symfony/Component/ErrorHandler/Tests/DebugClassLoaderTest.php @@ -325,6 +325,7 @@ class DebugClassLoaderTest extends TestCase restore_error_handler(); $this->assertSame([ + 'Class "Test\Symfony\Component\ErrorHandler\Tests\ExtendsVirtualParent" should implement method "Symfony\Component\ErrorHandler\Tests\Fixtures\VirtualInterface::staticReturningMethod()".', 'Class "Test\Symfony\Component\ErrorHandler\Tests\ExtendsVirtualParent" should implement method "Symfony\Component\ErrorHandler\Tests\Fixtures\VirtualInterface::sameLineInterfaceMethodNoBraces()".', 'Class "Test\Symfony\Component\ErrorHandler\Tests\ExtendsVirtualParent" should implement method "Symfony\Component\ErrorHandler\Tests\Fixtures\VirtualInterface::newLineInterfaceMethod()": Some description!', 'Class "Test\Symfony\Component\ErrorHandler\Tests\ExtendsVirtualParent" should implement method "Symfony\Component\ErrorHandler\Tests\Fixtures\VirtualInterface::newLineInterfaceMethodNoBraces()": Description.', diff --git a/src/Symfony/Component/ErrorHandler/Tests/Fixtures/VirtualInterface.php b/src/Symfony/Component/ErrorHandler/Tests/Fixtures/VirtualInterface.php index fd1c8ba04e..5c9136081f 100644 --- a/src/Symfony/Component/ErrorHandler/Tests/Fixtures/VirtualInterface.php +++ b/src/Symfony/Component/ErrorHandler/Tests/Fixtures/VirtualInterface.php @@ -4,6 +4,7 @@ namespace Symfony\Component\ErrorHandler\Tests\Fixtures; /** * @method string interfaceMethod() + * @method static staticReturningMethod() * @method sameLineInterfaceMethod($arg) * @method sameLineInterfaceMethodNoBraces * @@ -25,7 +26,7 @@ namespace Symfony\Component\ErrorHandler\Tests\Fixtures; * * Static * @method static Foo&Bar staticMethod() - * @method static staticMethodNoBraces + * @method static mixed staticMethodNoBraces * @method static \stdClass staticMethodTyped(int $arg) Description * @method static \stdClass[] staticMethodTypedNoBraces */ From f8735cc47b1fd13a98817d7c06ab0dd64a5af788 Mon Sep 17 00:00:00 2001 From: Thomas Calvet Date: Tue, 25 Feb 2020 17:47:03 +0100 Subject: [PATCH 04/10] [DomCrawler][Form] Fix PHPDoc on get & offsetGet --- src/Symfony/Component/DomCrawler/Form.php | 4 +-- .../DomCrawler/FormFieldRegistry.php | 2 +- .../Component/DomCrawler/Tests/FormTest.php | 33 ++++++++++++++++++- 3 files changed, 35 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/DomCrawler/Form.php b/src/Symfony/Component/DomCrawler/Form.php index 375ee531c4..0a86c7e6d4 100644 --- a/src/Symfony/Component/DomCrawler/Form.php +++ b/src/Symfony/Component/DomCrawler/Form.php @@ -269,7 +269,7 @@ class Form extends Link implements \ArrayAccess * * @param string $name The field name * - * @return FormField The field instance + * @return FormField|FormField[]|FormField[][] The value of the field * * @throws \InvalidArgumentException When field is not present in this form */ @@ -313,7 +313,7 @@ class Form extends Link implements \ArrayAccess * * @param string $name The field name * - * @return FormField The associated Field instance + * @return FormField|FormField[]|FormField[][] The value of the field * * @throws \InvalidArgumentException if the field does not exist */ diff --git a/src/Symfony/Component/DomCrawler/FormFieldRegistry.php b/src/Symfony/Component/DomCrawler/FormFieldRegistry.php index 901a5c8dec..3bbcfa7473 100644 --- a/src/Symfony/Component/DomCrawler/FormFieldRegistry.php +++ b/src/Symfony/Component/DomCrawler/FormFieldRegistry.php @@ -70,7 +70,7 @@ class FormFieldRegistry * * @param string $name The fully qualified name of the field * - * @return mixed The value of the field + * @return FormField|FormField[]|FormField[][] The value of the field * * @throws \InvalidArgumentException if the field does not exist */ diff --git a/src/Symfony/Component/DomCrawler/Tests/FormTest.php b/src/Symfony/Component/DomCrawler/Tests/FormTest.php index 1867f30a65..9894eb429a 100644 --- a/src/Symfony/Component/DomCrawler/Tests/FormTest.php +++ b/src/Symfony/Component/DomCrawler/Tests/FormTest.php @@ -12,6 +12,7 @@ namespace Symfony\Component\DomCrawler\Tests; use PHPUnit\Framework\TestCase; +use Symfony\Component\DomCrawler\Field\TextareaFormField; use Symfony\Component\DomCrawler\Form; use Symfony\Component\DomCrawler\FormFieldRegistry; @@ -953,7 +954,7 @@ class FormTest extends TestCase return $dom; } - public function testgetPhpValuesWithEmptyTextarea() + public function testGetPhpValuesWithEmptyTextarea() { $dom = new \DOMDocument(); $dom->loadHTML(' @@ -968,4 +969,34 @@ class FormTest extends TestCase $form = new Form($nodes->item(0), 'http://example.com'); $this->assertEquals($form->getPhpValues(), ['example' => '']); } + + public function testGetReturnTypes() + { + $dom = new \DOMDocument(); + $dom->loadHTML(' + +
+ +
+ ' + ); + + $nodes = $dom->getElementsByTagName('form'); + $form = new Form($nodes->item(0), 'http://example.com'); + + // FormField + $this->assertInstanceOf(TextareaFormField::class, $textareaFormField = $form->get('foo[collection][0][bar]')); + + // Array of FormField + $this->assertSame([ + 'bar' => $textareaFormField, + ], $form->get('foo[collection][0]')); + + // Array of array of FormField + $this->assertSame([ + [ + 'bar' => $textareaFormField, + ], + ], $form->get('foo[collection]')); + } } From 491fc5c24d785937c82f5fc8349edbe5155da01f Mon Sep 17 00:00:00 2001 From: Thomas Calvet Date: Wed, 26 Feb 2020 21:34:36 +0100 Subject: [PATCH 05/10] [Validator][ConstraintValidator] Update wrong PRETTY_DATE doc --- src/Symfony/Component/Validator/ConstraintValidator.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Component/Validator/ConstraintValidator.php b/src/Symfony/Component/Validator/ConstraintValidator.php index 458351fe2e..db0ccb60a8 100644 --- a/src/Symfony/Component/Validator/ConstraintValidator.php +++ b/src/Symfony/Component/Validator/ConstraintValidator.php @@ -21,8 +21,8 @@ use Symfony\Component\Validator\Context\ExecutionContextInterface; abstract class ConstraintValidator implements ConstraintValidatorInterface { /** - * Whether to format {@link \DateTime} objects as RFC-3339 dates - * ("Y-m-d H:i:s"). + * Whether to format {@link \DateTime} objects, either with the {@link \IntlDateFormatter} + * (if it is available) or as RFC-3339 dates ("Y-m-d H:i:s"). */ const PRETTY_DATE = 1; @@ -69,7 +69,8 @@ abstract class ConstraintValidator implements ConstraintValidatorInterface * in double quotes ("). Objects, arrays and resources are formatted as * "object", "array" and "resource". If the $format bitmask contains * the PRETTY_DATE bit, then {@link \DateTime} objects will be formatted - * as RFC-3339 dates ("Y-m-d H:i:s"). + * with the {@link \IntlDateFormatter}. If it is not available, they will be + * formatted as RFC-3339 dates ("Y-m-d H:i:s"). * * Be careful when passing message parameters to a constraint violation * that (may) contain objects, arrays or resources. These parameters From 45a033d67b22075d29eb3969bb8329dc165a704d Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Fri, 28 Feb 2020 13:03:21 +0100 Subject: [PATCH 06/10] add missing Messenger options to XML schema definition --- .../Resources/config/schema/symfony-1.0.xsd | 10 ++++++++++ .../Fixtures/php/messenger_transports.php | 8 ++++++++ .../Fixtures/xml/messenger_transports.xml | 4 +++- .../Fixtures/yml/messenger_transports.yml | 7 +++++++ .../DependencyInjection/FrameworkExtensionTest.php | 7 +++++++ 5 files changed, 35 insertions(+), 1 deletion(-) 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 0c4f6b85fc..403119842e 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 @@ -427,6 +427,7 @@ + @@ -457,12 +458,21 @@ + + + + + + + + + diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/messenger_transports.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/messenger_transports.php index 68ff360746..0aff440e85 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/messenger_transports.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/messenger_transports.php @@ -3,6 +3,7 @@ $container->loadFromExtension('framework', [ 'serializer' => true, 'messenger' => [ + 'failure_transport' => 'failed', 'serializer' => [ 'default_serializer' => 'messenger.transport.symfony_serializer', ], @@ -12,7 +13,14 @@ $container->loadFromExtension('framework', [ 'dsn' => 'amqp://localhost/%2f/messages?exchange_name=exchange_name', 'options' => ['queue' => ['name' => 'Queue']], 'serializer' => 'messenger.transport.native_php_serializer', + 'retry_strategy' => [ + 'max_retries' => 10, + 'delay' => 7, + 'multiplier' => 3, + 'max_delay' => 100, + ], ], + 'failed' => 'in-memory:///', 'redis' => 'redis://127.0.0.1:6379/messages', ], ], diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/messenger_transports.xml b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/messenger_transports.xml index bb698cbc17..837db14c1c 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/messenger_transports.xml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/messenger_transports.xml @@ -7,7 +7,7 @@ - + @@ -16,7 +16,9 @@ Queue + + diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/messenger_transports.yml b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/messenger_transports.yml index 2fc1f48265..daab75bd87 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/messenger_transports.yml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/messenger_transports.yml @@ -1,6 +1,7 @@ framework: serializer: true messenger: + failure_transport: failed serializer: default_serializer: messenger.transport.symfony_serializer transports: @@ -11,4 +12,10 @@ framework: queue: name: Queue serializer: 'messenger.transport.native_php_serializer' + retry_strategy: + max_retries: 10 + delay: 7 + multiplier: 3 + max_delay: 100 + failed: 'in-memory:///' redis: 'redis://127.0.0.1:6379/messages' diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php index b65ab9e011..edcdb7aae4 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php @@ -725,6 +725,13 @@ abstract class FrameworkExtensionTest extends TestCase $this->assertSame('redis://127.0.0.1:6379/messages', $transportArguments[0]); $this->assertTrue($container->hasDefinition('messenger.transport.redis.factory')); + + $this->assertSame(10, $container->getDefinition('messenger.retry.multiplier_retry_strategy.customised')->getArgument(0)); + $this->assertSame(7, $container->getDefinition('messenger.retry.multiplier_retry_strategy.customised')->getArgument(1)); + $this->assertSame(3, $container->getDefinition('messenger.retry.multiplier_retry_strategy.customised')->getArgument(2)); + $this->assertSame(100, $container->getDefinition('messenger.retry.multiplier_retry_strategy.customised')->getArgument(3)); + + $this->assertEquals(new Reference('messenger.transport.failed'), $container->getDefinition('messenger.failure.send_failed_message_to_failure_transport_listener')->getArgument(0)); } public function testMessengerRouting() From 9d837ecb345a29386e3bdaee40fcf84ce8ec72ef Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Fri, 28 Feb 2020 15:30:03 +0100 Subject: [PATCH 07/10] add German translation --- .../Validator/Resources/translations/validators.de.xlf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.de.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.de.xlf index 0702e8dfcd..a546b86c78 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.de.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.de.xlf @@ -370,6 +370,10 @@ This value is not a valid hostname. Dieser Wert ist kein gültiger Hostname. + + The number of elements in this collection should be a multiple of {{ compared_value }}. + Die Anzahl an Elementen in dieser Sammlung sollte ein Vielfaches von {{ compared_value }} sein. + From c16d1535226aa7e8162e7065adf7f55b242d2744 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Sch=C3=A4dlich?= Date: Sat, 29 Feb 2020 09:54:47 +0100 Subject: [PATCH 08/10] [Validator] Add missing vietnamese translations --- .../Resources/translations/validators.vi.xlf | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.vi.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.vi.xlf index 95dd7d6665..ead79d2cd7 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.vi.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.vi.xlf @@ -362,6 +362,18 @@ This password has been leaked in a data breach, it must not be used. Please use another password. Mật khẩu này đã bị rò rỉ dữ liệu, không được sử dụng nữa. Xin vui lòng sử dụng mật khẩu khác. + + This value should be between {{ min }} and {{ max }}. + Giá trị này nên thuộc giữa {{ min }} và {{ max }}. + + + This value is not a valid hostname. + Giá trị này không phải là tên máy chủ hợp lệ. + + + The number of elements in this collection should be a multiple of {{ compared_value }}. + Số lượng các phần tử trong bộ sưu tập này nên là bội số của {{compared_value}}. + From 1c70048e9cb01a53d96f958e8246fcecdff22b64 Mon Sep 17 00:00:00 2001 From: Lynn Date: Mon, 17 Feb 2020 15:42:01 +0100 Subject: [PATCH 09/10] [DI] Clarified deprecation for TypedReference in 4.4 --- src/Symfony/Component/DependencyInjection/TypedReference.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/DependencyInjection/TypedReference.php b/src/Symfony/Component/DependencyInjection/TypedReference.php index 56a878874e..15b2b706c1 100644 --- a/src/Symfony/Component/DependencyInjection/TypedReference.php +++ b/src/Symfony/Component/DependencyInjection/TypedReference.php @@ -31,7 +31,7 @@ class TypedReference extends Reference public function __construct(string $id, string $type, $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, $name = null) { if (\is_string($invalidBehavior ?? '') || \is_int($name)) { - @trigger_error(sprintf('The $requiringClass argument of "%s()" is deprecated since Symfony 4.1.', __METHOD__), E_USER_DEPRECATED); + @trigger_error(sprintf('Passing the $requiringClass as 3rd argument for "%s()" is deprecated since Symfony 4.1. It should be removed, moving all following arguments 1 to the left.', __METHOD__), E_USER_DEPRECATED); $this->requiringClass = $invalidBehavior; $invalidBehavior = 3 < \func_num_args() ? func_get_arg(3) : ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE; From 4f61247ccc847372eb27ec91fbdcacd826af0ddf Mon Sep 17 00:00:00 2001 From: jonmldr Date: Thu, 27 Feb 2020 15:24:32 +0100 Subject: [PATCH 10/10] [Dotenv] Documentation improvement --- src/Symfony/Component/Dotenv/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Dotenv/README.md b/src/Symfony/Component/Dotenv/README.md index c21223b04e..10bfff14ba 100644 --- a/src/Symfony/Component/Dotenv/README.md +++ b/src/Symfony/Component/Dotenv/README.md @@ -2,7 +2,7 @@ Dotenv Component ================ Symfony Dotenv parses `.env` files to make environment variables stored in them -accessible via `$_SERVER`, `$_ENV` and optionally `getenv()`. +accessible via `$_SERVER` or `$_ENV`. Resources ---------