Merge branch '2.7' into 2.8

* 2.7:
  [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
  [DependencyInjection] Suggest ExpressionLanguage in composer.json
This commit is contained in:
Fabien Potencier 2016-05-09 13:12:35 -05:00
commit 766393de8a
7 changed files with 12 additions and 3 deletions

View File

@ -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');

View File

@ -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);
}

View File

@ -100,6 +100,8 @@ class WebProfilerExtensionTest extends TestCase
$this->assertSame($listenerEnabled, $this->container->get('web_profiler.debug_toolbar')->isEnabled());
}
$this->assertSame($enabled, $this->container->get('web_profiler.debug_toolbar')->isEnabled());
$this->assertSaneContainer($this->getDumpedContainer());
}

View File

@ -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": {

View File

@ -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.

View File

@ -26,7 +26,7 @@ class AnonymousToken extends AbstractToken
* Constructor.
*
* @param string $secret A secret used to make sure the token is created by the app and not by a malicious client
* @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($secret, $user, array $roles = array())

View File

@ -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