Closed hanishsingla closed 4 years ago
This is failed due to #64 ?
No this fails because:
Declaration of Flagception\Bundle\FlagceptionBundle\Profiler\FeatureDataCollector::collect() must be compatible with Symfony\Component\HttpKernel\DataCollector\DataCollectorInterface::collect(Symfony\Component\HttpFoundation\Request $request, Symfony\Component\HttpFoundation\Response $response, Exception $exception = NULL) in /home/travis/build/bestit/flagception-bundle/src/Profiler/FeatureDataCollector.php
This bundle currently support all symfony versions from 2.7 and above. And the DataCollectorInterface has changed in some versions. For example, in 3.1 it has "Exception" as type for the third argument (https://github.com/symfony/symfony/blob/3.1/src/Symfony/Component/HttpKernel/DataCollector/DataCollectorInterface.php). In 4.3 it hasn't any type (https://github.com/symfony/symfony/blob/4.3/src/Symfony/Component/HttpKernel/DataCollector/DataCollectorInterface.php). And in 5.0 it is throwable
now.
But we cannot implement this interface with strict types for all versions. We have to implement it differently for each symfony version. Specially for 4 and 5.
So we can release a new branch (Major version) with the only support of Symfony 5 to keep up to date with new versions of Symfony?
Also, this PR is compatible only with Symfony >= 4.3 because the class Symfony\Component\HttpKernel\Event\ControllerEvent only exists since this version.
@hermann8u so it means this bundle can never support Symfony5?
Yes it can. But you have to find a workaround to support both event class.
Here is a commit I made on a PR when I had to struggle with the same issue. I hope it can help you to find a solution :
I‘am currently on vacations. I will support as soon as I am at home (next weekend)
IMO, you should consider dropping support for symfony < 3.4 in a new major version and support Symfony 5 in it.
Yes, I think that’s the way we have to go.
I will create a new branch for Symfony 5.0 and upwards today.
@migo315 Could you check this. Its kinda blocking upgrade.
The master Branch has full Symfony 5 support now. I've done all changes and skip support for Symfony 2+3+4. I've released this changes with bundle Version 4.0.0.
But I also created the branch "3.x", where we can maintain Symfony 2 + 3 + 4.
So, for Symfony 5 use Flagception Bundle 4.0. For Symfony prior 5 use Flagception Bundle 3.0
Let me know if you find any mistakes. My tests were all successful. :-)
Fixes #67