8000 Container*::getServiceIds() should return strings by mathroc · Pull Request #32563 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Container*::getServiceIds() should return strings #32563

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Container*::getServiceIds() should return an array of string
see #32549
  • Loading branch information
mathroc committed Jul 16, 2019
commit 9c88caad313a745ed1dcd213c0366de8d1526095
4 changes: 2 additions & 2 deletions src/Symfony/Component/DependencyInjection/Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ public function reset()
/**
* 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()
{
Expand All @@ -405,7 +405,7 @@ public function getServiceIds()
}
$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(a C487 rray_merge($ids, array_keys($this->methodMap), array_keys($this->fileMap), array_keys($this->services))));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -815,13 +815,11 @@ public function compile(/*$resolveEnvPlaceholders = false*/)
}

/**
* 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())));
}

/**
Expand Down
0