Skip to content

Commit 79bd9b3

Browse files
authored
Merge pull request #2750 from teohhanhui/fix/ContainerBuilder-removeBindings
Rename ContainerBuilder::addRemovedBindingId to ContainerBuilder::removeBindings
2 parents 9222ded + 447f6a6 commit 79bd9b3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

phpstan.neon.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ parameters:
7171
message: '#Method ApiPlatform\\Core\\Bridge\\Doctrine\\Orm\\Util\\QueryBuilderHelper::mapJoinAliases() should return array<string, array<string>\|string> but returns array<int|string, mixed>\.#'
7272
path: %currentWorkingDirectory%/src/Bridge/Doctrine/Orm/Util/QueryBuilderHelper.php
7373
-
74-
message: "#Call to function method_exists\\(\\) with 'Symfony\\\\\\\\Component.+' and 'addRemovedBindingIds?' will always evaluate to false\\.#"
74+
message: "#Call to function method_exists\\(\\) with 'Symfony\\\\\\\\Component.+' and '(removeBindings|addRemovedBindingIds)' will always evaluate to false\\.#"
7575
path: %currentWorkingDirectory%/tests/Bridge/Symfony/Bundle/DependencyInjection/ApiPlatformExtensionTest.php
7676
- "#Call to method PHPUnit\\\\Framework\\\\Assert::assertSame\\(\\) with array\\('(collection_context|item_context|subresource_context)'\\) and array<Symfony\\\\Component\\\\VarDumper\\\\Cloner\\\\Data>\\|bool\\|float\\|int\\|string\\|null will always evaluate to false\\.#"
7777
# https://github.com/doctrine/doctrine2/pull/7298/files

tests/Bridge/Symfony/Bundle/DependencyInjection/ApiPlatformExtensionTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -845,10 +845,10 @@ private function getPartialContainerBuilderProphecy()
845845

846846
// irrelevant, but to prevent errors
847847
// https://github.com/symfony/symfony/pull/29944
848-
if (method_exists(ContainerBuilder::class, 'addRemovedBindingId')) {
849-
$containerBuilderProphecy->addRemovedBindingId(Argument::type('string'))->will(function () {});
848+
if (method_exists(ContainerBuilder::class, 'removeBindings')) {
849+
$containerBuilderProphecy->removeBindings(Argument::type('string'))->will(function () {});
850850
} elseif (method_exists(ContainerBuilder::class, 'addRemovedBindingIds')) {
851-
// https://github.com/symfony/symfony/pull/31173
851+
// remove this once https://github.com/symfony/symfony/pull/31173 is released
852852
$containerBuilderProphecy->addRemovedBindingIds(Argument::type('string'))->will(function () {});
853853
}
854854

0 commit comments

Comments
 (0)