After successfully upgrading to Magento 2.4.8-p1, php bin/magento setup:upgrade and php bin/magento setup:di:compile stopped working.
php bin/magento cache:cleanworks on the other hand. The error I get isCommand “setup:upgrade” is not defined.orThere are no commands defined in the “setup:di” namespace.`.
Tried to remove the vendor folder and running composer install, I am using PHP 8.3. I also tried setting the file and folder privs using find . -type f -exec chmod 664 {} ; and find . -type d -exec chmod 775 {} ;.
I also deactivated all 3rd party modules in config.php … nothing works. Running php bin/magento list shows no error.
I also deleted the generated folder and so on, nothing helps. The log shows:
[2025-07-10T11:13:33.240718+00:00] main.ERROR: Command "setup:upgrade" is not defined.
Did you mean one of these?
magesetup:setup:run
setup:db-declaration:generate-patch
setup:db-declaration:generate-whitelist
#0 htdocs/vendor/symfony/console/Application.php(266): SymfonyComponentConsoleApplication->find('setup:upgrade')
#1 htdocs/vendor/magento/framework/Console/Cli.php(122): SymfonyComponentConsoleApplication->doRun(Object(SymfonyComponentConsoleInputArgvInput), Object(SymfonyComponentConsoleOutputConsoleOutput))
#2 htdocs/vendor/symfony/console/Application.php(175): MagentoFrameworkConsoleCli->doRun(Object(SymfonyComponentConsoleInputArgvInput), Object(SymfonyComponentConsoleOutputConsoleOutput))
#3 htdocs/bin/magento(23): SymfonyComponentConsoleApplication->run()
#4 {main} [] []
Basically, what it also outputs on the CLI.
Any ideas?
Thanks