Want to save time generating dependency configuration files for your Zend ServiceManager dependencies? In today's tutorial, I'll show you how, by using ConfigDumper, available in ServiceManager 3.2.0.

In the previous tutorial, we saw how to use FactoryCreator’s command-line tool, generate-factory-for-class, to quickly and easily create factories for classes.

In this, the follow-up tutorial, we’re going to see how to use generate-deps-for-config-factory, the command-line tool for ConfigDumper, to save time when generating dependency configuration files for use with our classes.

He starts by helping you get the correct version of the ServiceManager installed (3.2.0) and provides an overview of the generate-deps-for-config-factory tool. He moves on to a simple example using one of the included classes (the PingAction) and calls the generator with an example of the results. From there he includes a more complex example using the HomePageAction as its source. He points out that this tool doesn't work for every class and gives an example of a failure around a missing type hint. The post wraps up with a look at the ConfigAbstractFactory and how you can use the configurations that result from using the generation tool.