Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throw exception when the Kernel does not implement KernelInterface #108

Open
shyim opened this issue Apr 22, 2023 · 3 comments
Open

Throw exception when the Kernel does not implement KernelInterface #108

shyim opened this issue Apr 22, 2023 · 3 comments

Comments

@shyim
Copy link

shyim commented Apr 22, 2023

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

@Baldinof
Copy link
Owner

Baldinof commented May 5, 2023

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?

@shyim
Copy link
Author

shyim commented May 5, 2023

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 :)

@Baldinof
Copy link
Owner

Baldinof commented May 5, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants