dustin10 / VichUploaderBundle

A simple Symfony bundle to ease file uploads with ORM entities and ODM documents.
MIT License
1.84k stars 519 forks source link

DefinitionDecorator is deprecated since Symfony 4.0 #788

Closed javiereguiluz closed 6 years ago

javiereguiluz commented 6 years ago

When using this bundle in a Symfony 4 app, I see this:


(1/1) ClassNotFoundExceptionAttempted to load class "DefinitionDecorator"
from namespace "Symfony\Component\DependencyInjection". Did you forget
a "use" statement for another namespace?

in VichUploaderExtension.php (line 209)

As you can read in https://github.com/symfony/symfony/blob/master/UPGRADE-4.0.md:

The DefinitionDecorator class has been removed. Use the ChildDefinition class instead.
garak commented 6 years ago

It should be fixed now. Can you confirm @javiereguiluz ?

javiereguiluz commented 6 years ago

@garak it's working, but I needed to make another change: #790

garak commented 6 years ago

PR merged. Meanwhile, I found this in a project of mine, I suppose we should handle it as well:

Autowiring services based on the types they implement is deprecated since Symfony 3.3 and won't be supported in version 4.0. You should rename (or alias) the "vich_uploader.templating.helper.uploader_helper" service to "Vich\UploaderBundle\Templating\Helper\UploaderHelper" instead.

garak commented 6 years ago

@javiereguiluz I'd like to release a Symfony4-compatible tag for this bundle, but I'm not sure about the renaming/aliasing question mentioned above. Do you know how can we fix it?