app/Webtrees.php
public function createServerRequest(): ServerRequestInterface
    {
        $server_request_creator = new ServerRequestCreator(
            app(ServerRequestFactoryInterface::class),
            app(UriFactoryInterface::class),
            app(UploadedFileFactoryInterface::class),
            app(StreamFactoryInterface::class)
        );

        // Until all the code is rewritten to use PSR-7 requests, we still need our hybrid request.
        if (class_exists(Request::class)) {
            return Request::createFromGlobals();
        }

        return $server_request_creator->fromGlobals();
    }
public function createServerRequest(): ServerRequestInterface
    {
        $server_request_creator = new ServerRequestCreator(
            app(ServerRequestFactoryInterface::class),
            app(UriFactoryInterface::class),
            app(UploadedFileFactoryInterface::class),
            app(StreamFactoryInterface::class)
        );

        // Until all the code is rewritten to use PSR-7 requests, we still need our hybrid request.
        if (class_exists(Request::class)) {
            return Request::createFromGlobals();
        }

        return $server_request_creator->fromGlobals();
    }
public function createServerRequest ( ) : ServerRequestInterface { $ server_request_creator = new ServerRequestCreator ( app ( ServerRequestFactoryInterface :: class ) , app ( UriFactoryInterface :: class ) , app ( UploadedFileFactoryInterface :: class ) , app ( StreamFactoryInterface :: class ) ) ; // Until all the code is rewritten to use PSR-7 requests, we still need our hybrid request. if ( class_exists ( Request :: class ) ) { return Request :: createFromGlobals ( ) ; } return $ server_request_creator -> fromGlobals ( ) ; }
We can use any PSR-7 compatible requests.

@return ServerRequestInterface
We can use any PSR - 7 compatible requests .