zendframework / zend-log

Log component from Zend Framework
BSD 3-Clause "New" or "Revised" License
62 stars 51 forks source link

Composer refuses to install zend-log with php 7.1.12 #80

Closed galvao closed 6 years ago

galvao commented 6 years ago

I'm not 100% sure if this is a composer or zend-log problem (I believe it's likely to be the former, so if that's the case my apologies):

I've tried installing zend-log on an Expressive project (created with the Expressive skeleton) and this is the result:

zaphod@magrathea myproject]$ composer require zendframework/zend-log
    1/6:        http://packagist.org/p/provider-2017-01$c6462e65b3cdbc2cc191fd7bede47fd94c07f9e4ed39bc9a76ba0b2bdfa515b5.json
    2/6:        http://packagist.org/p/provider-2017-07$f4a7cb0e4c0d9672d1c6354360d6bfc29622dd154d4dea81bcc4796e3e8fd9e9.json
    3/6:        http://packagist.org/p/provider-2016$963dbb96d9d2728119ffe0278fc854f69e3223bf348786e38eaf19293c019598.json
    4/6:        http://packagist.org/p/provider-2017-10$59f8fc22e2415a6a9ec970dc924c220418f20eca6f6bccf1250c6f9b3d94bf2c.json
    5/6:        http://packagist.org/p/provider-2017-04$5bbb2709c4a8771c7688f9bb17cde55b4aa1de0ae92483314681d40d76fd8645.json
    6/6:        http://packagist.org/p/provider-latest$a086925ea2f3e6592b7fb0b499c01dd2003718407f64eee5ebce709b8bfdcaaa.json
    Finished: success: 6, skipped: 0, failure: 0, total: 6
Using version ^2.9 for zendframework/zend-log
./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
    - This package requires php ^5.6 but your PHP version (7.1.12) does not satisfy that requirement.

Installation failed, reverting ./composer.json to its original content.
weierophinney commented 6 years ago

This actually sounds like a Composer issue.

The constraint we use (^5.6 || ^7.0) means that any PHP 5.6 or PHP 7 version is a valid runtime for the component, which means that if you try and install it on PHP 7.1, it will succeed.

What version of composer are you using? (run composer --version to find out)

In the meantime... I've done the following:

$ composer create-project zendframework/zend-expressive-skeleton zend-log-80
$ cd zend-log-80
$ composer require zendframework/zend-log

This all worked as expected for me; I received prompts where expected, and the project and component installed as expected. I did this using Composer 1.5.2 and a PHP 7.1 runtime. As such, if you can reliably reproduce the issue, I think you'll need to raise it with Composer.

geerteltink commented 6 years ago

@galvao Can you try this:

Be sure to work with the latest version of composer by running composer self-update. Try clearing Composer's cache by running composer clear-cache.

We had issues in the past with the expressive skeleton and updating to the latest version and clearing the cache fixed most problems.

galvao commented 6 years ago

@xtreamwayz @weierophinney Thank you guys. Updating composer and clearing the cache solved it.