-
-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Labels
DocumentationImprovements or additions to documentationImprovements or additions to documentationEnhancement
Description
Feature Request
| Q | A |
|---|---|
| New Feature | yes |
| RFC | no |
| BC Break | no |
Summary
We're migrating our (pretty big) application from laminas-mvc-console to laminas-cli. So far I genuinely like the new setup, but the migration hasn't been trivial for us so far: we've run into some issues that might be worth documenting. Here are some things I've gathered so far:
laminas-clidoes not initialize aLaminas\Mvc\Applicationand therefore does not initiate the MVC application lifecycle. If your app depends on any MVC events (bootstrap, route, dispatch, etc) then this won't work for console commands.- because no MVC events are triggered, a module's
onBootstrapmethod will also not be called, as it depends onMvcEvent::EVENT_BOOTSTRAPbeing triggered. UsingonBootstrapis suggested by the Laminas documentation for doing lightweight application setup like setting up event listeners (we're now usingModuleEvent::EVENT_LOAD_MODULES_POSTinstead). public/index.phpis no longer the application entry point, so if you do any setup here then that will no longer work. The docs for the MVC skeleton suggest to add some error reporting here, so it might be good to explicitly mention warn about this in thelaminas-clidocs.
There might be more, but this is what I could come up with now. I'd be willing to create a documentation PR by the way, I just figured it was better to file an issue first. :)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
DocumentationImprovements or additions to documentationImprovements or additions to documentationEnhancement