helios-ag / FMElfinderBundle

:file_folder: ElFinderBundle provides ElFinder integration with TinyMCE, CKEditor, Summernote editors
MIT License
275 stars 128 forks source link

Unable to make elfinder installing and working on Symfony 4.4 #389

Closed NouvelleTechno closed 4 years ago

NouvelleTechno commented 4 years ago

Describe the bug Using Symfony 4.4 + fosckeditor

composer require helios-ag/fm-elfinder-bundle

First, needed to comment include_assets in fm_elfinder.yaml

Then getting to add elfinder to bundles.php FM\ElfinderBundle\FMElfinderBundle::class => ['all' => true],

Then, getting new error

Executing script cache:clear [KO] [KO] Script cache:clear returned with error code 1 !! !! In RegisterControllerArgumentLocatorsPass.php line 173: !! Cannot determine controller argument for "FM\ElfinderBundle\Controller\ElFinderController::load()": the $eventDispatcher argument is type-hinted with the non-existent class or interface: "Psr\EventDispatcher\EventDispatcherInterface". (OPTIONAL) Additional context Same on Symfony 4.4 fresh install

9.3 version on Symfony 4.3 works very well

CedCannes commented 4 years ago

First, needed to comment include_assets in fm_elfinder.yaml

I got the same thing, so I did a PR on the Flex recipe : https://github.com/symfony/recipes-contrib/pull/828

Executing script cache:clear [KO] [KO] Script cache:clear returned with error code 1 !! !! In RegisterControllerArgumentLocatorsPass.php line 173: !! Cannot determine controller argument for "FM\ElfinderBundle\Controller\ElFinderController::load()": the $eventDispatcher argument is type-hinted with the non-existent class or interface: "Psr\EventDispatcher\EventDispatcherInterface".

I didn't get this error on my v5.0.2 installation but maybe you can install this component: https://symfony.com/doc/current/components/event_dispatcher.html#installation

NouvelleTechno commented 4 years ago

Unfortunately event dispatcher is already installed

Composer says Nothing to install or update

NouvelleTechno commented 4 years ago

Found something maybe in /src/Controller/ElFinderController.php

Maybe should use Symfony\Component\EventDispatcher\EventDispatcherInterface instead of Psr\EventDispatcher\EventDispatcherInterface line 10

helios-ag commented 4 years ago

Changed import for EventDispatcherInterface, tagged as 10.0.2