zfcampus / statuslib-example

Library for use with Apigility examples
BSD 3-Clause "New" or "Revised" License
9 stars 16 forks source link

apigility version: 1.6.0 — zfcampus/statuslib-example installation fails #11

Open fogelfish opened 6 years ago

fogelfish commented 6 years ago

Following along with the official Apigility tutorial, I installed Apigility successfully:

composer create-project zfcampus/zf-apigility-skeleton ./apigility

Still following the instructions I got to this point:

composer require zfcampus/statuslib-example

but got this output:

Using version ^1.1 for zfcampus/statuslib-example
./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
    - Can only install one of: zendframework/zend-config[2.6.0, 3.2.0].
    - Can only install one of: zendframework/zend-config[3.2.0, 2.6.0].
    - Can only install one of: zendframework/zend-config[2.6.0, 3.2.0].
    - zfcampus/statuslib-example 1.1.0 requires zendframework/zend-config ^2.6 -> satisfiable by zendframework/zend-config[2.6.0].
    - Installation request for zfcampus/statuslib-example ^1.1 -> satisfiable by zfcampus/statuslib-example[1.1.0].
    - Installation request for zendframework/zend-config (locked at 3.2.0) -> satisfiable by zendframework/zend-config[3.2.0].

Installation failed, reverting ./composer.json to its original content.

The GitHub statuslib-example/composer.json file gives these requirements:

"require": {
    "php": "^5.6 || ^7.0",
    "ramsey/uuid": "^2.8",
    "zendframework/zend-config": "^2.6",
    "zendframework/zend-db": "^2.8.2",
    "zendframework/zend-paginator": "^2.7",
    "zendframework/zend-hydrator": "^1.1 || ^2.0",
    "zendframework/zend-stdlib": "^2.7.7 || ^3.0.1",
    "zfcampus/zf-configuration": "^1.0"
},

But in my installation of Apigility "zendframework/zend-config" is at 3.2.0. (Also "zendframework/zend-db" is at 2.9.3; "zendframework/zend-paginator" is at 2.8.1; "zfcampus/zf-configuration" is at 1.3.3; and I am using PHP 7.2.4.) Among these the only requirement that fails is zend-config" at 3.2.0.

How can I install zfcampus/statuslib-example?

femiiisaa92 commented 6 years ago

Add this "zfcampus/statuslib-example": "^1.1" to the default Composer file in the project it look like this "require": { "php": "^5.6 || ^7.0", "zendframework/zend-component-installer": "^1.1.1 || ^2.1.1", "zfcampus/zf-apigility": "^1.4", "zfcampus/zf-apigility-documentation": "^1.3", "zfcampus/zf-development-mode": "^3.2", "zfcampus/statuslib-example": "^1.1" } Then, composer update It work for me.

fredericboulanger commented 6 years ago

Hi,

I have the same problem that fogelfish but for me your answer doesn't resolve my problem.

Using version ^1.1 for zfcampus/statuslib-example ./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

Installation failed, reverting ./composer.json to its original content.

krishnasrikanth commented 6 years ago

Adding this line, as mentioned by femiiisaa92, worked for me.

"require": { . . . "zfcampus/statuslib-example": "^1.1" . . . }

After this, I had run "composer update", and it worked. FYI, I am running on PHP7.2.

weierophinney commented 4 years ago

This repository has been closed and moved to laminas-api-tools/statuslib-example; a new issue has been opened at https://github.com/laminas-api-tools/statuslib-example/issues/2.