Skip to content
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

Support FQCN service names for Sensio Framework Extra Bundle #395

Merged
merged 1 commit into from
Nov 6, 2017

Conversation

emodric
Copy link
Contributor

@emodric emodric commented Nov 2, 2017

From version 4.0 and up, ControllerListener service from SensioFrameworkExtraBundle has been renamed to use FQCN as service name, so this adds support for the old and new name.

master branch also needs this fix, however, the compiler pass has been renamed to TagListenerPass, so probably needs manual merge.

@dbu
Copy link
Contributor

dbu commented Nov 6, 2017

hi, thanks for looking into this! the 1.3 branch is in maintenance mode and does not allow symfony 4, i don't think we want to update this branch to ever support symfony 4. can you please redo this PR against the master branch instead?

@emodric
Copy link
Contributor Author

emodric commented Nov 6, 2017

Hi @dbu!

It's not about Symfony 4, but SensioFrameworkExtraBundle 4.x :)

I can redo the patch on the master branch, but then it would be great if 1.3 branch limited sensio extra bundle to 3.x, to disallow installing higher versions.

Copy link
Contributor

@dbu dbu left a comment

Choose a reason for hiding this comment

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

ah, need to read more closely. thanks for the clarification.

i see that in require-dev we limit the extra bundle to 2.3 or 3, but we indeed do not specify that 4 is not compatible. the fix is small enough, lets put it into 1.3 then. if i do a patch version that conflicts with framework extra 4, composer will just install the previous patch version of fos httpcache bundle and we still have the problem.

there is a mistake in the PR, can you please fix that? and can you rebase your branch on 1.3 to get the latest styleci fixes please?

private function hasControllerListener()
{
return $container->has('sensio_framework_extra.controller.listener') ||
$container->has('Sensio\Bundle\FrameworkExtraBundle\EventListener\ControllerListener');
Copy link
Contributor

Choose a reason for hiding this comment

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

please use \\ to make this strictly correct.

in master we can use the ::class constant, but 1.3 unfortunately still supports php 5.3


private function hasControllerListener()
{
return $container->has('sensio_framework_extra.controller.listener') ||
Copy link
Contributor

Choose a reason for hiding this comment

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

you need to pass the $container to this helper method.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Doh :D

@emodric
Copy link
Contributor Author

emodric commented Nov 6, 2017

@dbu Rebased, fixed the $container param and FQCN.

Want me to do a PR on master branch or are you merging in manually?

Copy link
Contributor

@dbu dbu left a comment

Choose a reason for hiding this comment

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

thanks a lot! i will merge 1.3 to master, trying to keep the branches in sync for fixes.

@dbu dbu merged commit bcdecd7 into FriendsOfSymfony:1.3 Nov 6, 2017
@emodric
Copy link
Contributor Author

emodric commented Nov 6, 2017

Thanks @dbu !

@dbu
Copy link
Contributor

dbu commented Nov 6, 2017

tagged https://github.com/FriendsOfSymfony/FOSHttpCacheBundle/releases/tag/1.3.11 for the 1.3 version. merging to master worked without conflicts, git understood that the file is the same and just renamed ;-)

@The-Don-Himself
Copy link

Thanks @emodric , @dbu would we also be seeing these changes in versions 2.x? I had also commented possibly running into this https://github.com/sensiolabs/SensioFrameworkExtraBundle/issues/512

@dbu
Copy link
Contributor

dbu commented Nov 7, 2017

@The-Don-Himself yes, i merged 1.3 to master to get this in 2.x as well. its here: https://github.com/FriendsOfSymfony/FOSHttpCacheBundle/blob/master/src/DependencyInjection/Compiler/TagListenerPass.php

it will be in 2.2, which will be released when symfony 3.4 is out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants