Category: fosrestbundle

Adding services to a Controller through "container.service_subscriber" not working as expected

I am trying to use the container.service_subscriber tag on my Controller to make some services available without injecting them through the constructor. In our project we don’t want to use the autowiring and also can’t use the autoconfigure option. The…

Argument 1 passed to FOSRestBundleControllerExceptionController::getStatusCode()

I write in symfony 4 API using FOSRestBundle, unfortunately I get an error with every request: Argument 1 passed to FOSRestBundleControllerExceptionController::getStatusCode() must be an instance of Exception, instance of SymfonyComponentErrorHandlerExceptionFlattenException given, called in D:event-apivendorfriendsofsymfonyrest-bundleControllerExceptionController.php on line 68 I also have…