What problem does this feature proposal attempt to solve?
Laravel Octane promises great performance, but poses some restrictions on dependency injection and usage of global state: https://laravel.com/docs/octane#dependency-injection-and-octane
Which possible solutions should be considered?
Check for problematic dependency injection patterns within Lighthouse and fix them.
We could use larastan to do a big chunk of the work here and have static analysis checking for this.
https://github.com/nunomaduro/larastan/blob/master/docs/rules.md#octanecompatibilityrule
Thanks @olivernybroe for the tip, I used that plus some manual auditing. There were a few fixes to be made, released as of https://github.com/nuwave/lighthouse/releases/tag/v5.10.0
I am looking to try this out myself soon and am happy for feedback from others. Memory leaks are a particular concern I still have, there is some global state in Lighthouse which I am not too sure about. The Defer module seems particularly suspicious.
Wauw, that was a lot more changes then I thought we would need 馃槷
Great job! Hopefully I will have time to test it out soon also.
https://github.com/nuwave/lighthouse/pull/1854 only had 3 substantial changes actually, the rest was cleanup 馃槈
Most helpful comment
We could use larastan to do a big chunk of the work here and have static analysis checking for this.
https://github.com/nunomaduro/larastan/blob/master/docs/rules.md#octanecompatibilityrule