0
votes

I have package PACK-A, which is require by other packages (PACK-X,PACK-Y,PACK-Z).

I include all those packages in my main project PROJ-FUN.

Those packages (PACK-X,PACK-Y,PACK-Z) require version "~1.0.0" from PACK-A.

Now i clone PACK-A to a new repository with version "0.10.29" and now i try to require PACK-A in the project but i have the following error :

Problem 1

  • VENDOR/PACK-X v1.1.1 requires VENDOR/PACK-A ^1.0.1 -> satisfiable by VENDOR/PACK-X[v1.0.2] but these conflict with your requirements or minimum-stability.
  • ......
  • ......
  • Installation request for VENDOR/PACK-X ^1.1.1 -> satisfiable by VENDOR/PACK-X[v1.1.1].

I try do the following but in vain :

  • "VENDOR/PACK-A": "0.10.29 as 1.1.2" .
  • "VENDOR/PACK-A": "dev-master" .
  • "VENDOR/PACK-A": "@DEV" .
  • Set minimum stability to dev.
  • Ignore platform Requirement.

My Project JSON :

{
"name": "VENDOR/fun-project",
"description": "VENDOR/FUN APPLICAION",
"license": "proprietary",
"prefer-stable": "true",
"require": {
    "VENDOR/PACK-A": "0.10.29 as 1.1.2@dev",
    "VENDOR/PACK-X": "^1.1",
    "VENDOR/PACK-Y": "^1.1",
    "VENDOR/PACK-Z": "^1.1"
},
"config": {
    "bin-dir": "bin",
    "discard-changes": "true"
},
"repositories": [{
    "type": "git",
    "url": "git@github.com:VENDOR/PACK-A"
}]

}

PACK-XYZ JSON :

{
    "name": "VENDOR / PACK - X",
    "description": "",
    "type": "symfony-bundle",
    "license": "proprietary",
    "require": {
        "VENDOR / PACK - A": "~1.0.0"
    },
    "extra": {
        "branch-alias": {
            "dev-master": "1.1.x-dev"
        }
    },
    "repositories": [{
        "type": "git",
        "url": "https://github.com/VENDOR/PACK-A.git"
    }]
}

Any one could help how to solve this ? Thank you in advance.

** References :**

1

1 Answers

1
votes

Apparently, all of your projects

  • vendor/pack-x
  • vendor/pack-y
  • vendor/pack-z

depend on

  • vendor/pack-a:~1.0.0

The ~ operator used here allows to install vendor/pack-a in any version equal to or greater than 1.0.0 and less than 1.1.0.

Furthermore, your project

  • vendor/fun-project

requires all of

  • vendor/pack-x
  • vendor/pack-y
  • vendor/pack-z

and additionally

  • vendor/pack-a:0.10.29 as 1.1.2@dev

However, 1.1.2@dev clearly conflicts with the earlier version requirement of ~1.0.0.

Try adjusting your inline alias for vendor/fun-project to:

  • vendor/pack-a:0.10.29 as 1.0.99

For reference, see: