From 59ffd04d184776d03c83383718b8166811091ca4 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 4 May 2016 18:16:16 +0200 Subject: [PATCH 1/7] added a conflict between Monolog bridge 2.8 and HTTP Kernel 3.0+ --- src/Symfony/Bridge/Monolog/composer.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Symfony/Bridge/Monolog/composer.json b/src/Symfony/Bridge/Monolog/composer.json index 500a9f57c4..433e0e103f 100644 --- a/src/Symfony/Bridge/Monolog/composer.json +++ b/src/Symfony/Bridge/Monolog/composer.json @@ -24,6 +24,9 @@ "symfony/console": "~2.4|~3.0.0", "symfony/event-dispatcher": "~2.2|~3.0.0" }, + "conflict": { + "symfony/http-kernel": ">=3.0" + }, "suggest": { "symfony/http-kernel": "For using the debugging handlers together with the response life cycle of the HTTP kernel.", "symfony/console": "For the possibility to show log messages in console commands depending on verbosity settings. You need version ~2.3 of the console for it.", From d6c9073ec2d9c86503944d5650d84195a60f2de8 Mon Sep 17 00:00:00 2001 From: Robin Chalas Date: Mon, 2 May 2016 22:11:35 +0200 Subject: [PATCH 2/7] [DependencyInjection] Suggest ExpressionLanguage in composer.json Add a suggestion message Fix wrong message --- src/Symfony/Component/DependencyInjection/composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Symfony/Component/DependencyInjection/composer.json b/src/Symfony/Component/DependencyInjection/composer.json index c2b2550607..d42c7a0c6c 100644 --- a/src/Symfony/Component/DependencyInjection/composer.json +++ b/src/Symfony/Component/DependencyInjection/composer.json @@ -29,6 +29,7 @@ "suggest": { "symfony/yaml": "", "symfony/config": "", + "symfony/expression-language": "For using expressions in service container configuration", "symfony/proxy-manager-bridge": "Generate service proxies to lazy load them" }, "autoload": { From 13a47c3c6ddd9e5287ece292b9cc57d77dd22c5c Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Wed, 4 May 2016 21:53:17 +0200 Subject: [PATCH 3/7] top-level anonymous services must be public --- .../Component/DependencyInjection/Loader/XmlFileLoader.php | 6 +++--- .../DependencyInjection/Tests/Loader/XmlFileLoaderTest.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php b/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php index 0314ba6809..f324aa969c 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php +++ b/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php @@ -237,6 +237,9 @@ class XmlFileLoader extends FileLoader $definitions[(string) $node['id']] = array($node->service, $file, false); $node->service['id'] = (string) $node['id']; + + // anonymous services are always private + $node->service['public'] = false; } } @@ -254,9 +257,6 @@ class XmlFileLoader extends FileLoader // resolve definitions krsort($definitions); foreach ($definitions as $id => $def) { - // anonymous services are always private - $def[0]['public'] = false; - $this->parseDefinition($id, $def[0], $def[1]); $oNode = dom_import_simplexml($def[0]); diff --git a/src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php b/src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php index 38ee13d5ff..a8f8f35133 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php @@ -158,7 +158,7 @@ class XmlFileLoaderTest extends \PHPUnit_Framework_TestCase $service = $container->getDefinition($id); } $this->assertEquals('BizClass', $service->getClass(), '->load() uses the same configuration as for the anonymous ones'); - $this->assertFalse($service->isPublic()); + $this->assertTrue($service->isPublic()); // anonymous services are shared when using decoration definitions $container->compile(); From beecc6c1bed7c5967d80a995e2185da9f5cff7d8 Mon Sep 17 00:00:00 2001 From: Francis Besset Date: Fri, 6 May 2016 22:13:08 +0200 Subject: [PATCH 4/7] Fixed readme of OptionsResolver --- src/Symfony/Component/OptionsResolver/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/OptionsResolver/README.md b/src/Symfony/Component/OptionsResolver/README.md index 5768f68e7f..245e69b548 100644 --- a/src/Symfony/Component/OptionsResolver/README.md +++ b/src/Symfony/Component/OptionsResolver/README.md @@ -1,7 +1,7 @@ OptionsResolver Component ========================= -The OptionsResolver component is `array_replace on steroids. It allows you to +The OptionsResolver component is `array_replace` on steroids. It allows you to create an options system with required options, defaults, validation (type, value), normalization and more. From 954126b04f8650f31d50156af6723afa18e88bda Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Mon, 9 May 2016 17:02:09 +0200 Subject: [PATCH 5/7] call get() after the container was compiled --- .../ProxyManager/Tests/LazyProxy/ContainerBuilderTest.php | 2 ++ .../Tests/DependencyInjection/WebProfilerExtensionTest.php | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/ContainerBuilderTest.php b/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/ContainerBuilderTest.php index ae13d543b0..3f3c577b84 100644 --- a/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/ContainerBuilderTest.php +++ b/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/ContainerBuilderTest.php @@ -33,6 +33,8 @@ class ContainerBuilderTest extends \PHPUnit_Framework_TestCase $builder->register('foo1', 'ProxyManagerBridgeFooClass')->setFile(__DIR__.'/Fixtures/includes/foo.php'); $builder->getDefinition('foo1')->setLazy(true); + $builder->compile(); + /* @var $foo1 \ProxyManager\Proxy\LazyLoadingInterface|\ProxyManager\Proxy\ValueHolderInterface */ $foo1 = $builder->get('foo1'); diff --git a/src/Symfony/Bundle/WebProfilerBundle/Tests/DependencyInjection/WebProfilerExtensionTest.php b/src/Symfony/Bundle/WebProfilerBundle/Tests/DependencyInjection/WebProfilerExtensionTest.php index 765d721842..7ddb4dbd35 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Tests/DependencyInjection/WebProfilerExtensionTest.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Tests/DependencyInjection/WebProfilerExtensionTest.php @@ -99,9 +99,9 @@ class WebProfilerExtensionTest extends TestCase $extension = new WebProfilerExtension(); $extension->load(array(array('toolbar' => $enabled)), $this->container); - $this->assertSame($enabled, $this->container->get('web_profiler.debug_toolbar')->isEnabled()); - $this->assertSaneContainer($this->getDumpedContainer()); + + $this->assertSame($enabled, $this->container->get('web_profiler.debug_toolbar')->isEnabled()); } public function getDebugModes() From 2d46bd4812110a518e28b50230f4ca50e4ca25c8 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Mon, 9 May 2016 17:02:20 +0200 Subject: [PATCH 6/7] prevent calling get() for service_container service --- .../Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php index d6e0c14da4..33334e7992 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php @@ -274,6 +274,10 @@ abstract class Descriptor implements DescriptorInterface return $builder->getAlias($serviceId); } + if ('service_container' === $serviceId) { + return $builder; + } + // the service has been injected in some special way, just return the service return $builder->get($serviceId); } From b1c60b4f0d9861586cb870a723f8fa94a01c84ec Mon Sep 17 00:00:00 2001 From: Erik van Wingerden Date: Mon, 9 May 2016 09:52:08 +0200 Subject: [PATCH 7/7] [2.3][Component/Security] Fixed phpdoc in AnonymousToken constructor for user param --- .../Security/Core/Authentication/Token/AnonymousToken.php | 2 +- .../Core/Authentication/Token/PreAuthenticatedToken.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/Security/Core/Authentication/Token/AnonymousToken.php b/src/Symfony/Component/Security/Core/Authentication/Token/AnonymousToken.php index 571816ca9e..5f3241f20d 100644 --- a/src/Symfony/Component/Security/Core/Authentication/Token/AnonymousToken.php +++ b/src/Symfony/Component/Security/Core/Authentication/Token/AnonymousToken.php @@ -26,7 +26,7 @@ class AnonymousToken extends AbstractToken * Constructor. * * @param string $key The key shared with the authentication provider - * @param string $user The user + * @param string|object $user The user can be a UserInterface instance, or an object implementing a __toString method or the username as a regular string. * @param RoleInterface[] $roles An array of roles */ public function __construct($key, $user, array $roles = array()) diff --git a/src/Symfony/Component/Security/Core/Authentication/Token/PreAuthenticatedToken.php b/src/Symfony/Component/Security/Core/Authentication/Token/PreAuthenticatedToken.php index 1798203690..5a3fc95327 100644 --- a/src/Symfony/Component/Security/Core/Authentication/Token/PreAuthenticatedToken.php +++ b/src/Symfony/Component/Security/Core/Authentication/Token/PreAuthenticatedToken.php @@ -26,7 +26,7 @@ class PreAuthenticatedToken extends AbstractToken /** * Constructor. * - * @param string|object $user The user + * @param string|object $user The user can be a UserInterface instance, or an object implementing a __toString method or the username as a regular string. * @param mixed $credentials The user credentials * @param string $providerKey The provider key * @param RoleInterface[]|string[] $roles An array of roles