Open brian-n-millar opened 1 year ago
Good finding, this is indeed too specific for mezzio projects.
Could be something like:
return [
'<container config identifier>' => [
'factories' => [
MyNamespace\Command\MyCommand::class => MyNamespace\Command\MyCommandFactory::class,
],
],
];
Plus an addition below like:
> ### Container Config Identifier
>
> - for **Laminas MVC** projects, this has to be `service_manager`
> - for **Mezzio** projects, this has to be `dependencies`
Would you mind creating a PR for this? I'd be happy to merge that.
Thank you, I've made a PR using your suggested wording. PR #112
Looks like I caused linting errors, sorry about that.
Update: fixed.
@brian-n-millar This is an important hint, so thanks for opening this issue report! 👍🏻
Unfortunately, the entire page is a horror for me, so I will completely rework it. There needs to be a clear separation of explanations and the confusion needs to be resolved.
See also: https://github.com/laminas/laminas-cli/pull/112#discussion_r1188187771
Feature Request
Clarify documentation for MVC users.
Summary
I was migrating a Zend Framework 3 application to Laminas and hence from zend-console to laminas-cli. I read the following page: https://docs.laminas.dev/laminas-cli/intro/
I find step 3 is confusing:
I spent a good while trying to get this to work and could not, it was only by reading the other stuff further down about ConfigProvider:
That I then realized that
dependencies
should beservice_manager
for MVC applications and I got the first code working by making it be like:Maybe this is obvious to some but I think it would help MVC users to point this out clearly in step 3 as it took me some time to realize why it wasn't working.