mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-01 06:28:46 +02:00
Updating Symfony lib and dependencies:
Package operations: 2 installs, 23 updates, 0 removals - Updating psr/log (1.1.0 => 1.1.2) - Updating symfony/debug (v3.4.30 => v3.4.35) - Updating symfony/console (v3.4.30 => v3.4.35) - Updating symfony/dotenv (v3.4.30 => v3.4.35) - Updating symfony/routing (v3.4.30 => v3.4.35) - Updating symfony/finder (v3.4.30 => v3.4.35) - Updating symfony/filesystem (v3.4.30 => v3.4.35) - Installing symfony/polyfill-util (v1.12.0) - Installing symfony/polyfill-php56 (v1.12.0) - Updating symfony/http-foundation (v3.4.30 => v3.4.35) - Updating symfony/event-dispatcher (v3.4.30 => v3.4.35) - Updating symfony/http-kernel (v3.4.30 => v3.4.35) - Updating symfony/config (v3.4.30 => v3.4.35) - Updating symfony/dependency-injection (v3.4.30 => v3.4.35) - Updating symfony/class-loader (v3.4.30 => v3.4.35) - Updating symfony/cache (v3.4.30 => v3.4.35) - Updating symfony/framework-bundle (v3.4.30 => v3.4.35) - Updating twig/twig (v1.42.2 => v1.42.4) - Updating symfony/twig-bridge (v3.4.30 => v3.4.35) - Updating symfony/twig-bundle (v3.4.30 => v3.4.35) - Updating symfony/yaml (v3.4.30 => v3.4.35) - Updating symfony/stopwatch (v3.4.30 => v3.4.35) - Updating symfony/var-dumper (v3.4.30 => v3.4.35) - Updating symfony/web-profiler-bundle (v3.4.30 => v3.4.35) - Updating symfony/css-selector (v3.4.30 => v3.4.35)
This commit is contained in:
@@ -150,10 +150,10 @@ class PhpDumperTest extends TestCase
|
||||
|
||||
/**
|
||||
* @dataProvider provideInvalidParameters
|
||||
* @expectedException \InvalidArgumentException
|
||||
*/
|
||||
public function testExportParameters($parameters)
|
||||
{
|
||||
$this->expectException('InvalidArgumentException');
|
||||
$container = new ContainerBuilder(new ParameterBag($parameters));
|
||||
$container->compile();
|
||||
$dumper = new PhpDumper($container);
|
||||
@@ -284,11 +284,11 @@ class PhpDumperTest extends TestCase
|
||||
|
||||
/**
|
||||
* @dataProvider provideInvalidFactories
|
||||
* @expectedException \Symfony\Component\DependencyInjection\Exception\RuntimeException
|
||||
* @expectedExceptionMessage Cannot dump definition
|
||||
*/
|
||||
public function testInvalidFactories($factory)
|
||||
{
|
||||
$this->expectException('Symfony\Component\DependencyInjection\Exception\RuntimeException');
|
||||
$this->expectExceptionMessage('Cannot dump definition');
|
||||
$container = new ContainerBuilder();
|
||||
$def = new Definition('stdClass');
|
||||
$def->setPublic(true);
|
||||
@@ -448,12 +448,10 @@ class PhpDumperTest extends TestCase
|
||||
$this->assertStringEqualsFile(__FILE__, $container->getParameter('random'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \Symfony\Component\DependencyInjection\Exception\EnvParameterException
|
||||
* @expectedExceptionMessage Environment variables "FOO" are never used. Please, check your container's configuration.
|
||||
*/
|
||||
public function testUnusedEnvParameter()
|
||||
{
|
||||
$this->expectException('Symfony\Component\DependencyInjection\Exception\EnvParameterException');
|
||||
$this->expectExceptionMessage('Environment variables "FOO" are never used. Please, check your container\'s configuration.');
|
||||
$container = new ContainerBuilder();
|
||||
$container->getParameter('env(FOO)');
|
||||
$container->compile();
|
||||
@@ -461,12 +459,10 @@ class PhpDumperTest extends TestCase
|
||||
$dumper->dump();
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \Symfony\Component\DependencyInjection\Exception\ParameterCircularReferenceException
|
||||
* @expectedExceptionMessage Circular reference detected for parameter "env(resolve:DUMMY_ENV_VAR)" ("env(resolve:DUMMY_ENV_VAR)" > "env(resolve:DUMMY_ENV_VAR)").
|
||||
*/
|
||||
public function testCircularDynamicEnv()
|
||||
{
|
||||
$this->expectException('Symfony\Component\DependencyInjection\Exception\ParameterCircularReferenceException');
|
||||
$this->expectExceptionMessage('Circular reference detected for parameter "env(resolve:DUMMY_ENV_VAR)" ("env(resolve:DUMMY_ENV_VAR)" > "env(resolve:DUMMY_ENV_VAR)").');
|
||||
$container = new ContainerBuilder();
|
||||
$container->setParameter('foo', '%bar%');
|
||||
$container->setParameter('bar', '%env(resolve:DUMMY_ENV_VAR)%');
|
||||
@@ -546,12 +542,8 @@ class PhpDumperTest extends TestCase
|
||||
$dumper = new PhpDumper($container);
|
||||
|
||||
$message = 'Circular reference detected for service "foo", path: "foo -> bar -> foo". Try running "composer require symfony/proxy-manager-bridge".';
|
||||
if (method_exists($this, 'expectException')) {
|
||||
$this->expectException(ServiceCircularReferenceException::class);
|
||||
$this->expectExceptionMessage($message);
|
||||
} else {
|
||||
$this->setExpectedException(ServiceCircularReferenceException::class, $message);
|
||||
}
|
||||
$this->expectException(ServiceCircularReferenceException::class);
|
||||
$this->expectExceptionMessage($message);
|
||||
|
||||
$dumper->dump();
|
||||
}
|
||||
@@ -842,6 +834,13 @@ class PhpDumperTest extends TestCase
|
||||
$this->assertEquals((object) ['bar6' => (object) []], $foo6);
|
||||
|
||||
$this->assertInstanceOf(\stdClass::class, $container->get('root'));
|
||||
|
||||
$manager3 = $container->get('manager3');
|
||||
$listener3 = $container->get('listener3');
|
||||
$this->assertSame($manager3, $listener3->manager);
|
||||
|
||||
$listener4 = $container->get('listener4');
|
||||
$this->assertInstanceOf('stdClass', $listener4);
|
||||
}
|
||||
|
||||
public function provideAlmostCircular()
|
||||
@@ -887,7 +886,7 @@ class PhpDumperTest extends TestCase
|
||||
->setPublic(true)
|
||||
->addArgument($baz);
|
||||
|
||||
$passConfig = $container->getCompiler()->getPassConfig();
|
||||
$container->getCompiler()->getPassConfig();
|
||||
$container->compile();
|
||||
|
||||
$dumper = new PhpDumper($container);
|
||||
@@ -979,7 +978,6 @@ class PhpDumperTest extends TestCase
|
||||
$container->compile();
|
||||
|
||||
$dumper = new PhpDumper($container);
|
||||
$dump = $dumper->dump();
|
||||
$this->assertStringEqualsFile(self::$fixturesPath.'/php/services_adawson.php', $dumper->dump());
|
||||
}
|
||||
|
||||
@@ -1135,6 +1133,30 @@ class PhpDumperTest extends TestCase
|
||||
$this->assertTrue($container->has('foo'));
|
||||
$this->assertSame('some value', $container->get('foo'));
|
||||
}
|
||||
|
||||
public function testAliasCanBeFoundInTheDumpedContainerWhenBothTheAliasAndTheServiceArePublic()
|
||||
{
|
||||
$container = new ContainerBuilder();
|
||||
|
||||
$container->register('foo', 'stdClass')->setPublic(true);
|
||||
$container->setAlias('bar', 'foo')->setPublic(true);
|
||||
|
||||
$container->compile();
|
||||
|
||||
// Bar is found in the compiled container
|
||||
$service_ids = $container->getServiceIds();
|
||||
$this->assertContains('bar', $service_ids);
|
||||
|
||||
$dumper = new PhpDumper($container);
|
||||
$dump = $dumper->dump(['class' => 'Symfony_DI_PhpDumper_AliasesCanBeFoundInTheDumpedContainer']);
|
||||
eval('?>'.$dump);
|
||||
|
||||
$container = new \Symfony_DI_PhpDumper_AliasesCanBeFoundInTheDumpedContainer();
|
||||
|
||||
// Bar should still be found in the compiled container
|
||||
$service_ids = $container->getServiceIds();
|
||||
$this->assertContains('bar', $service_ids);
|
||||
}
|
||||
}
|
||||
|
||||
class Rot13EnvVarProcessor implements EnvVarProcessorInterface
|
||||
|
||||
Reference in New Issue
Block a user