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

Conversation

mathroc
Copy link
Contributor

@mathroc mathroc commented Jul 16, 2019

Q A
Branch? 4.3
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? o
Tests pass? yes
Fixed tickets #32549
License MIT

Cast services ids to string in Container*::getServiceIds()

@mathroc mathroc changed the title Patch 3 Container*::getServiceIds() should returns strings Jul 16, 2019
@mathroc mathroc changed the title Container*::getServiceIds() should returns strings Container*::getServiceIds() should return strings Jul 16, 2019
@Tobion
Copy link
Contributor

Tobion commented Jul 16, 2019

as a bug fix this would need to be in 3.4

@@ -324,7 +324,7 @@ public function reset()
*/
public function getServiceIds()
{
return array_unique(array_merge(['service_container'], array_keys($this->fileMap), array_keys($this->methodMap), array_keys($this->services)));
return array_map(function($id) { return (string) $id;}, array_unique(array_merge(['service_container'], array_keys($this->fileMap), array_keys($this->methodMap), array_keys($this->services))));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

array_map('strval', ...)

@mathroc mathroc force-pushed the patch-3 branch 2 times, most recently from 0699716 to be9c0fb Compare July 16, 2019 15:53
@mathroc mathroc changed the base branch from 4.4 to 3.4 July 16, 2019 16:02
@mathroc mathroc changed the base branch from 3.4 to 4.4 July 16, 2019 16:03
@mathroc mathroc changed the base branch from 4.4 to 3.4 July 16, 2019 18:56
@mathroc
Copy link
Contributor Author

mathroc commented Jul 16, 2019

thank for the review. I've rebased on 3.4 and address the comments here, let me know if anything else is needed

@fabpot
Copy link
Member

fabpot commented Jul 17, 2019

Thank you @mathroc.

@fabpot fabpot merged commit 9c88caa into symfony:3.4 Jul 17, 2019
fabpot added a commit that referenced this pull request Jul 17, 2019
This PR was merged into the 3.4 branch.

Discussion
----------

Container*::getServiceIds() should return strings

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | o
| Tests pass?   | yes
| Fixed tickets | #32549
| License       | MIT

Cast services ids to string in `Container*::getServiceIds()`

Commits
-------

9c88caa Container*::getServiceIds() should return an array of string
@mathroc mathroc deleted the patch-3 branch July 17, 2019 07:05
This was referenced Jul 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants