Skip to content

horde-components.phar install generates invalid options.versions for horde/yaml path repository, breaking Composer resolution #28

Description

@jcdelepine

horde-components.phar install injects "options": {"versions": {"horde/yaml": "3.0.0-RC"}} into the path repository entry for Yaml in the generated composer.json (including v1.0.0RC5). This prevents Composer from resolving dependencies because the version 3.0.0-RC does not satisfy the constraint ^3.0.0RC1 required by horde/hordeymlfile, and the path repository has higher priority than Packagist.

Workaround: manually removing the "options" block from the Yaml entry in composer.json.

www-data@horde6:~$ ./horde-components.phar install
[   OK   ] Using Git Checkout Directory: /var/www/horde-git
[   OK   ] Using Web Tree Directory: /var/www/horde
[   OK   ] Copied composer.json from bundle
[   OK   ] Packages from git dir are set as local repositories. Only foreign packages are installed via packagist.
www-data@horde6:~$ cd horde
www-data@horde6:~/horde$ grep -B 5 Yaml composer.json 
            "options": {
                "versions": {
                    "horde\/yaml": "3.0.0-RC"
                }
            },
            "url": "\/var\/www\/horde-git\/horde\/Yaml"
www-data@horde6:~/horde$ composer require horde/imp horde/kronolith horde/ingo horde/turba horde/nag horde/mnemo Predis/predis  horde/ldap
./composer.json has been updated
Running composer update horde/imp horde/kronolith horde/ingo horde/turba horde/nag horde/mnemo predis/predis horde/ldap
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires horde/horde ^6 || dev-FRAMEWORK_6_0 -> satisfiable by horde/horde[6.0.0-RC7].
    - horde/horde 6.0.0-RC7 requires horde/hordeymlfile ^1 || dev-FRAMEWORK_6_0 -> satisfiable by horde/hordeymlfile[1.0.0-RC2].
    - horde/hordeymlfile 1.0.0-RC2 requires horde/yaml ^3.0.0RC1 || dev-FRAMEWORK_6_0 -> satisfiable by horde/yaml[dev-FRAMEWORK_6_0, v3.0.0RC1, 3.x-dev (alias of dev-FRAMEWORK_6_0)] from composer repo (https://repo.packagist.org) but horde/yaml[3.0.0-RC] from path repo (/var/www/horde-git/horde/Yaml) has higher repository priority. The packages from the higher priority repository do not match your constraint and are therefore not installable. That repository is canonical so the lower priority repo's packages are not installable. See https://getcomposer.org/repoprio for details and assistance.

You can also try re-running composer require with an explicit version constraint, e.g. "composer require horde/imp:*" to figure out if any version is installable, or "composer require horde/imp:^2.1" if you know which you need.

Installation failed, reverting ./composer.json to its original content.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions