Baldinof / roadrunner-bundle

A RoadRunner worker integrated in your Symfony app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Throw exception when the Kernel does not implement KernelInterface

shyim opened this issue · comments

commented

It took me some time to understand that your Kernel needs to implement KernelInterface. It would be much easier when you would throw just an exception when the requirements are not met.

Is there some reason why it currently has an fallback?

https://github.com/Baldinof/roadrunner-bundle/blob/2.x/src/Runtime/Runtime.php#L19

Hello,

I would accept a PR to throw when RR_MODE is set but the kernel is not app is not a KernelInterface.

How did you land in that case?

commented

We do crazy stuff with Symfony Kernels also wrapping them up 😅
https://github.com/shopware/recipes/blob/main/shopware/core/6.4/public/index.php#L53

I will make later a PR :)

Ahah alright, the kernel is only required to retrieve the WorkerRegistryInterface in the runner.

I would also accept something that decouple the runner from the KernelInterface if it can helps.