Skip to content

Commit

Permalink
added documentation for config option 'bootstrap_mvc_application'
Browse files Browse the repository at this point in the history
Signed-off-by: Falk Hermann <[email protected]>
  • Loading branch information
FalkHe committed Mar 9, 2023
1 parent a74c954 commit 078b4be
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions docs/book/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,30 @@ class Module
}
```

### MVC Application bootstrapping

Until 1.9.x laminas-cli did not bootrap the MVC Application and therefore left the Application in an unready state
wehen executing commands via laminas-cli. (read this [Issue](https://github.com/laminas/laminas-cli/issues/106))

To allow bootstrapping the MVC Application, without breaking backward compatibility, the option `'bootstrap_mvc_application'`
was introduced. Currently it's `false` by default to not break any Apps. This might change in the future.
When enabling it, make sure not to do any HTTP-Only related stuff on Module's `onBootstrap` method.

```php
// File config/application.config.php
<?php
return [
/* ... */
'laminas-cli' => [
// execute Laminas\Mvc\Application::init(), including ::boostrap() during initialization of cli app
'bootstrap_mvc_application' => true,
]
];
```

## Integration in Other Applications

laminas-cli supports [Laminas MVC](https://github.com/laminas/laminas-mvc-skeleton)
Expand Down

0 comments on commit 078b4be

Please sign in to comment.