I am currently refactoring an older library and stumbled across laminas-diactoros v1.4. Here, this code is used:
$factory = new ServerRequestFactory(); $request = $factory->createServerRequest('DELETE', '/'); Factory::createFromRequest($request);
But this is no longer “state of the art” (and no longer working at all). However, in the migration guides at https://docs.laminas.dev/laminas-diactoros/v2/migration/, I can’t find any information about how to upgrade these two little lines.
Now, I tried my luck with this:
$request = new ServerRequest(, , '/', 'DELETE'); Factory::createFromRequest($request);
But for some reason, I don’t think, that this is the correct replacement.