Felix already wrote about the new bake2.php script. This script is rather simple, it simply executes tasks, i.e. classes with a certain interface. At the moment, there exist two such tasks in the branch of CakePHP 1.2: AppTask and DbconfigTask. Let’s have a look at them, even though they are not finished yet.

The AppTask creates the application skeleton. The usage is:

php bake2.php app alias /path_to_app_dir

It does almost the same as:

php bake.php -project /path_to_app_dir

The differences are:

  • bake2 doesn’t ask you any questions
  • you can define an application alias

The idea of the application alias is to make it easier to work with multiple applications. So you can use just the alias to refer to a specific application. The alias/application mapping is stored in apps.ini, in the root folder of your cake installation.

After the AppTask you will usually execute the DbconfigTask to create the database configuration. This task allows a lot of parameters, but most of them are optional. Here is its usage:

php bake2.php dbconfig alias database username [password] [-c=config name] [-d=database driver]
                                               [-persistent] [-h=host[:port]] [-p=prefix]

That’s it. Feedback and bug reports are welcome :)