Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

zend-console not working as documented #34

Closed
FalkHe opened this issue Jan 25, 2017 · 9 comments
Closed

zend-console not working as documented #34

FalkHe opened this issue Jan 25, 2017 · 9 comments

Comments

@FalkHe
Copy link

FalkHe commented Jan 25, 2017

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
Copy link
Member

May be, this is an version issue.

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

@finalxcode
Copy link

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

@FalkHe
Copy link
Author

FalkHe commented Mar 24, 2017

@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
Copy link

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

@weierophinney
Copy link
Member

@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
Copy link
Contributor

mdthh commented Jan 23, 2019

@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
Copy link
Member

@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.

mdthh added a commit to mdthh/zend-console that referenced this issue Jan 23, 2019
Missiing infos:
* For MVC Routing zend-console needs zend-mvc-console
* zend-mvc-console is deprecated!
See also:
zendframework#34
@weierophinney
Copy link
Member

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

We have the following components related to console functionality:

  • zendframework/zend-console provides an adapter-based approach for working with the console at a low-level.
  • zendframework/zend-mvc-console provides bindings for using zend-mvc controllers to provide handlers for console purposes, using zendframework/zend-console.
  • zfcampus/zf-console provides a console microframework for writing console application using zendframework/zend-console. (zfcampus is the organization where Apigility, our API builder and runtime, lives; zf-console was developed there as we had need for easier console tooling within that project.)

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
Copy link
Contributor

mdthh commented Jan 23, 2019

@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.
b493eb6

@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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants