PHP composer, use of require tag + hash

1

I'm trying to install the vendor of an application and I have a slightly strange error:

  

Installation request for sg / datatablesbundle   dev-master # 73ac0ed0ba5adbfe0139b19e1f1c073f4e4c120a - > satisfiable by   sg / datatablesbundle [dev-master].

     

sg / datatablesbundle dev-master   requires friendsofsymfony / jsrouting-bundle 1.6.0 - > no matching   package found.

Reviewing the package datatablesbundle , I see that dev-master requires jsrouting-bundle version 1.6.0 and says that this package does not exist, but in github and in packagist they appear.

I have a requirement that datatablebundle be of that particular commit. If I check that commit on github I see that it's now from branch v0.13, so I think in composer I write in the section require something type:

"friendsofsymfony/jsrouting-bundle": "1.6.0",
"sg/datatablesbundle": "**v0.13#73ac0ed0ba5adbfe0139b19e1f1c073f4e4c120a**",

Thing that does not work.

I currently have:

"friendsofsymfony/jsrouting-bundle": "dev-master",
"sg/datatablesbundle": "dev-master#73ac0ed0ba5adbfe0139b19e1f1c073f4e4c120a",

But I can not solve it. Does anyone have any ideas on how to fix it?

    
asked by Jakala 07.02.2017 в 08:01
source

1 answer

2

One solution is to indicate that you load version dev-master as if it were version 1.6.0 making use of a alias inline :

{
  "name": "redstar/temporal",
  "description": "Descripción",
  "authors": [
    {
      "name": "Óscar García",
      "email": "[email protected]"
    }
  ],
  "minimum-stability": "dev",
  "require": {
    "friendsofsymfony/jsrouting-bundle": "dev-master as 1.6.0",
    "sg/datatablesbundle": "dev-master#73ac0ed0ba5adbfe0139b19e1f1c073f4e4c120a"
  }
}
    
answered by 07.02.2017 в 09:32