In a project (on which work 2), we are forced to make a "php composer.phar dump-autoload" and "php composer.phar dump-autoload -o" every time we add a new file (a new class in our web project). If we do not type these lines of command, the autoloader dial tells us that this class is not found ...
Whereas with personal projects, I have never been compelled to type these command lines for each new class of creation.
In my composer.json I have put this:
"autoload": {
"psr-4" : {
"App\\": "app/",
"Database\\": "app/",
"Helpers\\": "app/",
"": [
"app/",
"lib/"
]
}
}
Thus I does not understand, why, for every time we add a file in the folder " app ", we have to make "php composer.phar dump-autoload" and "php composer.phar dump-autoload -o" ...
ps : I have Classes without Namespace in directories "app" and "lib".
Will you have an idea of where it could come please?
Thank you.