0

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 :**

Lorna Mitchell
  • 1,819
  • 13
  • 22
SMSM
  • 1,509
  • 3
  • 19
  • 34

1 Answers1

1

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:

localheinz
  • 9,179
  • 2
  • 33
  • 44
  • I have no control over PACKs X Y Z , or lets say i can't update them right now , – SMSM Aug 23 '17 at 09:54
  • So how does adjusting your requirement in `vendor/fun-project` work for you? – localheinz Aug 23 '17 at 09:59
  • it's work only with if i use old vendor pack-a with version "^1.0.2" , if i change the repo URL to the new one with version "0.10.29" as "1.0.2" or even as "1.0.99" a lot of dependency start to fail. – SMSM Aug 23 '17 at 13:02