Downgrading to "nette/di": "3.2.4"
solved the issue. In my case, i just had to set "prefer-stable": true
in composer.json.
The problem turned out to be in Nette\DI itself. It was quite a ride to debug, because the problem only manifests itself, when running PHP without a debugger! With a debugger enabled, the container gets created with the proper function, which is supposed to be:
public function createServiceHttp__request(): Nette\Http\Request
{
return $this->getService('http.requestFactory')->fromGlobals();
}
Thanks to user @rixafy on the Nette Discord server who proposed downgrading as the solution.