This is killing me.
When I run
bin/magento setup:upgrade it throws this:
Warning: include(/vendor/composer/../../generated/code/Magento/Framework/App/Config/InitialConfigSource/Proxy.php): failed to open stream: No such file or directory in /vendor/composer/ClassLoader.php on line 444
And when I run
bin/magento setup:di:compile it throws this:
Class Magento\Framework\App\ResourceConnection\Proxy does not exist
Site was running perfectly. I had run
setup:upgrade before without any problem. I had also ran
But today, all of sudden this is happening.
I used to follow this every time when I compile: https://devdocs.magento.com/guides/v2.3/performance-best-practices/deployment-flow.html
Could it be the reason now that I cannot run
bin/magento setup:upgrade or
I remember, at first running
bin/magento setup:upgrade it threw error, after that I am stuck, couldn't run any CLI commands.
On first run
setup:upgrade, it threw an error. Unfortunately I did not make a note of that and re-run the
setup:upgrade again. Since then the above-mentioned error is thrown.
Alright, so in my local instance, I was able to reproduce a similar error. It's slightly different than what I was getting in my live server:
Warning: include(/vendor/composer/../../generated/code/Magento/Framework/App/ResourceConnection/Proxy.php): failed to open stream: No such file or directory in /vendor/composer/ClassLoader.php on line 444
So, after I ran
composer update It did allow me to run
Magento CLI commands. And I was able to compile.
I still want to understand this. I am yet to perform this into my live server.