Skip to content

[DependencyInjection] Ignore tags of abstract services #21761

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
GuilhemN opened this issue Feb 25, 2017 · 3 comments
Closed

[DependencyInjection] Ignore tags of abstract services #21761

GuilhemN opened this issue Feb 25, 2017 · 3 comments
Labels
DependencyInjection RFC RFC = Request For Comments (proposals about features that you want to be discussed)

Comments

@GuilhemN
Copy link
Contributor

GuilhemN commented Feb 25, 2017

Q A
Bug report? no
Feature request? no
BC Break report? no
RFC? yes
Symfony version master

As pointed by @nicolas-grekas, tags of abstract services can now be inherited so we should probably stop throwing exceptions when having the case and just ignore them.
I suggest to do this by adding an argument to ContainerBuilder::findTaggedServiceIds:

public function findTaggedServiceIds(string $name, bool $ignoreAbstractServices = false);
@javiereguiluz javiereguiluz added DependencyInjection RFC RFC = Request For Comments (proposals about features that you want to be discussed) labels Feb 25, 2017
@chalasr
Copy link
Member

chalasr commented Feb 27, 2017

Sadly adding an argument to a public method is forbidden by the BC promise, even with a default value.

Edit: We can use func_get_args and uncomment the argument in 4.0.

@GuilhemN
Copy link
Contributor Author

GuilhemN commented Feb 27, 2017

@chalasr btw this tip should be mentionned on http://symfony.com/doc/current/contributing/code/bc.html imo, most people do not know it.

@nicolas-grekas
Copy link
Member

nicolas-grekas commented Feb 27, 2017

Let's just not add any argument and deal with that inline in each Pass.

fabpot added a commit that referenced this issue Mar 17, 2017
This PR was merged into the 3.3-dev branch.

Discussion
----------

Skip abstract definitions in compiler passes

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #21761
| License       | MIT
| Doc PR        | n/a

Commits
-------

fc1ba0d Skip abstract definitions in compiler passes
@fabpot fabpot closed this as completed Mar 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DependencyInjection RFC RFC = Request For Comments (proposals about features that you want to be discussed)
Projects
None yet
Development

No branches or pull requests

5 participants