From 98bb64c32a7070fa15a83dbaf7a398e4b27a8d59 Mon Sep 17 00:00:00 2001 From: Samuel ROZE Date: Fri, 20 Jul 2018 11:55:07 +0100 Subject: [PATCH 01/14] Chaining senders with their aliases should work --- .../FrameworkExtension.php | 35 +++++++++++-------- .../Fixtures/php/messenger_routing.php | 5 +++ .../Fixtures/xml/messenger_routing.xml | 3 ++ .../Fixtures/yml/messenger_routing.yml | 4 +++ .../FrameworkExtensionTest.php | 1 + 5 files changed, 33 insertions(+), 15 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php index 318af6c8b9..33c8a7ad1e 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php @@ -1495,6 +1495,22 @@ class FrameworkExtension extends Extension throw new LogicException(sprintf('The default bus named "%s" is not defined. Define it or change the default bus name.', $config['default_bus'])); } + $senderAliases = array(); + foreach ($config['transports'] as $name => $transport) { + if (0 === strpos($transport['dsn'], 'amqp://') && !$container->hasDefinition('messenger.transport.amqp.factory')) { + throw new LogicException('The default AMQP transport is not available. Make sure you have installed and enabled the Serializer component. Try enable it or install it by running "composer require symfony/serializer-pack".'); + } + + $transportDefinition = (new Definition(TransportInterface::class)) + ->setFactory(array(new Reference('messenger.transport_factory'), 'createTransport')) + ->setArguments(array($transport['dsn'], $transport['options'])) + ->addTag('messenger.receiver', array('alias' => $name)) + ->addTag('messenger.sender', array('alias' => $name)) + ; + $container->setDefinition($transportId = 'messenger.transport.'.$name, $transportDefinition); + $senderAliases[$name] = $transportId; + } + $messageToSenderIdMapping = array(); $messageToSendAndHandleMapping = array(); foreach ($config['routing'] as $message => $messageConfiguration) { @@ -1503,8 +1519,11 @@ class FrameworkExtension extends Extension } if (1 < \count($messageConfiguration['senders'])) { - $senders = array_map(function ($sender) { return new Reference($sender); }, $messageConfiguration['senders']); + $senders = array_map(function ($sender) use ($senderAliases) { + return new Reference($senderAliases[$sender] ?? $sender); + }, $messageConfiguration['senders']); $chainSenderDefinition = new Definition(ChainSender::class, array($senders)); + $chainSenderDefinition->addTag('messenger.sender'); $chainSenderId = '.messenger.chain_sender.'.$message; $container->setDefinition($chainSenderId, $chainSenderDefinition); $messageToSenderIdMapping[$message] = $chainSenderId; @@ -1517,20 +1536,6 @@ class FrameworkExtension extends Extension $container->getDefinition('messenger.asynchronous.routing.sender_locator')->replaceArgument(1, $messageToSenderIdMapping); $container->getDefinition('messenger.middleware.route_messages')->replaceArgument(1, $messageToSendAndHandleMapping); - - foreach ($config['transports'] as $name => $transport) { - if (0 === strpos($transport['dsn'], 'amqp://') && !$container->hasDefinition('messenger.transport.amqp.factory')) { - throw new LogicException('The default AMQP transport is not available. Make sure you have installed and enabled the Serializer component. Try enable it or install it by running "composer require symfony/serializer-pack".'); - } - - $transportDefinition = (new Definition(TransportInterface::class)) - ->setFactory(array(new Reference('messenger.transport_factory'), 'createTransport')) - ->setArguments(array($transport['dsn'], $transport['options'])) - ->addTag('messenger.receiver', array('alias' => $name)) - ->addTag('messenger.sender', array('alias' => $name)) - ; - $container->setDefinition('messenger.transport.'.$name, $transportDefinition); - } } private function registerCacheConfiguration(array $config, ContainerBuilder $container) diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/messenger_routing.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/messenger_routing.php index 51b1184764..0d6af180fd 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/messenger_routing.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/messenger_routing.php @@ -1,7 +1,9 @@ loadFromExtension('framework', array( + 'serializer' => true, 'messenger' => array( + 'serializer' => true, 'routing' => array( 'Symfony\Component\Messenger\Tests\Fixtures\DummyMessage' => array('amqp', 'audit'), 'Symfony\Component\Messenger\Tests\Fixtures\SecondMessage' => array( @@ -10,5 +12,8 @@ $container->loadFromExtension('framework', array( ), '*' => 'amqp', ), + 'transports' => array( + 'amqp' => 'amqp://localhost/%2f/messages', + ), ), )); diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/messenger_routing.xml b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/messenger_routing.xml index 808b0ba9cd..f0747bff71 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/messenger_routing.xml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/messenger_routing.xml @@ -6,7 +6,9 @@ http://symfony.com/schema/dic/symfony http://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> + + @@ -18,6 +20,7 @@ + diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/messenger_routing.yml b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/messenger_routing.yml index da096fcaed..a82a093aa7 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/messenger_routing.yml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/messenger_routing.yml @@ -1,8 +1,12 @@ framework: + serializer: true messenger: + serializer: true routing: 'Symfony\Component\Messenger\Tests\Fixtures\DummyMessage': [amqp, audit] 'Symfony\Component\Messenger\Tests\Fixtures\SecondMessage': senders: [amqp, audit] send_and_handle: true '*': amqp + transports: + amqp: 'amqp://localhost/%2f/messages' diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php index b1570333eb..4e4a31b681 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php @@ -573,6 +573,7 @@ abstract class FrameworkExtensionTest extends TestCase $this->assertSame($messageToSenderIdsMapping, $senderLocatorDefinition->getArgument(1)); $this->assertSame($messageToSendAndHandleMapping, $sendMessageMiddlewareDefinition->getArgument(1)); + $this->assertEquals(array(new Reference('messenger.transport.amqp'), new Reference('audit')), $container->getDefinition('.messenger.chain_sender.'.DummyMessage::class)->getArgument(0)); } /** From a57549d0a1d22c695413fb0385a00d9cc93d3039 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 23 Jul 2018 16:56:24 +0200 Subject: [PATCH 02/14] bumped Symfony version to 2.8.44 --- src/Symfony/Component/HttpKernel/Kernel.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index d97d56d201..70735892ff 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -59,12 +59,12 @@ abstract class Kernel implements KernelInterface, TerminableInterface protected $startTime; protected $loadClassCache; - const VERSION = '2.8.43'; - const VERSION_ID = 20843; + const VERSION = '2.8.44-DEV'; + const VERSION_ID = 20844; const MAJOR_VERSION = 2; const MINOR_VERSION = 8; - const RELEASE_VERSION = 43; - const EXTRA_VERSION = ''; + const RELEASE_VERSION = 44; + const EXTRA_VERSION = 'DEV'; const END_OF_MAINTENANCE = '11/2018'; const END_OF_LIFE = '11/2019'; From 30b834bdafd9dad9e547b3fe8b6933358c1fa36e Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 23 Jul 2018 18:37:26 +0200 Subject: [PATCH 03/14] updated CHANGELOG for 3.4.13 --- CHANGELOG-3.4.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/CHANGELOG-3.4.md b/CHANGELOG-3.4.md index 3c612a6ebd..94bbcf155c 100644 --- a/CHANGELOG-3.4.md +++ b/CHANGELOG-3.4.md @@ -7,6 +7,39 @@ in 3.4 minor versions. To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v3.4.0...v3.4.1 +* 3.4.13 (2018-07-23) + + * bug #28005 [HttpKernel] Fixed templateExists on parse error of the template name (yceruto) + * bug #27997 Serbo-Croatian has Serbian plural rule (kylekatarnls) + * bug #26193 Fix false-positive deprecation notices for TranslationLoader and WriteCheckSessionHandler (iquito) + * bug #27941 [WebProfilerBundle] Fixed icon alignment issue using Bootstrap 4.1.2 (jmsche) + * bug #27937 [HttpFoundation] reset callback on StreamedResponse when setNotModified() is called (rubencm) + * bug #27927 [HttpFoundation] Suppress side effects in 'get' and 'has' methods of NamespacedAttributeBag (webnet-fr) + * bug #27923 [Form/Profiler] Massively reducing memory footprint of form profiling pages... (VincentChalnot) + * bug #27918 [Console] correctly return parameter's default value on "--" (seschwar) + * bug #27904 [Filesystem] fix lock file permissions (fritzmg) + * bug #27903 [Lock] fix lock file permissions (fritzmg) + * bug #27889 [Form] Replace .initialism with .text-uppercase. (vudaltsov) + * bug #27902 Fix the detection of the Process new argument (stof) + * bug #27885 [HttpFoundation] don't encode cookie name for BC (nicolas-grekas) + * bug #27782 [DI] Fix dumping ignore-on-uninitialized references to synthetic services (nicolas-grekas) + * bug #27435 [OptionResolver] resolve arrays (Doctrs) + * bug #27728 [TwigBridge] Fix missing path and separators in loader paths list on debug:twig output (yceruto) + * bug #27837 [PropertyInfo] Fix dock block lookup fallback loop (DerManoMann) + * bug #27758 [WebProfilerBundle] Prevent toolbar links color override by css (alcalyn) + * bug #27834 [DI] Don't show internal service id on binding errors (nicolas-grekas) + * bug #27831 Check for Hyper terminal on all operating systems. (azjezz) + * bug #27794 Add color support for Hyper terminal . (azjezz) + * bug #27809 [HttpFoundation] Fix tests: new message for status 425 (dunglas) + * bug #27618 [PropertyInfo] added handling of nullable types in PhpDoc (oxan) + * bug #27659 [HttpKernel] Make AbstractTestSessionListener compatible with CookieClearingLogoutHandler (thewilkybarkid) + * bug #27752 [Cache] provider does not respect option maxIdLength with versioning enabled (Constantine Shtompel) + * bug #27776 [ProxyManagerBridge] Fix support of private services (bis) (nicolas-grekas) + * bug #27714 [HttpFoundation] fix session tracking counter (nicolas-grekas, dmaicher) + * bug #27747 [HttpFoundation] fix registration of session proxies (nicolas-grekas) + * bug #27722 Redesign the Debug error page in prod (javiereguiluz) + * bug #27716 [DI] fix dumping deprecated service in yaml (nicolas-grekas) + * 3.4.12 (2018-06-25) * bug #27626 [TwigBundle][DX] Only add the Twig WebLinkExtension if the WebLink component is enabled (thewilkybarkid) From 7446a290ad1bcd6d0490f8340d98a7a55a713c9a Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 23 Jul 2018 18:37:31 +0200 Subject: [PATCH 04/14] updated VERSION for 3.4.13 --- src/Symfony/Component/HttpKernel/Kernel.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index 5041ecb4a9..be20edd8ad 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -67,12 +67,12 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl private $requestStackSize = 0; private $resetServices = false; - const VERSION = '3.4.13-DEV'; + const VERSION = '3.4.13'; const VERSION_ID = 30413; const MAJOR_VERSION = 3; const MINOR_VERSION = 4; const RELEASE_VERSION = 13; - const EXTRA_VERSION = 'DEV'; + const EXTRA_VERSION = ''; const END_OF_MAINTENANCE = '11/2020'; const END_OF_LIFE = '11/2021'; From 0ff03c9b3d4488b2450f7b25bb481a9567d64889 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 23 Jul 2018 19:11:49 +0200 Subject: [PATCH 05/14] bumped Symfony version to 3.4.14 --- src/Symfony/Component/HttpKernel/Kernel.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index be20edd8ad..de0771ed2c 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -67,12 +67,12 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl private $requestStackSize = 0; private $resetServices = false; - const VERSION = '3.4.13'; - const VERSION_ID = 30413; + const VERSION = '3.4.14-DEV'; + const VERSION_ID = 30414; const MAJOR_VERSION = 3; const MINOR_VERSION = 4; - const RELEASE_VERSION = 13; - const EXTRA_VERSION = ''; + const RELEASE_VERSION = 14; + const EXTRA_VERSION = 'DEV'; const END_OF_MAINTENANCE = '11/2020'; const END_OF_LIFE = '11/2021'; From c710c7431fa0dfb05f087602f9fbed1144ced4bc Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 23 Jul 2018 19:12:47 +0200 Subject: [PATCH 06/14] updated CHANGELOG for 4.0.13 --- CHANGELOG-4.0.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/CHANGELOG-4.0.md b/CHANGELOG-4.0.md index 72d24bf39e..2afe811abc 100644 --- a/CHANGELOG-4.0.md +++ b/CHANGELOG-4.0.md @@ -7,6 +7,40 @@ in 4.0 minor versions. To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v4.0.0...v4.0.1 +* 4.0.13 (2018-07-23) + + * bug #28005 [HttpKernel] Fixed templateExists on parse error of the template name (yceruto) + * bug #27997 Serbo-Croatian has Serbian plural rule (kylekatarnls) + * bug #26193 Fix false-positive deprecation notices for TranslationLoader and WriteCheckSessionHandler (iquito) + * bug #27941 [WebProfilerBundle] Fixed icon alignment issue using Bootstrap 4.1.2 (jmsche) + * bug #27937 [HttpFoundation] reset callback on StreamedResponse when setNotModified() is called (rubencm) + * bug #27927 [HttpFoundation] Suppress side effects in 'get' and 'has' methods of NamespacedAttributeBag (webnet-fr) + * bug #27923 [Form/Profiler] Massively reducing memory footprint of form profiling pages... (VincentChalnot) + * bug #27918 [Console] correctly return parameter's default value on "--" (seschwar) + * bug #27904 [Filesystem] fix lock file permissions (fritzmg) + * bug #27903 [Lock] fix lock file permissions (fritzmg) + * bug #27889 [Form] Replace .initialism with .text-uppercase. (vudaltsov) + * bug #27902 Fix the detection of the Process new argument (stof) + * bug #27885 [HttpFoundation] don't encode cookie name for BC (nicolas-grekas) + * bug #27782 [DI] Fix dumping ignore-on-uninitialized references to synthetic services (nicolas-grekas) + * bug #27435 [OptionResolver] resolve arrays (Doctrs) + * bug #27728 [TwigBridge] Fix missing path and separators in loader paths list on debug:twig output (yceruto) + * bug #27837 [PropertyInfo] Fix dock block lookup fallback loop (DerManoMann) + * bug #27758 [WebProfilerBundle] Prevent toolbar links color override by css (alcalyn) + * bug #27847 [Security] Fix accepting null as $uidKey in LdapUserProvider (louhde) + * bug #27834 [DI] Don't show internal service id on binding errors (nicolas-grekas) + * bug #27831 Check for Hyper terminal on all operating systems. (azjezz) + * bug #27794 Add color support for Hyper terminal . (azjezz) + * bug #27809 [HttpFoundation] Fix tests: new message for status 425 (dunglas) + * bug #27618 [PropertyInfo] added handling of nullable types in PhpDoc (oxan) + * bug #27659 [HttpKernel] Make AbstractTestSessionListener compatible with CookieClearingLogoutHandler (thewilkybarkid) + * bug #27752 [Cache] provider does not respect option maxIdLength with versioning enabled (Constantine Shtompel) + * bug #27776 [ProxyManagerBridge] Fix support of private services (bis) (nicolas-grekas) + * bug #27714 [HttpFoundation] fix session tracking counter (nicolas-grekas, dmaicher) + * bug #27747 [HttpFoundation] fix registration of session proxies (nicolas-grekas) + * bug #27722 Redesign the Debug error page in prod (javiereguiluz) + * bug #27716 [DI] fix dumping deprecated service in yaml (nicolas-grekas) + * 4.0.12 (2018-06-25) * bug #27626 [TwigBundle][DX] Only add the Twig WebLinkExtension if the WebLink component is enabled (thewilkybarkid) From 89959a4ca1dc7ab3b47a136dbe4cae3a85c13307 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 23 Jul 2018 19:12:53 +0200 Subject: [PATCH 07/14] updated VERSION for 4.0.13 --- src/Symfony/Component/HttpKernel/Kernel.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index 15955af90d..1ef4e8af95 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -63,12 +63,12 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl private $requestStackSize = 0; private $resetServices = false; - const VERSION = '4.0.13-DEV'; + const VERSION = '4.0.13'; const VERSION_ID = 40013; const MAJOR_VERSION = 4; const MINOR_VERSION = 0; const RELEASE_VERSION = 13; - const EXTRA_VERSION = 'DEV'; + const EXTRA_VERSION = ''; const END_OF_MAINTENANCE = '07/2018'; const END_OF_LIFE = '01/2019'; From b067f311472069a239564fd35882e480c07f8387 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 23 Jul 2018 19:15:26 +0200 Subject: [PATCH 08/14] bumped Symfony version to 4.0.14 --- src/Symfony/Component/HttpKernel/Kernel.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index 1ef4e8af95..bd6b8ea3ec 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -63,12 +63,12 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl private $requestStackSize = 0; private $resetServices = false; - const VERSION = '4.0.13'; - const VERSION_ID = 40013; + const VERSION = '4.0.14-DEV'; + const VERSION_ID = 40014; const MAJOR_VERSION = 4; const MINOR_VERSION = 0; - const RELEASE_VERSION = 13; - const EXTRA_VERSION = ''; + const RELEASE_VERSION = 14; + const EXTRA_VERSION = 'DEV'; const END_OF_MAINTENANCE = '07/2018'; const END_OF_LIFE = '01/2019'; From 52c642b1f45c12e61903999793203149f9ab536a Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 23 Jul 2018 19:16:16 +0200 Subject: [PATCH 09/14] updated CHANGELOG for 4.1.2 --- CHANGELOG-4.1.md | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/CHANGELOG-4.1.md b/CHANGELOG-4.1.md index b09b994c5c..e7126dcf6d 100644 --- a/CHANGELOG-4.1.md +++ b/CHANGELOG-4.1.md @@ -7,6 +7,53 @@ in 4.1 minor versions. To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v4.1.0...v4.1.1 +* 4.1.2 (2018-07-23) + + * bug #28005 [HttpKernel] Fixed templateExists on parse error of the template name (yceruto) + * bug #28013 [Messenger] Add missing typehint on chain sender (sroze) + * bug #27997 Serbo-Croatian has Serbian plural rule (kylekatarnls) + * bug #26193 Fix false-positive deprecation notices for TranslationLoader and WriteCheckSessionHandler (iquito) + * bug #27827 [Serializer] Supports nested abstract items (sroze) + * bug #27958 [Form] Remaining changes for bootstrap 4 file fields (apfelbox) + * bug #27919 [Form] Improve rendering of `file` field in bootstrap 4 (apfelbox) + * bug #27941 [WebProfilerBundle] Fixed icon alignment issue using Bootstrap 4.1.2 (jmsche) + * bug #27937 [HttpFoundation] reset callback on StreamedResponse when setNotModified() is called (rubencm) + * bug #27927 [HttpFoundation] Suppress side effects in 'get' and 'has' methods of NamespacedAttributeBag (webnet-fr) + * bug #27913 [EventDispatcher] Clear orphaned events on reset (acasademont) + * bug #27923 [Form/Profiler] Massively reducing memory footprint of form profiling pages... (VincentChalnot) + * bug #27918 [Console] correctly return parameter's default value on "--" (seschwar) + * bug #27826 [Serializer] Fix serialization of items with groups across entities and discrimination map (sroze) + * bug #27904 [Filesystem] fix lock file permissions (fritzmg) + * bug #27903 [Lock] fix lock file permissions (fritzmg) + * bug #27889 [Form] Replace .initialism with .text-uppercase. (vudaltsov) + * bug #27902 Fix the detection of the Process new argument (stof) + * bug #27885 [HttpFoundation] don't encode cookie name for BC (nicolas-grekas) + * bug #27782 [DI] Fix dumping ignore-on-uninitialized references to synthetic services (nicolas-grekas) + * bug #27435 [OptionResolver] resolve arrays (Doctrs) + * bug #27728 [TwigBridge] Fix missing path and separators in loader paths list on debug:twig output (yceruto) + * bug #27837 [PropertyInfo] Fix dock block lookup fallback loop (DerManoMann) + * bug #27848 [Workflow] Fixed BC break (lyrixx) + * bug #27758 [WebProfilerBundle] Prevent toolbar links color override by css (alcalyn) + * bug #27847 [Security] Fix accepting null as $uidKey in LdapUserProvider (louhde) + * bug #27820 [Messenger] Fix a bug when having more than one named handler per message subscriber (sroze) + * bug #27834 [DI] Don't show internal service id on binding errors (nicolas-grekas) + * bug #27831 Check for Hyper terminal on all operating systems. (azjezz) + * bug #27794 Add color support for Hyper terminal . (azjezz) + * bug #27809 [HttpFoundation] Fix tests: new message for status 425 (dunglas) + * bug #27618 [PropertyInfo] added handling of nullable types in PhpDoc (oxan) + * bug #27659 [HttpKernel] Make AbstractTestSessionListener compatible with CookieClearingLogoutHandler (thewilkybarkid) + * bug #27752 [Cache] provider does not respect option maxIdLength with versioning enabled (Constantine Shtompel) + * bug #27773 [Serializer] Class discriminator and serialization groups (sroze) + * bug #27710 [DependencyInjection] fix handling of empty DI extension configs (xabbuh) + * bug #27776 [ProxyManagerBridge] Fix support of private services (bis) (nicolas-grekas) + * bug #27714 [HttpFoundation] fix session tracking counter (nicolas-grekas, dmaicher) + * bug #27727 [Routing] Disallow object usage inside Route (paxal) + * bug #27736 [Routing] fix too much greediness in host-matching regex (nicolas-grekas) + * bug #27747 [HttpFoundation] fix registration of session proxies (nicolas-grekas) + * bug #27754 [HttpFoundation] missing namespace for RedisProxy (Bonfante) + * bug #27722 Redesign the Debug error page in prod (javiereguiluz) + * bug #27716 [DI] fix dumping deprecated service in yaml (nicolas-grekas) + * 4.1.1 (2018-06-25) * bug #27626 [TwigBundle][DX] Only add the Twig WebLinkExtension if the WebLink component is enabled (thewilkybarkid) From 971445977fb4fbee52b18a9afcfec6ad7a78ce83 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 23 Jul 2018 19:16:22 +0200 Subject: [PATCH 10/14] updated VERSION for 4.1.2 --- src/Symfony/Component/HttpKernel/Kernel.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index 05f068673e..f536bd0b30 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -63,12 +63,12 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl private $requestStackSize = 0; private $resetServices = false; - const VERSION = '4.1.2-DEV'; + const VERSION = '4.1.2'; const VERSION_ID = 40102; const MAJOR_VERSION = 4; const MINOR_VERSION = 1; const RELEASE_VERSION = 2; - const EXTRA_VERSION = 'DEV'; + const EXTRA_VERSION = ''; const END_OF_MAINTENANCE = '01/2019'; const END_OF_LIFE = '07/2019'; From 94b620ebc2bfb8c0fc045dcf2e7f5fb4840384ba Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Tue, 24 Jul 2018 08:16:38 +0200 Subject: [PATCH 11/14] [HttpKernel] Fix merging bindings for controllers' locators --- ...RegisterControllerArgumentLocatorsPass.php | 2 +- ...sterControllerArgumentLocatorsPassTest.php | 24 +++++++++++++++++++ .../Component/HttpKernel/composer.json | 4 ++-- 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php b/src/Symfony/Component/HttpKernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php index cb88594e3a..cb05f6fbeb 100644 --- a/src/Symfony/Component/HttpKernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php +++ b/src/Symfony/Component/HttpKernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php @@ -60,7 +60,7 @@ class RegisterControllerArgumentLocatorsPass implements CompilerPassInterface while ($def instanceof ChildDefinition) { $def = $container->findDefinition($def->getParent()); $class = $class ?: $def->getClass(); - $bindings = $def->getBindings(); + $bindings += $def->getBindings(); } $class = $parameterBag->resolveValue($class); diff --git a/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php b/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php index 4016deb4ab..a3f8d8dfb4 100644 --- a/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php @@ -13,6 +13,7 @@ namespace Symfony\Component\HttpKernel\Tests\DependencyInjection; use PHPUnit\Framework\TestCase; use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument; +use Symfony\Component\DependencyInjection\ChildDefinition; use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerAwareTrait; use Symfony\Component\DependencyInjection\ContainerBuilder; @@ -326,6 +327,29 @@ class RegisterControllerArgumentLocatorsPassTest extends TestCase $locator = $container->getDefinition((string) $resolver->getArgument(0))->getArgument(0); $this->assertEmpty($locator); } + + public function testBindingsOnChildDefinitions() + { + $container = new ContainerBuilder(); + $resolver = $container->register('argument_resolver.service')->addArgument(array()); + + $container->register('parent', ArgumentWithoutTypeController::class); + + $container->setDefinition('child', (new ChildDefinition('parent')) + ->setBindings(array('$someArg' => new Reference('parent'))) + ->addTag('controller.service_arguments') + ); + + $pass = new RegisterControllerArgumentLocatorsPass(); + $pass->process($container); + + $locator = $container->getDefinition((string) $resolver->getArgument(0))->getArgument(0); + $this->assertInstanceOf(ServiceClosureArgument::class, $locator['child:fooAction']); + + $locator = $container->getDefinition((string) $locator['child:fooAction']->getValues()[0])->getArgument(0); + $this->assertInstanceOf(ServiceClosureArgument::class, $locator['someArg']); + $this->assertEquals(new Reference('parent'), $locator['someArg']->getValues()[0]); + } } class RegisterTestController diff --git a/src/Symfony/Component/HttpKernel/composer.json b/src/Symfony/Component/HttpKernel/composer.json index 585ab5b37d..9ad3877ba1 100644 --- a/src/Symfony/Component/HttpKernel/composer.json +++ b/src/Symfony/Component/HttpKernel/composer.json @@ -29,7 +29,7 @@ "symfony/config": "~2.8|~3.0|~4.0", "symfony/console": "~2.8|~3.0|~4.0", "symfony/css-selector": "~2.8|~3.0|~4.0", - "symfony/dependency-injection": "^3.4.5|^4.0.5", + "symfony/dependency-injection": "^3.4.10|^4.0.10", "symfony/dom-crawler": "~2.8|~3.0|~4.0", "symfony/expression-language": "~2.8|~3.0|~4.0", "symfony/finder": "~2.8|~3.0|~4.0", @@ -46,7 +46,7 @@ }, "conflict": { "symfony/config": "<2.8", - "symfony/dependency-injection": "<3.4.5|<4.0.5,>=4", + "symfony/dependency-injection": "<3.4.10|<4.0.10,>=4", "symfony/var-dumper": "<3.3", "twig/twig": "<1.34|<2.4,>=2" }, From 336008c5d3f074217407c6372a5b07d7ea8548c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Paris?= Date: Mon, 23 Jul 2018 21:45:44 +0200 Subject: [PATCH 12/14] [PhpUnitBridge] Describe weak_vendors properly --- src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php b/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php index a2528db303..2836d9136d 100644 --- a/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php +++ b/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php @@ -29,7 +29,7 @@ class DeprecationErrorHandler * * The following reporting modes are supported: * - use "weak" to hide the deprecation report but keep a global count; - * - use "weak_vendors" to act as "weak" but only for vendors; + * - use "weak_vendors" to fail only on deprecations triggered in your own code; * - use "/some-regexp/" to stop the test suite whenever a deprecation * message matches the given regular expression; * - use a number to define the upper bound of allowed deprecations, @@ -80,7 +80,7 @@ class DeprecationErrorHandler return true; } foreach ($vendors as $vendor) { - if (0 === strpos($realPath, $vendor) && false !== strpbrk(substr($realPath, strlen($vendor), 1), '/'.DIRECTORY_SEPARATOR)) { + if (0 === strpos($realPath, $vendor) && false !== strpbrk(substr($realPath, strlen($vendor), 1), '/'.\DIRECTORY_SEPARATOR)) { return true; } } @@ -159,7 +159,7 @@ class DeprecationErrorHandler echo "\n".ucfirst($group).' deprecation triggered by '.$class.'::'.$method.':'; echo "\n".$msg; echo "\nStack trace:"; - echo "\n".str_replace(' '.getcwd().DIRECTORY_SEPARATOR, ' ', $e->getTraceAsString()); + echo "\n".str_replace(' '.getcwd().\DIRECTORY_SEPARATOR, ' ', $e->getTraceAsString()); echo "\n"; exit(1); @@ -315,7 +315,7 @@ class DeprecationErrorHandler return true; } - if (DIRECTORY_SEPARATOR === '\\') { + if (\DIRECTORY_SEPARATOR === '\\') { return (function_exists('sapi_windows_vt100_support') && sapi_windows_vt100_support(STDOUT)) || false !== getenv('ANSICON') From cdc4f7ddd16e4c3e83a1926c3045dd6563ed9da6 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Thu, 26 Jul 2018 10:23:27 +0200 Subject: [PATCH 13/14] bumped Symfony version to 4.1.3 --- src/Symfony/Component/HttpKernel/Kernel.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index f536bd0b30..cbb645c2bc 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -63,12 +63,12 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl private $requestStackSize = 0; private $resetServices = false; - const VERSION = '4.1.2'; - const VERSION_ID = 40102; + const VERSION = '4.1.3-DEV'; + const VERSION_ID = 40103; const MAJOR_VERSION = 4; const MINOR_VERSION = 1; - const RELEASE_VERSION = 2; - const EXTRA_VERSION = ''; + const RELEASE_VERSION = 3; + const EXTRA_VERSION = 'DEV'; const END_OF_MAINTENANCE = '01/2019'; const END_OF_LIFE = '07/2019'; From 8305d615ab88f7bf26febade9c9e2511b0925033 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Thu, 26 Jul 2018 10:28:23 +0200 Subject: [PATCH 14/14] fix merge --- .../RegisterControllerArgumentLocatorsPassTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php b/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php index f946867fce..61ab87a33a 100644 --- a/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php @@ -357,9 +357,9 @@ class RegisterControllerArgumentLocatorsPassTest extends TestCase $pass->process($container); $locator = $container->getDefinition((string) $resolver->getArgument(0))->getArgument(0); - $this->assertInstanceOf(ServiceClosureArgument::class, $locator['child:fooAction']); + $this->assertInstanceOf(ServiceClosureArgument::class, $locator['child::fooAction']); - $locator = $container->getDefinition((string) $locator['child:fooAction']->getValues()[0])->getArgument(0); + $locator = $container->getDefinition((string) $locator['child::fooAction']->getValues()[0])->getArgument(0); $this->assertInstanceOf(ServiceClosureArgument::class, $locator['someArg']); $this->assertEquals(new Reference('parent'), $locator['someArg']->getValues()[0]); }