FriendsOfSymfony / FOSHttpCache

Integrate your PHP application with your HTTP caching proxy

Home Page:https://foshttpcache.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Symfony 4.3 deprecated messages

XWB opened this issue · comments

commented

User Deprecated: The "FOS\HttpCache\Event" class extends "Symfony\Component\EventDispatcher\Event" that is deprecated since Symfony 4.3, use "Symfony\Contracts\EventDispatcher\Event" instead.

User Deprecated: Calling the "Symfony\Component\EventDispatcher\EventDispatcherInterface::dispatch()" method with the event name as first argument is deprecated since Symfony 4.3, pass it second and provide the event object first instead.

if you have time to add the fix for this, please create a pull request. we need to be careful not to break older versions of symfony - this is "only" a warning - though it needs to be adressed for symfony 5 support.

is dispatching the event really in the library and not in the FOSHttpCacheBundle?

commented

@dbu The dispatching error was triggered by https://github.com/FriendsOfSymfony/FOSHttpCache/blob/master/src/CacheInvalidator.php#L309-#L311 so yes, this library is affected. There may be more places.

oh, okay then its indeed here and not in the bundle. do you have time to do a PR to change it? we need to check if the new syntax is available (by checking if the dispatcher implements EventDispatcherInterface, if it does we should switch, otherwise we have to use the old order.)

commented

@dbu Fixes are available in #463 and #464