I'm trying to extend the Request component of Yii2 as our previous Yii1 project extended CHttpRequest, but all I get is a 500 error no matter what I try. My config is as follow:

```
'components' => [
    'request' => [
        'class' => 'app\components\MY_HttpRequest',
        'cookieValidationKey' => '...',
    ],
    ...
],

```

Then in //components/MY\_HttpRequest.php, even with an empty class that would just call the parent's method:

```
<?php

//namespace app\components;
namespace app\components\MY_HttpRequest;

use Yii;

class MY_HttpRequest extends yii\web\Request {
}

```

It displays a 500 error, so I can't really debug this as I don't have any feedback. I searched on Google how to extend the Request component but all I found was a question on how to extend the [Response component](https://stackoverflow.com/questions/29912272/yii-2-0-how-to-extend-core-classes), and I'm already using that method with no success.

There are no details about the error (Only using example.com as example):
[![enter image description here](https://i.stack.imgur.com/mbgDc.jpg)](https://i.stack.imgur.com/mbgDc.jpg)

Moreover, if I change this line like such:

```
'class' => 'app\components\MY_HttpRequestaaaaaaaaaaaaaa',

```

I get an error that the file is not found, so I know the file is being loaded.