src/Viserio/Component/Http/ServerRequestBuilder.php
public function createFromGlobals(): ServerRequestInterface
    {
        $server = $_SERVER;

        if (! isset($server['REQUEST_METHOD'])) {
            $server['REQUEST_METHOD'] = 'GET';
        }

        return $this->createFromArray(
            $server,
            Util::getAllHeaders($server),
            $_COOKIE,
            $_GET,
            $_POST,
            $_FILES,
            new CachingStream(new LazyOpenStream('php://input', 'r+'))
        );
    }
public function createFromGlobals(): ServerRequestInterface
    {
        $server = $_SERVER;

        if (! isset($server['REQUEST_METHOD'])) {
            $server['REQUEST_METHOD'] = 'GET';
        }

        return $this->createFromArray(
            $server,
            Util::getAllHeaders($server),
            $_COOKIE,
            $_GET,
            $_POST,
            $_FILES,
            new CachingStream(new LazyOpenStream('php://input', 'r+'))
        );
    }
Create a new server request from the current environment variables.
Defaults to a GET request to minimise the risk of an \InvalidArgumentException.
Includes the current request headers as supplied by the server.
Defaults to php://input for the request body.

@throws \InvalidArgumentException if no valid method or URI can be determined