Implementing a ZF2 development mode
Once you have the basic installation, you need to put it in development mode:
12 cd path/to/installphp public/index.php development enable # put the skeleton in development mode
Behind the scenes, this command runs an action in DevelopmentModeController which copies config/development.config.php.dist to config/development.config.php. Then there is some code in public/index.php that ensures that this file is loaded.
The config/development.config.php file then enables you to have ModuleManager specific configuration for development. This means that you can turn off caching, load modules that you don’t want in production and also load autoload development config files when developing that are not applied in production.
This is such a useful ability, that I want it for my ZF2 projects, so I’ve extracted the core functionality into a module called NFDevelopmentMode.
Hopefully the README is clear enough and thank you to the Apigility team for doing the actual work for this!
Update: The official version is now on the ZF Campus GitHub