While downgrading Pimcore from 6.1.1 to 5.4.0 ==> Fatal error: Uncaught Error: Call to undefined method Pimcore\Bootstrap::bootstrap()

Fatal error : Uncaught Error: Call to undefined method Pimcore\Bootstrap::bootstrap() in /var/www/html/Pimcore54/web/app.php:22 Stack trace: #0 {main} thrown in /var/www/html/Pimcore54/web/app.php on line 22

When downgrading, you have to (of course) undo all your manual changes you did, see:
https://pimcore.com/docs/6.x/Development_Documentation/Installation_and_Upgrade/Updating_Pimcore/V5_to_V6.html

I have not updated anything. This is fresh install of new version of Pimcore and edited composer.json to downgrade to 5.4 and ran composer update.

why would you do that?!

I want to install coreshop. To install coreshop, Pimcore 5.4 is recommended. Coreshop 2.0 is not working in Pimcore 6 and above.

Why not install an old Pimcore in the first place?
Every install profile has also tags for old Pimcore releases you can use for install…

BR
Christian