Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependency restriction to ZF 2.4.x #81

Closed
alexb-uk opened this issue Nov 30, 2015 · 7 comments
Closed

Dependency restriction to ZF 2.4.x #81

alexb-uk opened this issue Nov 30, 2015 · 7 comments

Comments

@alexb-uk
Copy link
Contributor

Hi,

I'm having an issue installing this package via Composer due to a version constraint mismatch between ZF 2.4.x and 2.5.x. I'm doing a spike test project using the latest Apigility Skeleton project but can't get this to work.

> composer require --dev zenddevops/client
Using version ^1.1 for zenddevops/client
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Conclusion: remove zendframework/zendframework 2.5.2
    - Conclusion: don't install zendframework/zendframework 2.5.2

I was about to fork the repo and test to see if ZendServerSDK really does have a dependency on 2.4 but thought I might save myself some time if I posted a message here first.

If you aren't sure I can give it a quick try but having never used the ZendServerSDK before I'm not 100% confident I will spot any issues.

Many Thanks

Alex

@slaff
Copy link
Contributor

slaff commented Dec 1, 2015

Getting the source code is needed if you want to extend further the zs-client itself.
If you just want to use it then get the phar file: https://github.com/zend-patterns/ZendServerSDK/raw/master/bin/zs-client.phar.

@alexb-uk
Copy link
Contributor Author

alexb-uk commented Dec 1, 2015

I was hoping to be able to use Composer to manage the dependency on ZendServerSDK via require-dev. AFAIK you cannot get Composer to pull in a single PHAR file without the mismatched dependencies.

I did fork master to try it and so far its worked perfectly on PHP 5.6 and 2.5.2.
See: alexb-uk@ac45aff

Tested so far includes: Adding target, initZpk, monitorGetIssuesListPredefinedFilter, packZpk and installApp.

Would you prefer to limit the ZF dependency to version 2.4.* or could I submit a Pull Request to get it relaxed to >=2.4.0, <3.0.0.

Thanks

@slaff
Copy link
Contributor

slaff commented Dec 1, 2015

@alexb-uk 2.4.0 is the Long Term Zend Framework 2 version. I am fine to relax the rules. It would be great if your PR includes also UnitTests for Service Manager and Event Manager. The reason for this is that they were refactored recently and are not backwards compatible (https://github.com/zendframework/zend-eventmanager/tree/develop/doc/book/migration). This ways we can spot fast enough if there are issues with the latest 2.x Event or Service Manager if somebody decides to break compatibility.

@alexb-uk
Copy link
Contributor Author

alexb-uk commented Dec 1, 2015

I had not heard of the LTS for ZF2 so thanks a lot for pointing that out.

I'll have a think, I might consider rolling back our project to the LTS version instead.

Cheers

@alexb-uk alexb-uk closed this as completed Dec 1, 2015
@alexb-uk
Copy link
Contributor Author

alexb-uk commented Dec 1, 2015

I've had a browse around the source code and it appears from a very basic search that ZendServerSDK itself doesn't have any dependency on Service Manager or Event Manager!?!?

The only sub-dependency was the zendframework/zend-i18n which requires them both. But we should rely on the maintainers of the zend-i18n module to have good integration tests.

If that is the case I would suggest we're safe to proceed with relaxing the constraint BUT we would need to be careful if anyone added a dependency specific to 2.4.x or 2.5.x in the future.

I've run the unit tests on my local dev environment all passed (PHP 5.6 and ZF 2.5.2)

Thoughts?

EDIT: Sorry I missed that zenddevops/webapi depends on zendframework/zend-servicemanager

But the ZendServerWebApiModule project is much more open:

"zendframework/zend-servicemanager" : ">=2.0.0"

@slaff
Copy link
Contributor

slaff commented Dec 1, 2015

Send me Pull Request request :)

On Tue, Dec 1, 2015 at 5:36 PM, alexb-uk [email protected] wrote:

I've had a browse around the source code and it appears from a very basic
search that ZendServerSDK itself doesn't have any dependency on Service
Manager or Event Manager!?!?

The only sub-dependency was the zendframework/zend-i18n which requires
them both. But we should rely on the maintainers of the zend-i18n module to
have good integration tests.

If that is the case I would suggest we're safe to proceed with relaxing
the constraint BUT we would need to be careful if anyone added a dependency
specific to 2.4.x or 2.5.x in the future.

I've run the unit tests on my local dev environment all passed (PHP 5.6
and ZF 2.5.2)

Thoughts?


Reply to this email directly or view it on GitHub
#81 (comment)
.

@alexb-uk
Copy link
Contributor Author

alexb-uk commented Dec 2, 2015

@wrightkennethj sorry I didn't follow that :)

I'll send over a Pull Request now but feel free to ignore it if you guys think this requires some more consideration.

See: Pull Request #82

slaff added a commit that referenced this issue Dec 2, 2015
Relaxing version constraint for Zend Framework. #81
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants