agence-adeliom / easy-media-bundle

A Symfony Media manager bundle for EasyAdmin
MIT License
27 stars 18 forks source link

The child config "media_entity" under "easy_media" must be configured. #1

Closed ADSiga closed 2 years ago

ADSiga commented 3 years ago

`Executing script cache:clear [KO] [KO] Script cache:clear returned with error code 1 !! !! In ArrayNode.php line 226: !! !! The child config "media_entity" under "easy_media" must be configured. !! !! !! 2021-11-10T09:05:21+01:00 [info] User Deprecated: Method "Symfony\Component\HttpKernel\Bundle\Bundle::getContainerExtension()" might add "?ExtensionInterface" as a native return type declaration in the future. Do the same in child class "Adeliom\EasyCommonBundle\EasyCommonBundle" now to avoid errors or add an explicit @return annotation to suppress this message. !! 2021-11-10T09:05:21+01:00 [info] User Deprecated: Method "Symfony\Component\HttpKernel\Bundle\Bundle::getContainerExtension()" might add "?ExtensionInterface" as a native return type declaration in the future. Do the same in child class "Adeliom\EasyMediaBundle\EasyMediaBundle" now to avoid errors or add an explicit @return annotation to suppress this message. !! Script @auto-scripts was called via post-update-cmd

Installation failed, reverting ./composer.json and ./composer.lock to their original content.`

What can be done?

tsiatka commented 3 years ago

Same issue

whizkid79 commented 2 years ago

To get the extension installed you need to create a file in config/packages/easy_media.yaml with the following content:

easy_media:
    media_entity: \Adeliom\EasyMediaBundle\Entity\Media
    folder_entity: \Adeliom\EasyMediaBundle\Entity\Folder

Then the error disappears. Strangely these lines are missing from the sample config provided in the repo. It's probably a good idea, to add the other values mentioned in the [README] there too

whizkid79 commented 2 years ago

Just a short heads up. We ended writing our own Media and Folder entities, because doctrine wasn't picking up the changes from the bundle correctly.

arnaud-ritti commented 2 years ago

Sorry for the delay. The recipes was not on Symfony contrib. We are waiting the merge. But for now i have updated this part inside the readme.

arnaud-ritti commented 2 years ago

The README was updated. Now you can also use our flex recipes endpoint https://api.github.com/repos/agence-adeliom/symfony-recipes/contents/index.json?ref=flex/main has explained in the README.