KnpLabs / DictionaryBundle

Are you often tired to repeat static choices like gender or civility in your apps ?
MIT License
86 stars 24 forks source link

Fixed Symfony 5 broken collector #129

Closed OwlyCode closed 4 years ago

OwlyCode commented 4 years ago

Hello there!

Following #120 I tried to move back from my fork to the official bundle, and encountered the following issue :

!!  [19-Feb-2020 16:08:35 UTC] PHP Fatal error:  Declaration of Knp\DictionaryBundle\DataCollector\DictionaryDataCollector::collect(Symfony\Component\HttpFoundation\Request $request, Symfony\Component\HttpFoundation\Response $response, ?Exception $exception = NULL): void must be compatible with Symfony\Component\HttpKernel\DataCollector\DataCollectorInterface::collect(Symfony\Component\HttpFoundation\Request $request, Symfony\Component\HttpFoundation\Response $response, ?Throwable $exception = NULL) in /app/cozysoft/vendor/knplabs/dictionary-bundle/src/Knp/DictionaryBundle/DataCollector/DictionaryDataCollector.php on line 14

So here's a fix inspired by what they did on https://github.com/geocoder-php/BazingaGeocoderBundle

PedroTroller commented 4 years ago

@OwlyCode your commit is part of the #134. Thanks a lot ;)