Skip to content

Commit df7196e

Browse files
Merge branch '5.2' into 5.3
* 5.2: cs fix [DependencyInjection][Console] tighten types [Lock] fix derivating semaphore from key
2 parents 961fe8b + bdf509a commit df7196e

File tree

5 files changed

+9
-32
lines changed

5 files changed

+9
-32
lines changed

Container.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public function getParameterBag()
107107
/**
108108
* Gets a parameter.
109109
*
110-
* @return mixed
110+
* @return array|bool|string|int|float|null
111111
*
112112
* @throws InvalidArgumentException if the parameter is not defined
113113
*/
@@ -127,8 +127,8 @@ public function hasParameter(string $name)
127127
/**
128128
* Sets a parameter.
129129
*
130-
* @param string $name The parameter name
131-
* @param mixed $value The parameter value
130+
* @param string $name The parameter name
131+
* @param array|bool|string|int|float|null $value The parameter value
132132
*/
133133
public function setParameter(string $name, $value)
134134
{

ContainerInterface.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public function has(string $id);
6363
public function initialized(string $id);
6464

6565
/**
66-
* @return mixed
66+
* @return array|bool|string|int|float|null
6767
*
6868
* @throws InvalidArgumentException if the parameter is not defined
6969
*/
@@ -77,8 +77,8 @@ public function hasParameter(string $name);
7777
/**
7878
* Sets a parameter.
7979
*
80-
* @param string $name The parameter name
81-
* @param mixed $value The parameter value
80+
* @param string $name The parameter name
81+
* @param array|bool|string|int|float|null $value The parameter value
8282
*/
8383
public function setParameter(string $name, $value);
8484
}

ParameterBag/ContainerBag.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function all()
3636
/**
3737
* {@inheritdoc}
3838
*
39-
* @return mixed
39+
* @return array|bool|string|int|float|null
4040
*/
4141
public function get(string $name)
4242
{

ParameterBag/ParameterBagInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function all();
4545
/**
4646
* Gets a service container parameter.
4747
*
48-
* @return mixed The parameter value
48+
* @return array|bool|string|int|float|null
4949
*
5050
* @throws ParameterNotFoundException if the parameter is not defined
5151
*/
@@ -59,7 +59,7 @@ public function remove(string $name);
5959
/**
6060
* Sets a service container parameter.
6161
*
62-
* @param mixed $value The parameter value
62+
* @param array|bool|string|int|float|null $value The parameter value
6363
*
6464
* @throws LogicException if the parameter can not be set
6565
*/

Tests/Dumper/PhpDumperTest.php

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151
use Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber;
5252
use Symfony\Component\DependencyInjection\Tests\Fixtures\WitherStaticReturnType;
5353
use Symfony\Component\DependencyInjection\TypedReference;
54-
use Symfony\Component\DependencyInjection\Variable;
5554
use Symfony\Component\ExpressionLanguage\Expression;
5655

5756
require_once __DIR__.'/../Fixtures/includes/autowiring_classes.php';
@@ -170,28 +169,6 @@ public function testDumpCustomContainerClassWithMandatoryArgumentLessConstructor
170169
$this->assertStringEqualsFile(self::$fixturesPath.'/php/custom_container_class_with_mandatory_constructor_arguments.php', $dumper->dump(['base_class' => 'ConstructorWithMandatoryArgumentsContainer', 'namespace' => 'Symfony\Component\DependencyInjection\Tests\Fixtures\Container']));
171170
}
172171

173-
/**
174-
* @dataProvider provideInvalidParameters
175-
*/
176-
public function testExportParameters($parameters)
177-
{
178-
$this->expectException(\InvalidArgumentException::class);
179-
$container = new ContainerBuilder(new ParameterBag($parameters));
180-
$container->compile();
181-
$dumper = new PhpDumper($container);
182-
$dumper->dump();
183-
}
184-
185-
public function provideInvalidParameters()
186-
{
187-
return [
188-
[['foo' => new Definition('stdClass')]],
189-
[['foo' => new Expression('service("foo").foo() ~ (container.hasParameter("foo") ? parameter("foo") : "default")')]],
190-
[['foo' => new Reference('foo')]],
191-
[['foo' => new Variable('foo')]],
192-
];
193-
}
194-
195172
public function testAddParameters()
196173
{
197174
$container = include self::$fixturesPath.'/containers/container8.php';

0 commit comments

Comments
 (0)