Skip to content
This repository has been archived by the owner on Feb 24, 2021. It is now read-only.

zend-console should not be required by zend-mvc #4

Closed
weierophinney opened this issue Dec 31, 2019 · 1 comment
Closed

zend-console should not be required by zend-mvc #4

weierophinney opened this issue Dec 31, 2019 · 1 comment

Comments

@weierophinney
Copy link
Member

This issue has been moved from the zendframework repository as part of the bug migration program as outlined here - http://framework.zend.com/blog/2016-04-11-issue-closures.html


Original Issue: https://api.github.com/repos/zendframework/zendframework/issues/7107
User: @marc-mabe
Created On: 2015-01-07T18:16:45Z
Updated At: 2015-04-03T06:51:53Z
Body
The zend-console component is already within the suggest part of composer but in fact if you use zend-mvc only for HTTP handling using defaults you have to install zend-console only because it's using Console::isConsole().

see https://github.com/zendframework/zf2/blob/67f098af070b29d5042e89e936604df3193d2212/library/Zend/Mvc/Service/RequestFactory.php#L28
see https://github.com/zendframework/zf2/blob/67f098af070b29d5042e89e936604df3193d2212/library/Zend/Mvc/Service/ResponseFactory.php#L28

This simple check should be replaced by PHP_SAPI == 'cli'. I don't know if it's required for testing to virtually mark the current running script as non CLI but this should be simple enough to be duplicated in zend-mvc to not require zend-console.


Comment

User: @Ocramius
Created On: 2015-01-07T18:23:00Z
Updated At: 2015-01-07T18:23:00Z
Body
The MVC is supposed to run both in console and in HTTP environments: I don't think that should be changed at all (personal opinion).

Also, please remember to use absolute commit-based URIs when linking code, or the references will be lost as the branches get updated.


Comment

User: @marc-mabe
Created On: 2015-01-07T18:29:44Z
Updated At: 2015-01-07T18:30:03Z
Body

The MVC is supposed to run both in console and in HTTP environments
Than it would need to be part of the required section.

In my opinion the mvc should not hard require HTTP or Console. Sure it's designed to work with both and that's very nice but it should not be required.


Comment

User: @marc-mabe
Created On: 2015-01-07T18:32:57Z
Updated At: 2015-01-07T18:32:57Z
Body

Also, please remember to use absolute commit-based URIs when linking code, or the references will be lost as the branches get updated.

updated links to reference the latest commit


Comment

User: @Pittiplatsch
Created On: 2015-01-08T06:42:33Z
Updated At: 2015-01-08T06:42:33Z
Body

In my opinion the mvc should not hard require HTTP or Console. Sure it's designed to work with both and that's very nice but it should not be required.

+1
Maybe kind of IOC can help here, i.e. let zend-console inject some flag into zend-mvc during bootstrap? Should be trivial by using an appropriate event...


Comment

User: @harikt
Created On: 2015-04-03T06:51:52Z
Updated At: 2015-04-03T06:51:52Z
Body
Hi @Ocramius ,

I was learning zend-mv from the docs http://framework.zend.com/manual/current/en/modules/zend.mvc.intro.html

I have came across a few dependency that the zend-mvc really need or throw errors not found.

        "zendframework/zend-modulemanager": "~2.4",
        "zendframework/zend-loader": "~2.4",
        "zendframework/zend-view": "~2.4",
        "zendframework/zend-serializer": "~2.4",
        "zendframework/zend-log": "~2.4",
        "zendframework/zend-i18n":"~2.4",
        "zendframework/zend-console": "~2.4",
        "zendframework/zend-http": "~2.4",
        "zendframework/zend-cache": "~2.4"

Though, some of you may disagree with me.

Thanks



Originally posted by @GeeH at zendframework/zend-console#24

@Xerkus
Copy link
Member

Xerkus commented Jan 18, 2020

Long obsolete issue. Closing

@Xerkus Xerkus closed this as completed Jan 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants