nayzo/NzoUrlEncryptorBundle

Does not work with invokable controllers

Closed this issue · 1 comments

I have discovered that the bundle does not work with invokable controller classes. https://symfony.com/doc/current/controller/service.html#invokable-controllers

The problem is that in AnnotationResolver you are expecting $event->getController() to return an array, whereas with you use __invoke() for the controller method name, $event->getController() actually returns the controller directly instead of it being wrapped in an array.

if (!is_array($controller = $event->getController())) {

I will submit a PR in a moment

nayzo commented

Thank you for the issue.
Fixed in: 4a9ca1c