# Request::createFromGlobals() not in Slim directly?

**URL:** <https://discourse.slimframework.com/t/request-createfromglobals-not-in-slim-directly/2017>\
**Category:** Questions\
**Created:** [November 17, 2017, 11:21am UTC](https://discourse.slimframework.com/t/request-createfromglobals-not-in-slim-directly/2017 "2017-11-17T11:21:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![antx](https://avatars.discourse-cdn.com/v4/letter/a/b3f665/32.png) [@antx](https://discourse.slimframework.com/u/antx)\
**Post date:** [November 17, 2017, 11:21am UTC](https://discourse.slimframework.com/t/request-createfromglobals-not-in-slim-directly/2017/1 "2017-11-17T11:21:36Z")

</div>

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](http://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](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/](https://bshaffer.github.io/oauth2-server-php-docs/overview/response/) )

---

<div class="post-metadata">

**Author:** ![akrabat](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/akrabat/32/9_2.png) [@akrabat](https://discourse.slimframework.com/u/akrabat)\
**Post date:** [November 17, 2017, 11:54am UTC](https://discourse.slimframework.com/t/request-createfromglobals-not-in-slim-directly/2017/2 "2017-11-17T11:54:33Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![antx](https://avatars.discourse-cdn.com/v4/letter/a/b3f665/32.png) [@antx](https://discourse.slimframework.com/u/antx)\
**Post date:** [November 17, 2017, 12:13pm UTC](https://discourse.slimframework.com/t/request-createfromglobals-not-in-slim-directly/2017/3 "2017-11-17T12:13:17Z")

</div>

Okay, thanks for the quick answer.
