I got started with my new CakePHP 3.3.9 project today. As usual I wanted to create a few scaffold using cake bake command. As I already had a CakePHP 2.5.5 setup in my machine. I still needed it and its cake bake commands to run to create any thing while working on the cakephp 2.x project. So is there a way I could use both cake bake consoles for CakePHP 2.x and 3.x respectively, at the same time?
Just had a look at possible duplicate. But in my case, I have paths set and I want to use cake bake globally. From anywhere. There might be situations when someone might want to use a cake bake scrip globally. I have a multi-site setup built in CakePHP and in it I create multi-sites based on one core "Cake" Library.
I found my answer anyway.
You can still use both globally just by renaming shell script file to a different name. For example I renamed my cake and cake.bat to cake2 and cake2.bat respectively and it worked just fine, by calling like this:
cake2 bake.
Also posted here http://www.devarticles.in/cakephp/using-cakephp-bake-console-cakephp-2-x-3-x/.