Como usar o extends com o autoloade do composer? Da forma que está me retorna o seguinte error:
Fatal error: Class 'App\Modulos\Mail\Mail' not found in ...Google.php on line 7
Composer:
"autoload": {
"psr-4": {
"App\\": "app/"
}
}
Estrutura:
- 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/Modulos/Mail/Google.php
<?php
namespace Google;
use \App\Modulos\Mail\Mail;
class Google extends Mail {
}
app/Modulos/Mail/Mail.php
<?php
namespace Mail;
abstract class Mail {
}