Merge branch '2.7' into 2.8
* 2.7: [2.7] Fix tests pass triggerDeprecationError arg to parent class remove default null value for asset version remove duplicated value [DependencyInjection] simplify the BC layer Change couple of occurences of a public setUp() method to protected
This commit is contained in:
commit
8a95ec5303
|
@ -13,7 +13,7 @@ class AppVariableTest extends \PHPUnit_Framework_TestCase
|
|||
*/
|
||||
protected $appVariable;
|
||||
|
||||
public function setUp()
|
||||
protected function setUp()
|
||||
{
|
||||
$this->appVariable = new AppVariable();
|
||||
}
|
||||
|
|
|
@ -600,7 +600,6 @@ class Configuration implements ConfigurationInterface
|
|||
->fixXmlConfig('base_url')
|
||||
->children()
|
||||
->scalarNode('version')
|
||||
->defaultNull()
|
||||
->beforeNormalization()
|
||||
->ifTrue(function ($v) { return '' === $v; })
|
||||
->then(function ($v) { return; })
|
||||
|
|
|
@ -21,7 +21,7 @@ class LegacyApcUniversalClassLoaderTest extends \PHPUnit_Framework_TestCase
|
|||
protected function setUp()
|
||||
{
|
||||
if (ini_get('apc.enabled') && ini_get('apc.enable_cli')) {
|
||||
apcu_clear_cache('user');
|
||||
apcu_clear_cache();
|
||||
} else {
|
||||
$this->markTestSkipped('APC is not enabled.');
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ class LegacyApcUniversalClassLoaderTest extends \PHPUnit_Framework_TestCase
|
|||
protected function tearDown()
|
||||
{
|
||||
if (ini_get('apc.enabled') && ini_get('apc.enable_cli')) {
|
||||
apcu_clear_cache('user');
|
||||
apcu_clear_cache();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -44,10 +44,7 @@ class ResolveReferencesToAliasesPass implements CompilerPassInterface
|
|||
$definition->setMethodCalls($this->processArguments($definition->getMethodCalls()));
|
||||
$definition->setProperties($this->processArguments($definition->getProperties()));
|
||||
$definition->setFactory($this->processFactory($definition->getFactory()));
|
||||
|
||||
if (null !== $factoryService = $definition->getFactoryService(false)) {
|
||||
$definition->setFactoryService($this->processFactoryService($factoryService));
|
||||
}
|
||||
$definition->setFactoryService($this->processFactoryService($definition->getFactoryService(false)), false);
|
||||
}
|
||||
|
||||
foreach ($container->getAliases() as $id => $alias) {
|
||||
|
|
|
@ -200,9 +200,11 @@ class Definition
|
|||
*
|
||||
* @deprecated since version 2.6, to be removed in 3.0.
|
||||
*/
|
||||
public function setFactoryService($factoryService)
|
||||
public function setFactoryService($factoryService, $triggerDeprecationError = true)
|
||||
{
|
||||
@trigger_error(sprintf('%s(%s) is deprecated since version 2.6 and will be removed in 3.0. Use Definition::setFactory() instead.', __METHOD__, $factoryService), E_USER_DEPRECATED);
|
||||
if ($triggerDeprecationError) {
|
||||
@trigger_error(sprintf('%s(%s) is deprecated since version 2.6 and will be removed in 3.0. Use Definition::setFactory() instead.', __METHOD__, $factoryService), E_USER_DEPRECATED);
|
||||
}
|
||||
|
||||
$this->factoryService = $factoryService;
|
||||
|
||||
|
|
|
@ -99,11 +99,11 @@ class DefinitionDecorator extends Definition
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setFactoryService($service)
|
||||
public function setFactoryService($service, $triggerDeprecationError = true)
|
||||
{
|
||||
$this->changes['factory_service'] = true;
|
||||
|
||||
return parent::setFactoryService($service);
|
||||
return parent::setFactoryService($service, $triggerDeprecationError);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -21,7 +21,7 @@ class ExtensionCompilerPassTest extends \PHPUnit_Framework_TestCase
|
|||
private $container;
|
||||
private $pass;
|
||||
|
||||
public function setUp()
|
||||
protected function setUp()
|
||||
{
|
||||
$this->container = $this->getMock('Symfony\Component\DependencyInjection\ContainerBuilder');
|
||||
$this->pass = new ExtensionCompilerPass();
|
||||
|
|
|
@ -416,7 +416,7 @@ class ChoiceType extends AbstractType
|
|||
$resolver->setAllowedTypes('choice_value', array('null', 'callable', 'string', 'Symfony\Component\PropertyAccess\PropertyPath'));
|
||||
$resolver->setAllowedTypes('choice_attr', array('null', 'array', 'callable', 'string', 'Symfony\Component\PropertyAccess\PropertyPath'));
|
||||
$resolver->setAllowedTypes('preferred_choices', array('array', '\Traversable', 'callable', 'string', 'Symfony\Component\PropertyAccess\PropertyPath'));
|
||||
$resolver->setAllowedTypes('group_by', array('null', 'array', '\Traversable', 'string', 'callable', 'string', 'Symfony\Component\PropertyAccess\PropertyPath'));
|
||||
$resolver->setAllowedTypes('group_by', array('null', 'array', '\Traversable', 'callable', 'string', 'Symfony\Component\PropertyAccess\PropertyPath'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Reference in New Issue