Skip to content

[FrameworkBundle] Inject @controller_name_converter in debug:router #23377

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

Conversation

chalasr
Copy link
Member

@chalasr chalasr commented Jul 4, 2017

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

Keep using the service in case it is decorated, losing laziness for this dependency (running any command will make the ControllerNameParser instantiated, #22734 could fix that in 3.4).

@ogizanagi
Copy link
Contributor

It still requires a deprecation in case you do not provide the name parser in the constructor, right? (it should not be mandatory for BC reasons).

@chalasr chalasr force-pushed the debugrouter-service branch from 81a1bf0 to e4dce22 Compare July 4, 2017 09:47
@chalasr
Copy link
Member Author

chalasr commented Jul 4, 2017

Indeed, it should not be mandatory. I updated this to make it optional, instantiating the base name parser directly if not injected. I think it's fine to not deprecate here.

@fabpot
Copy link
Member

fabpot commented Jul 4, 2017

Should be done in 3.4, right?

@ogizanagi
Copy link
Contributor

ogizanagi commented Jul 4, 2017

It intends to fix my comment in #23371 PR description:

However, the original fix prevents using the proper name parser in case it was replaced

So the target is right. However, it still "breaks" if the command is instantiated elsewhere (but it's unlikely to happen). That's why I'd expect to get at least a deprecation in case the parser isn't injected in the constructor.

As a side note: In 3.4, we could even use a service locator, or leverage on #22734 to keep dependencies lazy and get rid of the ContainerAwareCommand.

@fabpot
Copy link
Member

fabpot commented Jul 4, 2017

Adding a deprecation in 3.2 is a no-go.
This is a BC break, so cannot be done in 3.2.

@chalasr
Copy link
Member Author

chalasr commented Jul 4, 2017

Then I think #23371 should be merged.
Closing here.

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