Request::createFromGlobals() not in Slim directly?


#1

I started a project with Slim 3.0 and found that the Slim/Request.php class does not have a createFromGlobals() function.
I googled it and found that Slim-Http contains the class Slim-Http/src/Request.php which has this function.
The readme.md of Slim-Http says it is used by the Slim Framework.

Do I have to install Slim-Http additionally to the actual Slim Framework?

(Some context: I’m trying to get OAuth2 into my project with https://github.com/bshaffer/oauth2-server-php and it seems to need it if I understand it right: https://bshaffer.github.io/oauth2-server-php-docs/overview/response/ )


#2

In Slim 3.0, the method you are looking for is Slim\Http\Request::createFromEnvironment()


#3

Okay, thanks for the quick answer.