@@ -33,9 +33,81 @@ Add settings to your `development.*.php.dist` files, and commit those files to
3333your repository; always toggle out of and into development mode after making
3434changes, to ensure they pick up in your development environment.
3535
36+ ## Expressive command-line tool
37+
38+ - Since zend-expressive-tooling 0.4.0 and zend-expressive-skeleton 2.0.2
39+
40+ The package [ zendframework/zend-expressive-tooling] ( https://github.com/zendframework/zend-expressive-tooling )
41+ provides the script ` vendor/bin/expressive ` , which contains a number of commands
42+ related to migration, modules, and middleware.
43+
44+ You can install it if it is not already present in your application:
45+
46+ ``` bash
47+ $ composer require --dev zendframework/zend-expressive-tooling
48+ ```
49+
50+ If you installed the Expressive skeleton prior to version 2.0.2, you will want
51+ to update the tooling to get the latest release, which contains the ` expressive `
52+ binary, as follows:
53+
54+ ``` bash
55+ $ composer require --dev " zendframework/zend-expressive-tooling:^0.4.1"
56+ ```
57+
58+ Once installed, invoking the binary without arguments will give a listing of
59+ available tools:
60+
61+ ``` bash
62+ $ ./vendor/bin/expressive
63+ ```
64+
65+ Commands supported include:
66+
67+ - ** ` middleware:create <middleware> ` ** : Create a class file for the named
68+ middleware class. The class _ must_ use a namespace already declared in your
69+ application, and will be created relative to the path associated with that
70+ namespace.
71+
72+ - ** ` migrate:error-middleware-scanner [--dir|-d] ` ** : Scan the associated
73+ directory (defaults to ` src ` ) for declarations of legacy Stratigility v1 error
74+ middleware, or invocations of ` $next() ` that provide an error argument. See
75+ the [ section on detecting legacy error middleware] ( #detect-usage-of-legacy-error-middleware )
76+ for more details.
77+
78+ - ** ` migrate:original-messages [--src|-s] ` ** : Scan the associated source directory
79+ (defaults to ` src ` ) for ` getOriginal*() ` method calls and replace them with
80+ ` getAttribute() ` calls. See the [ section on detecting legacy
81+ calls] ( #detect-usage-of-legacy-getoriginal-calls ) for more details.
82+
83+ - ** ` migrate:pipeline [--config-file|-c] ` ** : Convert configuration-driven
84+ pipelines and routing to programmatic declarations. See the [ section on
85+ migrating to programmatic pipelines] ( #migrate-to-programmatic-pipelines ) for
86+ more details.
87+
88+ - ** ` module:create [--composer|-c] [--modules-path|-p] <module> ` ** : Create the
89+ named module, add and generate autoloading rules for it, and register the
90+ module's ` ConfigProvider ` with your application.
91+
92+ - ** ` module:register [--composer|-c] [--modules-path|-p] <module> ` ** : Add and
93+ generate autoloading rules for the named module, and register the module's
94+ ` ConfigProvider ` with your application.
95+
96+ - ** ` module:deregister [--composer|-c] [--modules-path|-p] <module> ` ** : Remove
97+ autoloading rules for the named module and regenerate autoloading rules;
98+ remove the module's ` ConfigProvider ` from the application configuration.
99+
100+ You may obtain full help for each command by invoking:
101+
102+ ``` bash
103+ $ ./vendor/bin/expressive help < command>
104+ ```
105+
36106## Modules
37107
38108- Since 2.0.
109+ - Deprecated since zend-expressive-tooling 0.4.0; see the [ Expressive CLI tool
110+ section above] ( #expressive-command-line-tool ) .
39111
40112The package [ zendframework/zend-expressive-tooling] ( https://github.com/zendframework/zend-expressive-tooling )
41113provides the binary ` vendor/bin/expressive-module ` , which allows you to create,
@@ -92,6 +164,8 @@ $ ./vendor/bin/expressive-module deregister Account
92164# # Migrate to programmatic pipelines
93165
94166- Since 2.0.
167+ - Deprecated since zend-expressive-tooling 0.4.0; see the [Expressive CLI tool
168+ section above](# expressive-command-line-tool).
95169
96170Starting in 2.0, we recommend using _programmatic pipelines_, versus
97171configuration-defined pipelines. For those upgrading their applications from 1.X
@@ -125,6 +199,8 @@ skipped) Stratigility v1-style "error middleware".
125199# # Detect usage of legacy getOriginal*() calls
126200
127201- Since 2.0.
202+ - Deprecated since zend-expressive-tooling 0.4.0; see the [Expressive CLI tool
203+ section above](# expressive-command-line-tool).
128204
129205When upgrading to version 2.0, you will also receive an upgrade to
130206zendframework/zend-stratigility 2.0. That version eliminates internal decorator
@@ -186,6 +262,8 @@ on how to correct those manually.
186262# # Detect usage of legacy error middleware
187263
188264- Since 2.0.
265+ - Deprecated since zend-expressive-tooling 0.4.0; see the [Expressive CLI tool
266+ section above](# expressive-command-line-tool).
189267
190268When upgrading to version 2.0, you will also receive an upgrade to
191269zendframework/zend-stratigility 2.0. That version eliminates what was known as
0 commit comments