Vichuploaderbundle: service or alias has been removed

Created on 12 Jun 2018  路  3Comments  路  Source: dustin10/VichUploaderBundle

Bug Report

| Q | A
|------------ | ------
| BC Break | yes
| Version | 1.8.3

Summary

Trying to call PropertyDirectoryNamer breaks the page, same with Vich\UploaderBundle\Naming\SubdirDirectoryNamer

Current behavior

Symfony throws the following error:
Uncaught PHP Exception Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: "The "Vich\UploaderBundle\Naming\PropertyDirectoryNamer" service or alias has been removed or inlined when the container was compiled. You should either make it public, or stop using the container directly and use dependency injection instead." at D:\radiopharma\vendor\symfony\symfony\src\Symfony\Component\DependencyInjection\Container.php line 337

How to reproduce

enabling the Directory namer in the config.yml file while running Symfony version 3.4.11

Current config.yml

image

Expected behavior

either PropertyDirectoryName is given public access or there is another method, not stated in the documentations, to inject the service

Bug

Most helpful comment

Hi,

instead of Vich\UploaderBundle\Naming\PropertyDirectoryNamer, use alias vich_uploader.namer_directory_property

All 3 comments

Hi,

instead of Vich\UploaderBundle\Naming\PropertyDirectoryNamer, use alias vich_uploader.namer_directory_property

@WassabiVl did you solve with above suggestion?

Closing for missing feedback

Was this page helpful?
0 / 5 - 0 ratings

Related issues

petrjirasek picture petrjirasek  路  7Comments

manguecreative picture manguecreative  路  4Comments

jcg678 picture jcg678  路  6Comments

cipherchien picture cipherchien  路  3Comments

nobady90 picture nobady90  路  3Comments