Autoload composer does not work

0

Good morning!

I do not know what to do, my Composer autoload not work at all ...

The error I get is always Uncaught Error: Class 'App\Lucass\Fazendo' not found in /var/www/projetos/teste/index.php on line 6' not found

Follow my files and structures (I made to test only):

composer.json

{
    "name": "lucas/teste",
    "description": "Teste",
    "type": "project",
    "license": "MIT",
    "authors": [
        {
            "name": "lucascar",
            "email": "[email protected]"
        }
    ],
    "minimum-stability": "dev",
    "autoload" : {
        "psr-4" : {
            "App\" : "_app"
        }
    }
}

autoload.php (Inside the vendor folder)
<?php

// autoload.php @generated by Composer

require_once __DIR__ . '/composer/autoload_real.php';

return ComposerAutoloaderInit670dec37bc64fcc541f75ee0226149e6::getLoader();

autoload_psr4.php (within the vendor / composer)
<?php

// autoload_psr4.php @generated by Composer

$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);

return array(
    'App\' => array($baseDir . '/_app'),
);

Fazendo.php (Inside the folder _APP - Class for testing only)
<?php 

namespace Lucass;

class Fazendo {

}

index.php (in the root folder)
<?php
require "vendor/autoload.php";

use App\Lucass\Fazendo;

$a = new Fazendo;

Now the question, if everything is set up correctly, why is it giving this error?

    
asked by anonymous 17.04.2018 / 15:42

0 answers