Skip to content

Commit

Permalink
minor #31173 Fix name and phpdoc of ContainerBuilder::removeBindings …
Browse files Browse the repository at this point in the history
…(teohhanhui)

This PR was merged into the 3.4 branch.

Discussion
----------

Fix name and phpdoc of ContainerBuilder::removeBindings

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #29944 (comment)
| License       | MIT
| Doc PR        | N/A

<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - Bug fixes must be submitted against the lowest branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against the master branch.
-->

Commits
-------

c93194d Fix name and phpdoc of ContainerBuilder::removeBindings
  • Loading branch information
nicolas-grekas committed Apr 27, 2019
2 parents f033ea4 + c93194d commit eaba717
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Expand Up @@ -1527,13 +1527,13 @@ public function getRemovedBindingIds()
}

/**
* Adds a removed binding id.
* Removes bindings for a service.
*
* @param int $id
* @param string $id The service identifier
*
* @internal
*/
public function addRemovedBindingIds($id)
public function removeBindings($id)
{
if ($this->hasDefinition($id)) {
foreach ($this->getDefinition($id)->getBindings() as $key => $binding) {
Expand Down
Expand Up @@ -59,7 +59,7 @@ public function __destruct()
{
parent::__destruct();

$this->container->addRemovedBindingIds($this->id);
$this->container->removeBindings($this->id);

if (!$this->definition instanceof ChildDefinition) {
$this->container->setDefinition($this->id, $this->definition->setInstanceofConditionals($this->instanceof));
Expand Down
Expand Up @@ -91,7 +91,7 @@ public function registerClasses(Definition $prototype, $namespace, $resource, $e
*/
protected function setDefinition($id, Definition $definition)
{
$this->container->addRemovedBindingIds($id);
$this->container->removeBindings($id);

if ($this->isLoadingInstanceof) {
if (!$definition instanceof ChildDefinition) {
Expand Down

0 comments on commit eaba717

Please sign in to comment.