When trying to install a juicebox that requires libraries, the dependencies do not result in a working configuration. This is because Juicebox defines a version requirement in the .info file that is not translated correctly into the corresponding Composer restriction.
Juicebox defines it dependencies as follows:
core = 7.x
dependencies() = image
dependencies() = libraries (>1.0)
This means that any version of libraries higher than 1.0 would work (i.e. 1.1, 2.0).
The following versions are installed when installing libraries and Juicebox with Composer:
However, this does not correspond to the actual requirements in Drupal:
If you try to manually install the correct version of the libraries:
it doesn't work and that
composer update Outputs:
Your requirements could not be resolved to an installable set of packages.
- Conclusion: remove drupal/juicebox 2.1.0
- Conclusion: don't install drupal/juicebox 2.1.0
- Conclusion: don't install drupal/libraries 2.5.0
- Conclusion: don't install drupal/libraries 2.4.0
- Conclusion: don't install drupal/libraries 2.3.0
- Conclusion: don't install drupal/libraries 2.2.0
- Conclusion: don't install drupal/libraries 2.1.0
- Conclusion: don't install drupal/libraries 2.0.0
- Conclusion: don't install drupal/libraries 2.0.0-alpha2
- Installation request for drupal/juicebox ^2.1 -> satisfiable by drupal/juicebox(2.x-dev, 2.1.0).
- Conclusion: don't install drupal/libraries 2.0.0-alpha1
- drupal/juicebox 2.x-dev requires drupal/libraries ^1.1 -> satisfiable by drupal/libraries(1.x-dev).
- Can only install one of: drupal/libraries(1.x-dev, 2.x-dev).
- Can only install one of: drupal/libraries(2.x-dev, 1.x-dev).
- Installation request for drupal/libraries ^2.0 -> satisfiable by drupal/libraries(2.x-dev, 2.5.0, 2.4.0, 2.3.0, 2.2.0, 2.1.0, 2.0.0, 2.0.0-alpha2, 2.0.0-alpha1).
This clearly shows the problem, namely that
> by doing
juicebox.info is translated into a composer restriction of
^1.1 it's not the same:
^ in the composer everything means until the next major version
> in drupal
.info Files means everything above
I didn't know where to post this issue since Drupal forums reported it as spam and I couldn't find a repository where this was implemented.