Skip to content

Commit 273688c

Browse files
committed
Merge branch '2.8' into 3.0
* 2.8: [2.3][Component/Security] Fixed phpdoc in AnonymousToken constructor for user param prevent calling get() for service_container service call get() after the container was compiled Fixed readme of OptionsResolver top-level anonymous services must be public [DependencyInjection] Suggest ExpressionLanguage in composer.json added a conflict between Monolog bridge 2.8 and HTTP Kernel 3.0+
2 parents 8950500 + 766393d commit 273688c

File tree

10 files changed

+20
-8
lines changed

10 files changed

+20
-8
lines changed

src/Symfony/Bridge/Monolog/composer.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
"symfony/console": "~2.8|~3.0",
2525
"symfony/event-dispatcher": "~2.8|~3.0"
2626
},
27+
"conflict": {
28+
"symfony/http-kernel": ">=3.0"
29+
},
2730
"suggest": {
2831
"symfony/http-kernel": "For using the debugging handlers together with the response life cycle of the HTTP kernel.",
2932
"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.",

src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/ContainerBuilderTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ public function testCreateProxyServiceWithRuntimeInstantiator()
3333
$builder->register('foo1', 'ProxyManagerBridgeFooClass')->setFile(__DIR__.'/Fixtures/includes/foo.php');
3434
$builder->getDefinition('foo1')->setLazy(true);
3535

36+
$builder->compile();
37+
3638
/* @var $foo1 \ProxyManager\Proxy\LazyLoadingInterface|\ProxyManager\Proxy\ValueHolderInterface */
3739
$foo1 = $builder->get('foo1');
3840

src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,10 @@ protected function resolveServiceDefinition(ContainerBuilder $builder, $serviceI
256256
return $builder->getAlias($serviceId);
257257
}
258258

259+
if ('service_container' === $serviceId) {
260+
return $builder;
261+
}
262+
259263
// the service has been injected in some special way, just return the service
260264
return $builder->get($serviceId);
261265
}

src/Symfony/Bundle/WebProfilerBundle/Tests/DependencyInjection/WebProfilerExtensionTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ public function testToolbarConfig($toolbarEnabled, $interceptRedirects, $listene
100100
$this->assertSame($listenerEnabled, $this->container->get('web_profiler.debug_toolbar')->isEnabled());
101101
}
102102

103+
$this->assertSame($enabled, $this->container->get('web_profiler.debug_toolbar')->isEnabled());
104+
103105
$this->assertSaneContainer($this->getDumpedContainer());
104106
}
105107

src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,10 @@ private function processAnonymousServices(\DOMDocument $xml, $file)
292292
if ($services = $this->getChildren($node, 'service')) {
293293
$definitions[$id] = array($services[0], $file, false);
294294
$services[0]->setAttribute('id', $id);
295+
296+
// anonymous services are always private
297+
// we could not use the constant false here, because of XML parsing
298+
$services[0]->setAttribute('public', 'false');
295299
}
296300
}
297301
}
@@ -309,10 +313,6 @@ private function processAnonymousServices(\DOMDocument $xml, $file)
309313
// resolve definitions
310314
krsort($definitions);
311315
foreach ($definitions as $id => list($domElement, $file, $wild)) {
312-
// anonymous services are always private
313-
// we could not use the constant false here, because of XML parsing
314-
$domElement->setAttribute('public', 'false');
315-
316316
if (null !== $definition = $this->parseDefinition($domElement, $file)) {
317317
$this->container->setDefinition($id, $definition);
318318
}

src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ public function testLoadAnonymousServices()
200200
$service = $container->getDefinition($id);
201201
}
202202
$this->assertEquals('BizClass', $service->getClass(), '->load() uses the same configuration as for the anonymous ones');
203-
$this->assertFalse($service->isPublic());
203+
$this->assertTrue($service->isPublic());
204204

205205
// anonymous services are shared when using decoration definitions
206206
$container->compile();

src/Symfony/Component/DependencyInjection/composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"suggest": {
2727
"symfony/yaml": "",
2828
"symfony/config": "",
29+
"symfony/expression-language": "For using expressions in service container configuration",
2930
"symfony/proxy-manager-bridge": "Generate service proxies to lazy load them"
3031
},
3132
"autoload": {

src/Symfony/Component/OptionsResolver/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
OptionsResolver Component
22
=========================
33

4-
The OptionsResolver component is `array_replace on steroids. It allows you to
4+
The OptionsResolver component is `array_replace` on steroids. It allows you to
55
create an options system with required options, defaults, validation (type,
66
value), normalization and more.
77

src/Symfony/Component/Security/Core/Authentication/Token/AnonymousToken.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class AnonymousToken extends AbstractToken
2626
* Constructor.
2727
*
2828
* @param string $secret A secret used to make sure the token is created by the app and not by a malicious client
29-
* @param string $user The user
29+
* @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.
3030
* @param RoleInterface[] $roles An array of roles
3131
*/
3232
public function __construct($secret, $user, array $roles = array())

src/Symfony/Component/Security/Core/Authentication/Token/PreAuthenticatedToken.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class PreAuthenticatedToken extends AbstractToken
2626
/**
2727
* Constructor.
2828
*
29-
* @param string|object $user The user
29+
* @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.
3030
* @param mixed $credentials The user credentials
3131
* @param string $providerKey The provider key
3232
* @param RoleInterface[]|string[] $roles An array of roles

0 commit comments

Comments
 (0)