Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[DI] Exclude privates from getServiceIds #19707

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

Closed
wants to merge 1 commit into from
Closed

[DI] Exclude privates from getServiceIds #19707

wants to merge 1 commit into from

Conversation

ro0NL
Copy link
Contributor

@ro0NL ro0NL commented Aug 22, 2016

Q A
Branch? "master"
Bug fix? yes?
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets comma-separated list of tickets fixed by the PR, if any
License MIT
Doc PR reference to the documentation PR, if any

I guess this should happen by design: getServiceIds gives a list of ids allowed to get.

Conflicts with: #19690

@stof
Copy link
Member

stof commented Aug 22, 2016

Note that a ContainerBuilder will still return the ids of private services (as it contains a definition for it). But this is fine IMO. During the building phase, dealing with private services is expected too.

@ro0NL
Copy link
Contributor Author

ro0NL commented Aug 22, 2016

Good point.. i think its negligible indeed. I hope, with #19683, to deprecate the whole $this->privates thingy anyway.

@nicolas-grekas
Copy link
Member

So, do we consider this a bc break or not?

@ro0NL
Copy link
Contributor Author

ro0NL commented Aug 22, 2016

Im reconsidering this. It makes sense to let getServiceIds return all available service ids (implied by naming), which currently still includes privates by design.

Ie. i think the problem is different, by in general having to deal with privates in a container.

In 4.x when getting privates will throw a exception, they can be excluded from has, getServiceIds, etc. However, to throw, we must still track privates (that is why i like randomizing better, as it completely rules out privates from a container.

@ro0NL ro0NL closed this Aug 22, 2016
@ro0NL ro0NL deleted the di/exclude-privates branch August 23, 2016 10:59
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.

4 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.