How to use extends with composer autoloade? The way it is returned the following error:
Fatal error: Class 'App\Modulos\Mail\Mail' not found in ...Google.php on line 7
Composer :
"autoload": {
"psr-4": {
"App\": "app/"
}
}
Structure :
- Public
app/
Modulos/
Mail/
Google.php
Mail.php
vendor/
bootstrap.php
cli-config.php
composer.json
composer.lock
index.php
router.php
Public / index.php
<?php
require __DIR__.'/vendor/autoload.php';
$google = new \App\Modulos\Mail\Google;
var_dump($google);
app / Modules / Mail / Google.php
<?php
namespace Google;
use \App\Modulos\Mail\Mail;
class Google extends Mail {
}
app / Modules / Mail / Mail.php
<?php
namespace Mail;
abstract class Mail {
}