Command Line Tooling

Expressive offers a number of tools for assisting in project development. This page catalogues each.

Development Mode

The package zfcampus/zf-development-mode provides a simple way to toggle in and out of development mode. Doing so allows you to ship known development-specific settings within your repository, while ensuring they are not enabled in production. The tooling essentially enables optional, development-specific configuration in your application by:

The package provides the tooling via vendor/bin/zf-development-mode. If you are using the Expressive skeleton, it provides aliases via Composer:

$ composer development-enable
$ composer development-disable
$ composer development-status

Add settings to your development.*.php.dist files, and commit those files to your repository; always toggle out of and into development mode after making changes, to ensure they pick up in your development environment.

Expressive command-line tool

The package zendframework/zend-expressive-tooling provides the script vendor/bin/expressive, which contains a number of commands related to migration, modules, and middleware.

You can install it if it is not already present in your application:

$ composer require --dev zendframework/zend-expressive-tooling

Once installed, invoking the binary without arguments will give a listing of available tools:

$ ./vendor/bin/expressive

Integration with Composer

In the skeleton application, we provide direct integration with Composer, allowing you to invoke the tooling using:

bash $ composer expressive

You can use either that form, or invoke the script directly as detailed above.

Commands supported include:

You may obtain full help for each command by invoking:

$ ./vendor/bin/expressive help <command>