ubuntux
ubuntux

Reputation: 404

ZF2 dependency issues during installation

I am setting up a website on my local environment created in ZF2. After cloning the codes, I ran composer install and encountered errors. Tried to search for some answers that may help but none of what I found worked for me and ended up posting it here. Here are the errors that I had encountered:

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 request for zf-commons/zfc-user-doctrine-orm dev-master -> satisfiable by zf-commons/zfc-user-doctrine-orm[dev-master].
    - zf-commons/zfc-user-doctrine-orm dev-master requires doctrine/doctrine-orm-module ~1.0 -> satisfiable by doctrine/doctrine-orm-module[1.0.0] but these conflict with your requirements or minimum-stability.
  Problem 2
    - don't install zendframework/zend-validator 2.8.1|don't install zendframework/zendframework 2.3.0
    - don't install zendframework/zend-validator 2.8.1|don't install zendframework/zendframework 2.3.1
    - don't install zendframework/zend-validator 2.8.1|don't install zendframework/zendframework 2.3.2
    - don't install zendframework/zend-validator 2.8.1|don't install zendframework/zendframework 2.3.3
    - don't install zendframework/zend-validator 2.8.1|don't install zendframework/zendframework 2.3.4
    - don't install zendframework/zend-validator 2.8.1|don't install zendframework/zendframework 2.3.5
    - don't install zendframework/zend-validator 2.8.1|don't install zendframework/zendframework 2.3.6
    - don't install zendframework/zend-validator 2.8.1|don't install zendframework/zendframework 2.3.7
    - don't install zendframework/zend-validator 2.8.1|don't install zendframework/zendframework 2.3.8
    - don't install zendframework/zend-validator 2.8.1|don't install zendframework/zendframework 2.3.9
    - doctrine/doctrine-module dev-master requires zendframework/zend-validator ^2.8.1 -> satisfiable by zendframework/zend-validator[2.8.1].
    - Installation request for doctrine/doctrine-module dev-master -> satisfiable by doctrine/doctrine-module[dev-master].
    - Installation request for zendframework/zendframework 2.3.* -> satisfiable by zendframework/zendframework[2.3.0, 2.3.1, 2.3.2, 2.3.3, 2.3.4, 2.3.5, 2.3.6, 2.3.7, 2.3.8, 2.3.9].

My composer.json contains:

{
  "name" : "zendframework/skeleton-application",
  "description" : "Skeleton Application for ZF2",
  "require" : {
    "php" : ">=5.3.3",
    "zendframework/zendframework" : "2.3.*",
    "zendframework/zend-developer-tools" : "dev-master",
    "zf-commons/zfc-user" : "1.*",
    "doctrine/doctrine-module" : "dev-master",
    "doctrine/doctrine-orm-module" : "dev-master",
    "zendframework/zftool" : "dev-master",
    "zf-commons/zfc-user-doctrine-orm" : "dev-master",
    "beberlei/DoctrineExtensions" : "1.0"
  },

  "keywords" : [ "framework", "zf2" ],
  "license" : "BSD-3-Clause",
  "homepage" : "http://framework.zend.com/"
}

Tried changing the versions but can't seem to get the right one. Any help will be appreciated.

UPDATE:
After applying the changes suggested by @al-fonce, the errors were reduced to:

Problem 1
    - Installation request for doctrine/doctrine-orm-module 0.8.* -> satisfiable by doctrine/doctrine-orm-module[0.8.0].
    - doctrine/doctrine-orm-module 0.8.0 requires doctrine/doctrine-module 0.8.* -> satisfiable by doctrine/doctrine-module[0.8.0, 0.8.0-beta1, 0.8.0-beta2, 0.8.1] but these conflict with your requirements or minimum-stability.
  Problem 2
    - Installation request for zf-commons/zfc-user-doctrine-orm dev-master -> satisfiable by zf-commons/zfc-user-doctrine-orm[dev-master].
    - zf-commons/zfc-user-doctrine-orm dev-master requires doctrine/doctrine-orm-module ~1.0 -> satisfiable by doctrine/doctrine-orm-module[1.0.0] but these conflict with your requirements or minimum-stability.

Thanks!

Upvotes: 1

Views: 1090

Answers (1)

Al Foиce    ѫ
Al Foиce ѫ

Reputation: 4315

You use dev-master version of some modules, wich requires higher version of the Zend-Framework you are using. Doctrine2 dev-master version is to recent for Zend Framework 2.3. For Doctrine2 on my ZF2.5 website, I use

"zendframework/zendframework": "~2.5",
"doctrine/doctrine-orm-module": "~1.0"

For an old Zend Framework 2.3 project, I used Doctrine 0.8, so if version 1.0 for Doctrine doesn't work, try :

"zendframework/zendframework": "~2.3",
"doctrine/doctrine-orm-module": "0.8.*"

Upvotes: 2

Related Questions