I'm using PhpStorm to develop an iCal Manager.

I have a class `User` defined in the namespace `Engine` used for all the website, and a class `User` defined in the namespace `iCal` used for iCal process only, extended from `\Engine\User`.

When coding, PhpStorm can locate `\Engine\User` in order to define `\iCal\User`, but when executing I got a "Fatal Error: Class \Engine\User not found".

I'm using PhpStorm 2019.1 with PHP 7.2.4 on WampServer.

I tried to make an alias, didn't work. I tried to require all my files in one then to add it in 'Engine', didn't work either.

**\Engine\User:**

```php
<?php
declare(strict_types=1);
//Created for IGPD by leroy the 27/07/2019

namespace Engine;
use PDO;
use Exception;
use PDOStatement;

/**
 * Class User
 * @property bool attendee
 * @package Engine
 */
class User
{
public function __construct(array $user)
    {
        $this->email = $user['email'];
        $this->name = $user['name'];
        $this->surname = $user['surname'];
        $this->language = $user['language'];
    }
}

```

**\iCal\User:**

```php
<?php
declare(strict_types=1);
//Created for IGPD by leroy the 27/07/2019

namespace iCal;
use Engine\User as UserAlias;

/**
 * Class User
 * @package iCal
 */
class User extends UserAlias
{
public function __construct(array $user, string $cutype, string $role, bool $rsvp, string $partstat, string $sentby, string $dir, string $type)
    {
        $this->calAddress = "mailto:" . $user['email'];
        $this->cutype = in_array($cutype, ['INDIVIDUAL', 'GROUP', 'RESOURCE', 'ROOM', 'UNKNOWN']) ? $cutype : 'UNKNOWN';
        $this->role = in_array($role, ['CHAIR', 'REQ-PARTICIPANT', 'OPT-PARTICIPANT', 'NON-PARTICIPANT']) ? $role : 'OPT-PARTICIPANT';
        $this->rsvp = $rsvp ? 'TRUE' : 'FALSE';
        $this->cn = $user['name'] . " " . $user['surname'];
        $this->language = in_array($user['language'], ['EN', 'FR']) ? $user['language'] : 'EN';
        $this->partstat = in_array($partstat, ['NEEDS-ACTION', 'ACCEPTED', 'DECLINED', 'TENTATIVE', 'DELEGATED']) ? $partstat : 'NEEDS-ACTION';
        $this->sentby = $sentby;
        $this->dir = $dir;
        $this->type = $type;
        UserAlias::__construct($user);
    }}

```

I just run the class file to check for errors, so I should not get anything.
The actual output is:

> 
> Fatal error: Class 'Engine\User' not found in D:\wamp\www\IGPD\iCal\User.php on line 12
> 
> 
> 

Here is `iCal.php`, the file that require all the files in the directory:

**\iCal\iCal.php:**

```php
<?php
declare(strict_types=1);
namespace iCal;
//Created for IGPD by leroy the 02/08/2019

require_once 'Alarm.php';
require_once 'Calendar.php';
require_once 'Event.php';
require_once 'FreeBusy.php';
require_once 'Journal.php';
require_once 'Todo.php';
require_once 'User.php';

```

Then I used this in my main page but it's not the one I want to load so I shouldn't need it:

**\Engine\Engine.php:**

```php
<?php
declare(strict_types = 1);
namespace Engine;
session_start();

require_once "collections.php";
require_once "..\iCal\iCal.php";

```

I do not use autoload.