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

zend-json required only as dev dependency #163

Closed
reinfi opened this issue Aug 15, 2018 · 3 comments
Closed

zend-json required only as dev dependency #163

reinfi opened this issue Aug 15, 2018 · 3 comments
Labels

Comments

@reinfi
Copy link

reinfi commented Aug 15, 2018

Hey there,

why is zend-json only required as dev dependency, although the JsonModel in this package has a dependency on it?

Could it be moved to normal dependencies?

@froschdesign
Copy link
Member

froschdesign commented Aug 15, 2018

@reinfi
It is only a soft dependency and therefore it is included in the suggest section of the composer file.

"zendframework/zend-json": "Zend\\Json component",

Or with other words: zend-json is not strictly required.

@froschdesign
Copy link
Member

I found a problem: the JsonModel may be optional, but zend-json is also used in the Json view helper and in the AbstractHtmlElement:

https://github.com/zendframework/zend-view/blob/master/src/Helper/Json.php

$val = \Zend\Json\Json::encode($val);

@samsonasik
Copy link
Contributor

I've created PR #169 for it

weierophinney added a commit that referenced this issue Dec 6, 2018
Fixes #163 : apply zend-json to require
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants