Container*::getServiceIds() should return an array of string
see #32549
This commit is contained in:
parent
9e4d5ff47d
commit
9c88caad31
|
@ -386,7 +386,7 @@ class Container implements ResettableContainerInterface
|
|||
/**
|
||||
* Gets all service ids.
|
||||
*
|
||||
* @return array An array of all defined service ids
|
||||
* @return string[] An array of all defined service ids
|
||||
*/
|
||||
public function getServiceIds()
|
||||
{
|
||||
|
@ -405,7 +405,7 @@ class Container implements ResettableContainerInterface
|
|||
}
|
||||
$ids[] = 'service_container';
|
||||
|
||||
return array_unique(array_merge($ids, array_keys($this->methodMap), array_keys($this->fileMap), array_keys($this->services)));
|
||||
return array_map('strval', array_unique(array_merge($ids, array_keys($this->methodMap), array_keys($this->fileMap), array_keys($this->services))));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -815,13 +815,11 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
|||
}
|
||||
|
||||
/**
|
||||
* Gets all service ids.
|
||||
*
|
||||
* @return array An array of all defined service ids
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getServiceIds()
|
||||
{
|
||||
return array_unique(array_merge(array_keys($this->getDefinitions()), array_keys($this->aliasDefinitions), parent::getServiceIds()));
|
||||
return array_map('strval', array_unique(array_merge(array_keys($this->getDefinitions()), array_keys($this->aliasDefinitions), parent::getServiceIds())));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Reference in New Issue