Score:-2

phpstan error installing Upgrade Status module

ru flag

I'm on a freshly updates site running PHP 8.1.12. I followed the instructions on the module page. Worked fine till the final step when it failed.

  Problem 1
    - mglaman/phpstan-drupal[1.0.0, ..., 1.1.16] require phpstan/phpstan ^1.0 -> found phpstan/phpstan[1.0.0, ..., 1.9.x-dev] but these were not loaded, likely because it conflicts with another require.
    - mglaman/phpstan-drupal[1.1.17, ..., 1.1.20] require phpstan/phpstan ^1.7.0 -> found phpstan/phpstan[1.7.0, ..., 1.9.x-dev] but these were not loaded, likely because it conflicts with another require.
    - mglaman/phpstan-drupal[1.0.x-dev, ..., 1.1.25] require phpstan/phpstan ^1.6.0 -> found phpstan/phpstan[1.6.0, ..., 1.9.x-dev] but these were not loaded, likely because it conflicts with another require.
    - drupal/upgrade_status[3.18.0, ..., 3.x-dev] require mglaman/phpstan-drupal ^1.0.0 -> satisfiable by mglaman/phpstan-drupal[1.0.0, ..., 1.1.25].
    - Root composer.json requires drupal/upgrade_status ^3.18 -> satisfiable by drupal/upgrade_status[3.18.0, 3.x-dev].

I used these commands right off the module's page instructions:

composer show drupal/core | grep versions
composer require --dev drupal/core-dev:9.4.8 --update-with-all-dependencies
composer require drupal/upgrade_status --update-with-all-dependencies

There is nothing in my composer.json about upgrade_status or phpstan.Here is the complete file:

{
    "name": "drupal/recommended-project",
    "description": "Project template for Drupal 8 projects with a relocated document root",
    "type": "project",
    "license": "GPL-2.0-or-later",
    "homepage": "https://www.drupal.org/project/drupal",
    "support": {
        "docs": "https://www.drupal.org/docs/user_guide/en/index.html",
        "chat": "https://www.drupal.org/node/314178"
    },
    "repositories": {
        "drupal": {
            "type": "composer",
            "url": "https://packages.drupal.org/8"
        },
        "0": {
            "type": "vcs",
            "url": "https://github.com/mcaskill/composer-merge-plugin"
        },
        "1": {
            "type": "composer",
            "url": "https://packages.drupal.org/8"
        },
        "2": {
            "type": "composer",
            "url": "https://asset-packagist.org"
        },
        "3": {
            "type": "composer",
            "url": "https://packagist.org"
        }
    },
    "require": {
        "composer/installers": "^1.2",
        "drupal/admin_toolbar": "^3.2",
        "drupal/adminimal_theme": "^1.6",
        "drupal/anti_duplicates": "^3.1",
        "drupal/antibot": "^1.4",
        "drupal/blazy": "^2.0@RC",
        "drupal/block_class": "^1.1",
        "drupal/block_visibility_groups": "^1.3",
        "drupal/captcha": "^1.6",
        "drupal/composer_deploy": "^1.6",
        "drupal/computed_field": "^3.0@alpha",
        "drupal/config_update": "^1.6",
        "drupal/contact_block": "^1.4.0",
        "drupal/core": "^9",
        "drupal/core-composer-scaffold": "^9",
        "drupal/core-project-message": "^9",
        "drupal/core-recommended": "^9",
        "drupal/core-vendor-hardening": "^9",
        "drupal/ctools": "^3.2.0",
        "drupal/embed": "^1.3",
        "drupal/encrypt": "^3.0",
        "drupal/entity_browser": "^2.2.0",
        "drupal/entity_embed": "^1.0.0",
        "drupal/entity_reference_revisions": "^1.7",
        "drupal/features": "^3.8.0",
        "drupal/field_group": "^3.3",
        "drupal/field_permissions": "^1.2",
        "drupal/fivestar": "1.x-dev@dev",
        "drupal/flag": "^4.0",
        "drupal/honeypot": "^2.0",
        "drupal/image_url_formatter": "^1.0",
        "drupal/imce": "^2.2",
        "drupal/inline_entity_form": "^1.0.0-rc2",
        "drupal/metatag": "^1.11",
        "drupal/paragraphs": "^1.10.0",
        "drupal/pathauto": "^1.6.0",
        "drupal/profile": "^1.0.0",
        "drupal/real_aes": "^2.3",
        "drupal/recaptcha": "^3.0",
        "drupal/redirect": "^1.5",
        "drupal/schema_metatag": "^2.1",
        "drupal/simple_sitemap": "^3.6",
        "drupal/simplenews": "^2.0",
        "drupal/slick": "^2.0",
        "drupal/slick_extras": "^1.0.0-rc2",
        "drupal/slick_views": "^2.3",
        "drupal/social_media_links": "^2.6.0",
        "drupal/token": "^1.5.0",
        "drupal/tvi": "^1.0@RC",
        "drupal/twig_field_value": "^2.0",
        "drupal/views_bulk_edit": "^2.7",
        "drupal/views_bulk_operations": "^3.9",
        "drupal/views_infinite_scroll": "^1.6.0",
        "drupal/votingapi": "^3.0@beta",
        "drupal/webform": "^6.0",
        "drush/drush": "^10.0.0",
        "wikimedia/composer-merge-plugin": "dev-feature/composer-v2 as 1.5.0"
    },
    "require-dev": {
        "drupal/core-dev": "9.4.8",
        "kint-php/kint": "^4.2",
        "palantirnet/drupal-rector": "^0.11.4"
    },
    "conflict": {
        "drupal/drupal": "*"
    },
    "minimum-stability": "dev",
    "prefer-stable": true,
    "config": {
        "sort-packages": true,
        "allow-plugins": {
            "composer/installers": true,
            "drupal/core-composer-scaffold": true,
            "drupal/core-project-message": true,
            "drupal/core-vendor-hardening": true,
            "wikimedia/composer-merge-plugin": true,
            "dealerdirect/phpcodesniffer-composer-installer": true
        }
    },
    "extra": {
        "installer-types": [
            "npm-asset",
            "bower-asset"
        ],
        "drupal-scaffold": {
            "locations": {
                "web-root": "web/"
            }
        },
        "installer-paths": {
            "web/core": [
                "type:drupal-core"
            ],
            "web/libraries/{$name}": [
                "type:npm-asset",
                "type:bower-asset",
                "type:drupal-library",
                "bower-asset/bLazy",
                "bower-asset/jquery.easing",
                "npm-asset/slick-carousel"
            ],
            "web/modules/contrib/{$name}": [
                "type:drupal-module"
            ],
            "web/profiles/contrib/{$name}": [
                "type:drupal-profile"
            ],
            "web/themes/contrib/{$name}": [
                "type:drupal-theme"
            ],
            "drush/Commands/contrib/{$name}": [
                "type:drupal-drush"
            ],
            "web/modules/custom/{$name}": [
                "type:drupal-custom-module"
            ],
            "web/themes/custom/{$name}": [
                "type:drupal-custom-theme"
            ]
        },
        "drupal-core-project-message": {
            "include-keys": [
                "homepage",
                "support"
            ],
            "post-create-project-cmd-message": [
                "<bg=blue;fg=white>                                                         </>",
                "<bg=blue;fg=white>  Congratulations, you’ve installed the Drupal codebase  </>",
                "<bg=blue;fg=white>  from the drupal/recommended-project template!          </>",
                "<bg=blue;fg=white>                                                         </>",
                "",
                "<bg=yellow;fg=black>Next steps</>:",
                "  * Install the site: https://www.drupal.org/docs/8/install",
                "  * Read the user guide: https://www.drupal.org/docs/user_guide/en/index.html",
                "  * Get support: https://www.drupal.org/support",
                "  * Get involved with the Drupal community:",
                "      https://www.drupal.org/getting-involved",
                "  * Remove the plugin that prints this message:",
                "      composer remove drupal/core-project-message"
            ]
        },
        "merge-plugin": {
            "include": [
                "web/modules/contrib/webform/composer.libraries.json"
            ]
        }
    }
}
id flag
No. Add to the question exactly what you typed and add to the question an example composer.json file that exhibits the issue.
TomP avatar
ru flag
I just edited my question. I haven't installed this before so there isn't anything in the composer.json file.
id flag
So composer.json is an empty file?
TomP avatar
ru flag
I added it above
Score:1
id flag

The drupal-rector constraint is incompatible with the current version of upgrade_status. Try the following:

composer require --dev palantirnet/drupal-rector --with-all-dependencies
composer require drupal/upgrade_status --update-with-all-dependencies
TomP avatar
ru flag
That did the trick thanks. It installed but gives me an error at the top I'll have to figure out: "The PHP binary was not found. Scanning is not possible until this is resolved" Not very helpful, but I'll track it down. Thanks again.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.