2

I updated my Contao-Project from 4.9 with PHP 7.4 to 4.13 with PHP 8.1. When I execute "composer update" I run into an infinite loop:

Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Package dma/dma_elementgenerator is abandoned, you should avoid using it. No replacement was suggested.
Generating autoload files
63 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
Loading composer repositories with package information                                                                                                                            Updating dependencies                                 
Nothing to modify in lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Package dma/dma_elementgenerator is abandoned, you should avoid using it. No replacement was suggested.
Generating autoload files
63 packages you are using are looking for funding.
Use the `composer fund` command to find out more.
Loading composer repositories with package information   `

"composer update --no-scripts" produces the same result.

I had to update my installed packages to make the compatibility with PHP8.1 and Contao 4.13 possible. I also had to update my Metamodels-Package to version 2.3. After installing requiering the updated Metamodels-Models-Bundles the error took place. Is here anybody else with this problem? additional note: The Metamodels 2.3 - Package comes from a private repository... My composer.json requires:

"require": {
        "contao-community-alliance/contao-multicolumnwizard-frontend-bundle": "^2.3@dev",
        "contao-community-alliance/contao-textfield-multiple-bundle": "^2.3@dev",
        "contao-community-alliance/dc-general": "^2.3@dev",
        "contao-community-alliance/dc-general-contao-frontend": "^2.3@dev",
        "contao/calendar-bundle": "4.13.*",
        "contao/comments-bundle": "4.13.*",
        "contao/conflicts": "*@dev",
        "contao/faq-bundle": "4.13.*",
        "contao/listing-bundle": "4.13.*",
        "contao/manager-bundle": "4.13.*",
        "contao/news-bundle": "4.13.*",
        "contao/newsletter-bundle": "4.13.*",
        "delahaye/dlh_googlemaps": "^2.4",
        "dma/dma_elementgenerator": "dev-develop",
        "imi/composer-scripts-contao": "^1.0",
        "imi/database-helper": "^0.3.1",
        "imi/imi_mm_changelanguage": "dev-master",
        "kraken-io/kraken-php": "^1.6",
        "madeyourday/contao-rocksolid-columns": "^2.0",
        "menatwork/contao-multicolumnwizard-bundle": "^3.4",
        "metamodels/attribute_alias": "^2.3@dev",
        "metamodels/attribute_checkbox": "^2.3@dev",
        "metamodels/attribute_color": "^2.3@dev",
        "metamodels/attribute_combinedvalues": "^2.3@dev",
        "metamodels/attribute_contentarticle": "^2.3@dev",
        "metamodels/attribute_country": "^2.3@dev",
        "metamodels/attribute_decimal": "^2.3@dev",
        "metamodels/attribute_file": "^2.3@dev",
        "metamodels/attribute_geodistance": "^2.3@dev",
        "metamodels/attribute_langcode": "^2.3@dev",
        "metamodels/attribute_levenshtein": "^2.3@dev",
        "metamodels/attribute_longtext": "^2.3@dev",
        "metamodels/attribute_numeric": "^2.3@dev",
        "metamodels/attribute_rating": "^2.3@dev",
        "metamodels/attribute_select": "^2.3@dev",
        "metamodels/attribute_tablemulti": "^2.3@dev",
        "metamodels/attribute_tabletext": "^2.3@dev",
        "metamodels/attribute_tags": "^2.3@dev",
        "metamodels/attribute_text": "^2.3@dev",
        "metamodels/attribute_timestamp": "^2.3@dev",
        "metamodels/attribute_translatedalias": "^2.3@dev",
        "metamodels/attribute_translatedcheckbox": "^2.3@dev",
        "metamodels/attribute_translatedcombinedvalues": "^2.3@dev",
        "metamodels/attribute_translatedcontentarticle": "^2.3@dev",
        "metamodels/attribute_translatedfile": "^2.3@dev",
        "metamodels/attribute_translatedlongtext": "^2.3@dev",
        "metamodels/attribute_translatedtablemulti": "^2.3@dev",
        "metamodels/attribute_translatedtabletext": "^2.3@dev",
        "metamodels/attribute_translatedtext": "^2.3@dev",
        "metamodels/attribute_translatedurl": "^2.3@dev",
        "metamodels/attribute_url": "^2.3@dev",
        "metamodels/contao-frontend-editing": "^2.3@dev",
        "metamodels/core": "^2.3@dev",
        "metamodels/dropzone_file_upload": "^2.3@dev",
        "metamodels/filter_checkbox": "^2.3@dev",
        "metamodels/filter_fromto": "^2.3@dev",
        "metamodels/filter_perimetersearch": "^2.3@dev",
        "metamodels/filter_range": "^2.3@dev",
        "metamodels/filter_register": "^2.3@dev",
        "metamodels/filter_select": "^2.3@dev",
        "metamodels/filter_tags": "^2.3@dev",
        "metamodels/filter_text": "^2.3@dev",
        "omosde/contao-om-search": "^1.0",
        "php": "^8.1",
        "psi/news4ward_archive-menu": "*",
        "psi/news4ward_categories": "dev-master",
        "psi/news4ward_comments": "dev-master",
        "psi/news4ward_related": "dev-master",
        "psi/news4ward_tags": "dev-master",
        "rapid-data/captcha-bundle": "dev-master",
        "symfony/http-client": "*",
        "terminal42/contao-changelanguage": "^3.1",
        "terminal42/contao-countryselect": "^1.4",
        "terminal42/contao-leads": "^1.4",
        "terminal42/notification_center": "^1.5"
    },

"composer update --no-scripts" produces the same result.

Chris
  • 49
  • 4
  • 1
    Please share more details about the `composer.json`. Does it by any chance contain a `plugin` section where `php-http/discovery` is enabled? Then you are facing the bug reported at https://github.com/php-http/discovery/issues/213 – Nico Haase Feb 10 '23 at 13:10
  • 1
    Nice, thank you so much. It was the "php-http/discovery". I disabled it and it works now. – Chris Feb 10 '23 at 13:25
  • `composer --no-plugins update --no-scripts` -- use the `--no-plugins` global switch to disable plugins, the `--no-scripts` switch only prevents scripts from running, but not plugins. / X-Ref: https://stackoverflow.com/q/75414421/367456 – hakre Feb 11 '23 at 09:32

1 Answers1

1

Check your composer.json for any plugin configuration related to php-http/discovery. If the plugin for that package is enabled, and you are using v1.15.0 of that package, Composer might enter a loop on running the plugin. This is reported as a bug in their issue tracker

Steps to resolve this:

  • disable the plugin (set php-http/discovery: false in the allow-plugin section)
  • update the package to v1.15.1 where this bug is fixed
Nico Haase
  • 11,420
  • 35
  • 43
  • 69
  • 1
    If not disabling the plugin, additionally make sure you are on a recent composer >= 2.5.3 version. – Alex Feb 10 '23 at 17:01