dustin10 / VichUploaderBundle

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

Symfony 6.2 / Storage : gaufrette / Cannot generate lazy proxy: class "Vich\UploaderBundle\Storage\GaufretteStorage" is final. #1353

Closed cedriclombardot closed 1 year ago

cedriclombardot commented 1 year ago

Hi,

Adding in config

storage: gaufrette

I got this error message

In LazyServiceDumper.php line 142:

  Cannot generate lazy proxy for service "vich_uploader.storage.gaufrette".  

In ProxyHelper.php line 92:

  Cannot generate lazy proxy: class "Vich\UploaderBundle\Storage\GaufretteStorage" is final.  

At cache warmup

Two options to fix for me, set lazy to false

<service id="vich_uploader.storage.gaufrette" class="Vich\UploaderBundle\Storage\GaufretteStorage" public="false" lazy="false">

Or remove final in GaufretteStorage

Perhaps have u got another method ?

garak commented 1 year ago

Bundle version?

cedriclombardot commented 1 year ago

2.0.1

        "version": "2.0.1",
        "source": {
            "type": "git",
            "url": "https://github.com/dustin10/VichUploaderBundle.git",
            "reference": "6c1263680312d0b788830c70c1087dade9feddb8"
        },
garak commented 1 year ago

It's already fixed. If you don't want to wait for the next release, you can require ^2.1@dev