Skip to content

Commit 38d1801

Browse files
docs: correct the feature:init hook example and note the upgrade step
1 parent 088889b commit 38d1801

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

docs/FEATURE.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ $ vendor/bin/dep feature:setup stage --feature=TEST-01
5757

5858
The recipe already wires this task into the deploy flow, together with a `feature:init` before `deploy:info`. That ordering matters: `deploy:info` resolves `{{release_name}}` and deployer caches the result for the rest of the run, so the feature instance has to be known before it runs. Do not hook `feature:setup` any earlier yourself.
5959

60+
> Upgrading: if your `deploy.php` carries a `before('deploy:info', 'feature:init')` (or an equivalent `feature:setup` hook) as a workaround for that ordering, remove it — the recipe registers it now and the hook would otherwise run twice.
61+
6062
If the application needs to setup additional configuration files for e.g. storing the database credentials, use the feature templates to provide this kind of dynamic setup. For example the TYPO3 setup with a `.env` file:
6163

6264
```php
@@ -82,10 +84,16 @@ You can extend these list be providing more environment variables starting with
8284
> Hint: If you're using other deployer commands within the feature branch deployment context, you should use the `feature:init` task to extend the host definition with the necessary feature instance configuration:
8385
>
8486
> ```php
85-
> before('deploy:rollback', 'feature:init');
87+
> before('my:task', 'feature:init');
88+
> ```
89+
>
90+
> `feature:init` is a no-op without `--feature`, so the command keeps operating on the base instance. Use `feature:select` instead if the command should offer an interactive choice between the existing feature instances when `--feature` is omitted:
91+
>
92+
> ```php
93+
> before('my:task', 'feature:select');
8694
> ```
8795
>
88-
> `feature:init` is a no-op without `--feature`, so the command keeps operating on the base instance. Use `feature:select` instead if the command should offer an interactive choice between the existing feature instances when `--feature` is omitted.
96+
> `rollback` and the `debug:*` tasks are already wired to `feature:select` by the recipe.
8997
9098
### Deletion
9199

0 commit comments

Comments
 (0)