vendredi 30 octobre 2015

composer dump-autoload doesn't add psr-4 classes

I'm using laravel 5.1. I've added my custom namespace inside the app/Library and namespaced like projectname.

{
    "autoload": {
        "psr-4": {
            "App\\": "app/",
            "Library\\": "app/Library/"
        }
    }
}

Whenever I create anything with make command I get ReflecitonError that the class does not exist. I thought Laravel uses composer dump-autoload after the make command, then I ran composer dump-autoload and got that the classes inside the Library folder don't get included inside the autoload_classmap.php file. Then I ran composer dump-autoload -o got that the files inside my namespace were included.
What was wrong? What can be the possible solution?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire