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

incompatible method signature with Symfony 3.4 #30

Open
max4ever opened this issue Nov 9, 2021 · 3 comments
Open

incompatible method signature with Symfony 3.4 #30

max4ever opened this issue Nov 9, 2021 · 3 comments
Labels

Comments

@max4ever
Copy link

max4ever commented Nov 9, 2021

Hi,
I noticed that upgrading from version 1.1.0 to 1.2.0 it becomes incompatible with Symfony 3.4
Declaration of EmanueleMinotto\TwigCacheBundle\DataCollector\TwigCacheCollector::collect(Symfony\Component\HttpFoundation\Request $request, Symfony\Component\HttpFoundation\Response $response, Throwable $exception = NULL) must be compatible with Symfony\Component\HttpKernel\DataCollector\DataCollectorInterface::collect(Symfony\Component\HttpFoundation\Request $request, Symfony\Component\HttpFoundation\Response $response, Exception $exception = NULL)

Here is the link to both source code files :

https://github.com/symfony/symfony/blob/3.4/src/Symfony/Component/HttpKernel/DataCollector/DataCollectorInterface.php#L29

vs

https://github.com/EmanueleMinotto/TwigCacheBundle/blob/1.2.0/DataCollector/TwigCacheCollector.php#L37

one uses \Exception and the other uses \Throwable

@toooni
Copy link
Collaborator

toooni commented Nov 9, 2021

You are correct. It seems that 1.2.x and 1.3.x shouldn't have "^3.0" in "symfony/framework-bundle" composer.json. But since 3.4 won't even get security fixes from symfony since this month, I am inclined to let this go. What do you think?

@toooni toooni added the bug label Nov 9, 2021
@max4ever
Copy link
Author

max4ever commented Nov 9, 2021

Well I'm still using symfony 3.4 at work 😅 ,
but I don't know if you can overwrite a release and block symfony lower than 5 in the old "tags" 1.2.0 and 1.3.0.

In the end, it's all free work, so as you wish 🤷 .

@toooni
Copy link
Collaborator

toooni commented Nov 9, 2021

It's not because of the work. It probably would work but the signature (commit id) changes for the same version and I don't know if this may lead to issues for other users. I'd say we remove ^3.0 and I am releasing a new version for it.
You are the first and probably the last one to notice this ;) However, fixing the version to 1.1.1 in your composer.json should do the job for you.

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

No branches or pull requests

2 participants