Skip to content

Commit

Permalink
Merge pull request #2750 from teohhanhui/fix/ContainerBuilder-removeB…
Browse files Browse the repository at this point in the history
…indings

Rename ContainerBuilder::addRemovedBindingId to ContainerBuilder::removeBindings
  • Loading branch information
teohhanhui committed Apr 27, 2019
2 parents 9222ded + 447f6a6 commit 79bd9b3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ parameters:
message: '#Method ApiPlatform\\Core\\Bridge\\Doctrine\\Orm\\Util\\QueryBuilderHelper::mapJoinAliases() should return array<string, array<string>\|string> but returns array<int|string, mixed>\.#'
path: %currentWorkingDirectory%/src/Bridge/Doctrine/Orm/Util/QueryBuilderHelper.php
-
message: "#Call to function method_exists\\(\\) with 'Symfony\\\\\\\\Component.+' and 'addRemovedBindingIds?' will always evaluate to false\\.#"
message: "#Call to function method_exists\\(\\) with 'Symfony\\\\\\\\Component.+' and '(removeBindings|addRemovedBindingIds)' will always evaluate to false\\.#"
path: %currentWorkingDirectory%/tests/Bridge/Symfony/Bundle/DependencyInjection/ApiPlatformExtensionTest.php
- "#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\\.#"
# https://github.com/doctrine/doctrine2/pull/7298/files
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -845,10 +845,10 @@ private function getPartialContainerBuilderProphecy()

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

Expand Down

0 comments on commit 79bd9b3

Please sign in to comment.