Fix name and phpdoc of ContainerBuilder::removeBindings
This commit is contained in:
parent
e376c994f3
commit
c93194d1db
@ -1527,13 +1527,13 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a removed binding id.
|
* Removes bindings for a service.
|
||||||
*
|
*
|
||||||
* @param int $id
|
* @param string $id The service identifier
|
||||||
*
|
*
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
public function addRemovedBindingIds($id)
|
public function removeBindings($id)
|
||||||
{
|
{
|
||||||
if ($this->hasDefinition($id)) {
|
if ($this->hasDefinition($id)) {
|
||||||
foreach ($this->getDefinition($id)->getBindings() as $key => $binding) {
|
foreach ($this->getDefinition($id)->getBindings() as $key => $binding) {
|
||||||
|
@ -59,7 +59,7 @@ class ServiceConfigurator extends AbstractServiceConfigurator
|
|||||||
{
|
{
|
||||||
parent::__destruct();
|
parent::__destruct();
|
||||||
|
|
||||||
$this->container->addRemovedBindingIds($this->id);
|
$this->container->removeBindings($this->id);
|
||||||
|
|
||||||
if (!$this->definition instanceof ChildDefinition) {
|
if (!$this->definition instanceof ChildDefinition) {
|
||||||
$this->container->setDefinition($this->id, $this->definition->setInstanceofConditionals($this->instanceof));
|
$this->container->setDefinition($this->id, $this->definition->setInstanceofConditionals($this->instanceof));
|
||||||
|
@ -91,7 +91,7 @@ abstract class FileLoader extends BaseFileLoader
|
|||||||
*/
|
*/
|
||||||
protected function setDefinition($id, Definition $definition)
|
protected function setDefinition($id, Definition $definition)
|
||||||
{
|
{
|
||||||
$this->container->addRemovedBindingIds($id);
|
$this->container->removeBindings($id);
|
||||||
|
|
||||||
if ($this->isLoadingInstanceof) {
|
if ($this->isLoadingInstanceof) {
|
||||||
if (!$definition instanceof ChildDefinition) {
|
if (!$definition instanceof ChildDefinition) {
|
||||||
|
Reference in New Issue
Block a user