Skip to content

Commit a0c4356

Browse files
Remove all "nullable-by-default-value" setters
1 parent 2555351 commit a0c4356

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ CHANGELOG
99
* Add `enum` env var processor
1010
* Add `shuffle` env var processor
1111
* Allow #[When] to be extended
12-
* Change the signature of `ContainerAwareInterface::setContainer()` to `setContainer(?ContainerInterface $container)`
12+
* Change the signature of `ContainerAwareInterface::setContainer()` to `setContainer(?ContainerInterface)`
1313
* Deprecate calling `ContainerAwareTrait::setContainer()` without arguments
1414

1515
6.1

ContainerAwareTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ trait ContainerAwareTrait
2626
public function setContainer(ContainerInterface $container = null)
2727
{
2828
if (1 > \func_num_args()) {
29-
trigger_deprecation('symfony/dependency-injection', '6.2', 'Calling "%s::%s()" without any arguments is deprecated. Please explicitly pass null if you want to unset the container.', static::class, __FUNCTION__);
29+
trigger_deprecation('symfony/dependency-injection', '6.2', 'Calling "%s::%s()" without any arguments is deprecated, pass null explicitly instead.', __CLASS__, __FUNCTION__);
3030
}
3131

3232
$this->container = $container;

Tests/ContainerAwareTraitTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function testSetContainerLegacy()
3333

3434
self::assertSame($container, $dummy->getContainer());
3535

36-
$this->expectDeprecation('Since symfony/dependency-injection 6.2: Calling "Symfony\Component\DependencyInjection\Tests\ContainerAwareDummy::setContainer()" without any arguments is deprecated. Please explicitly pass null if you want to unset the container.');
36+
$this->expectDeprecation('Since symfony/dependency-injection 6.2: Calling "Symfony\Component\DependencyInjection\Tests\ContainerAwareDummy::setContainer()" without any arguments is deprecated, pass null explicitly instead.');
3737

3838
$dummy->setContainer();
3939
self::assertNull($dummy->getContainer());

0 commit comments

Comments
 (0)