I have built some migration classes in my application to create the tables I need, but I keep getting errors. I need to run this command:
composer dump-autoload
Only then it works again as expected. Am I doing something wrong that generates this error or this is a normal behaviour with migrations?
Below is the error that I get when running the migration process:
[Symfony\Component\Debug\Exception\FatalErrorException]
Class 'CreateVideoStatusTable' not found
You should run:
composer dump-autoload
and if does not work you should:
re-install composer
Short answer: classmaps are static while PSR autoloading is dynamic.
If you don't want to use classmaps, use PSR autoloading instead.
Source: Stackoverflow.com