zendframework / zend-console

Console component from Zend Framework
BSD 3-Clause "New" or "Revised" License
48 stars 31 forks source link

zend-console not working as documented #34

Closed FalkHe closed 7 years ago

FalkHe commented 7 years ago

The Docs say:

When a zend-mvc application is run from a console window (a shell window or Windows command prompt), it will recognize this fact and prepare zend-mvc components to handle the request. Console support is enabled by default, but to function properly it requires at least one console route and one action controller to handle the request. [...]

That seems not to be true and i can't find any code in zend-mvc (v3) that handles console-requests.

This doc should be replaced by working examples.

May be, this is an version issue. So zend-console should require zend-mvc v2 or documentation should point out that this only works with zend-mvc v2. ... and generally provide only documentation for its on functionality and usage.

froschdesign commented 7 years ago

May be, this is an version issue.

Right! See: https://docs.zendframework.com/zend-mvc-console/

finalxcode commented 7 years ago

@froschdesign @FalkHe you should install zendframework/zend-mvc:^3.0.4 and try again

FalkHe commented 7 years ago

@finalxcode 3.0.4 is from 20 Dec 2016. My Post is from 25 Jan 2017.

So i tried 3.0.4. and there is definitely no Console-Support in zend-mvc ^3.

db9tecnologia commented 7 years ago

Tive o mesmo problema e só consegui resolver instalando o modulo zendframework/zend-mvc-console

weierophinney commented 7 years ago

@FalkHe You need to install zend-mvc-console, as @froschdesign noted above. That package provides the zend-console integration for zend-mvc for versions 3 and up. (That said: we recommend migrating your console tooling to zfcampus/zf-console or symfony/console; zf-mvc-console will not receive long-term maintenance.)

@db9tecnologia Please use english in the github issue trackers for the ZF components and modules, to ensure everyone can understand your responses.

mdthh commented 5 years ago

@FalkHe You need to install zend-mvc-console, as @froschdesign noted above. That package provides the zend-console integration for zend-mvc for versions 3 and up.

If that still true? If so, pls. urgently clarify the misleading docs on zend-console.

The current docs on zend-mvc-console say:

Deprecated [...] We strongly urge developers to start migrating their MVC-based console tooling to use other libraries, such as zf-console.

However, if you just consult the docs on zend-console (not zend-mvc-console!) about MVC Routing the docs simply state:

zend-mvc provides integration with zend-console, routing command line arguments to the appropriate action controller and action method that will handle the request. Actions can perform any number of tasks prior to returning a result to display in the console window.

Now word here that you also need to install zend-mvc-console. No word that mvc-support for zend-console is deprecated.

Besides, it is also misleading that the official ZF-Docs on the deprecated zend-mvc-console refer in a link text to "zf-console", referring to https://github.com/zfcampus/zf-console while ZF also has it's own component named just so: "zf-console".

It seems I'm not the only one who finds the docs here a bit confusing...

froschdesign commented 5 years ago

@mdthh

If that still true? If so, pls. urgently clarify the misleading docs on zend-console.

Please look at the dates of the comments here. They are all old.

while ZF also has it's own component named just so: "zf-console".

There is no component named "zf-console" under the Zend Framework organization.


I'll see that we better communicate the problem in the documentation.

weierophinney commented 5 years ago

There is no component named "zf-console" under the Zend Framework organization.

We have the following components related to console functionality:

I hope that clears up where each of these packages lives and the purposes each serves.

Regardless, each of these is considered deprecated. Maintaining them requires too much effort, particularly when there are other solutions in this problem space.

mdthh commented 5 years ago

@froschdesign Thanx for the quick reply. I made a suggestion for the Docs on zend-console. This is my first pull request ever on Github. So pls. be forgiving if I made it wrongly. https://github.com/zendframework/zend-console/pull/42/commits/b493eb68a6478b23d256ce110a5c9885f3bf06b1

@weierophinney Thank you for your answer. I guess now it is clear to me. My suggestion still is for the sake of other Docs-readers, that the docs on zend-console should be clearer on this and less confusing.