-
Notifications
You must be signed in to change notification settings - Fork 79
Conversation
👎 Instead I suggest refactor the code for not depend of StdLib Related: |
@Maks3w for now, it is required for the library to work, so it should be declared as a dependency as a quick fix to make the library work again without a fatal error. |
The point is where is the limit between "suggest" dependencies and "require" dependencies. /cc @weierophinney |
@Maks3w there is a fatal error when trying to use zend-code without having zend-stdlib, so it does not seem optional, even though it is used in a single place. Especially given that it was not happening when using only 2.x components (because zend-stdlib was a transitive dependency). And from what I see, it would be very hard to use zend-code without triggering any code path relying on the ValueGenerator (as the place using zend-stdlib is the ValueGenerator constructor). |
The proposed solution is wrong, because it's based on a faulty analysis of the root cause. The better solution is to change the Update this PR to do that instead, and we can accept it. |
@stof one other note: @Maks3w is correct. There are many paths of usage of this component that do not require stdlib: e.g. using only the reflection subcomponent, or using only the annotation subcomponent. Only usage of the generator requires it, and that's an optional use case; as such, the dependency was correctly marked as optional. That said, with my suggested change, it won't be required at all. |
@weierophinney PR updated, is that what you had in mind? |
Close but not enough. Give me a few minutes while end to write a BC safe alternative |
@@ -18,14 +18,12 @@ | |||
}, | |||
"require-dev": { | |||
"doctrine/common": ">=2.1", | |||
"zendframework/zend-stdlib": "~2.7", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is still necessary. The testsuite relies on the stdlib error handler in one place (currently not failing because of zend-version depending on it transitively and #10 is not yet merged)
zend-eventmanager used to "require" zend-stdlib but in 3.0 (branch develop) this is gone (zend-stdlib is moved from require to require-dev).
This means that zend-stdlib was always installed when zend-code was.
But by allowing eventmanager ^3.0, this is not true anymore, and breaks packages that relied on this assumption (see e.g. #21 and Ocramius/ProxyManager#260)