-
Notifications
You must be signed in to change notification settings - Fork 381
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
Upgrading to Symfony5 #1256
Upgrading to Symfony5 #1256
Conversation
Co-Authored-By: Fran Moreno <franmomu@gmail.com>
Ok, this is ready and tests are green! A summary of what happened:
*B) Added code to work around some PHPUnit deprecations and the This should be good. The suite tests 3.4, 4.4 and 5.0. Thanks! |
Hi, I try to use your branch on a Symfony5 project but I got an error : "The service "liip_imagine.filter.manager" has a dependency on a non-existent service "liip_imagine.filter.loader.paste"." Am I missing something? |
Hello @conradfr I had the same error message as you. I think that the problem comes from the compiler pass that removes some services if the This file has been added by @weaverryan with his merge request : // File DependencyInjection/Compiler/NonFunctionalFilterExceptionPass.php
$canFiltersStillFunction = $container->hasParameter('kernel.root_dir');
//...
// remove the definitions entirely if kernel.root_dir does not exist
if (!$canFiltersStillFunction) {
$container->removeDefinition('liip_imagine.filter.loader.watermark');
$container->removeDefinition('liip_imagine.filter.loader.paste');
} As far as I understand, this problem could be solved if the NonFunctionnalFilterExceptionPass is called first while building the bundle : // File : LiipImagineBundle.php
class LiipImagineBundle extends Bundle
{
public function build(ContainerBuilder $container)
{
parent::build($container);
$container->addCompilerPass(new NonFunctionalFilterExceptionPass()); // here
$container->addCompilerPass(new DriverCompilerPass());
$container->addCompilerPass(new LoadersCompilerPass());
$container->addCompilerPass(new FiltersCompilerPass());
$container->addCompilerPass(new PostProcessorsCompilerPass());
$container->addCompilerPass(new ResolversCompilerPass());
$container->addCompilerPass(new MetadataReaderCompilerPass());
// $container->addCompilerPass(new NonFunctionalFilterExceptionPass()); // not here
// ... Doing this solved my problem 😉 |
I'm now back at work. I plan to fix, test and merge this today and roll out a new release. Happy new year and thanks a lot for wrapping this up @weaverryan! Let's start 2020 with SF 5 :-) |
{ | ||
$canFiltersStillFunction = $container->hasParameter('kernel.root_dir'); | ||
$throwWarning = function(string $filterName) use ($canFiltersStillFunction) { | ||
$message = sprintf( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a really clear error message! Love this solution :)
@michellesanver I still get
when switching from https://github.com/Guite/LiipImagineBundle/tree/symfony5 back to https://github.com/liip/LiipImagineBundle/tree/symfony5 Any idea? |
did you clear the cache in between? afaik symfony sometimes is confused when switching branches in vendor |
Thanks, that was it apparently :-) |
phew. thanks for trying out the changes! if you find anything else not working, please let us know 👍 |
Thank you! What a nice surprise to see this merged today INCLUDING a fix (and patch) reported by other users and completed by Michelle. You all made my day! |
Following links are not found:
someone please let me know the correct one |
this has been merged to master in #1259, symfony 5 support is available in the master branch since then. |
@dbu I got a problem with symfony5 would you please take a look: https://stackoverflow.com/questions/63377282/symfony-5-could-not-find-configuration-for-a-filter-in-liip-liipimaginebundl |
sorry, i am not that deep into the bundle, just getting notifications and trying to help out. if you track this down to a bug in the bundle, please open a new issue or a merge request. |
Hi!
Just in case it's helpful, I took @michellesanver's work from #1246 and @Guite's work from #1255 and then continued it to hopefully get Symfony 5 support soon. I'm working on the Symfony 5 Upgrade tutorial for SfCasts, and this is a blocker :).