Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot install with PHP 8.1 on a fresh Drupal 10 install #4344

Open
crtlf opened this issue Dec 6, 2022 · 5 comments
Open

Cannot install with PHP 8.1 on a fresh Drupal 10 install #4344

crtlf opened this issue Dec 6, 2022 · 5 comments

Comments

@crtlf
Copy link

crtlf commented Dec 6, 2022

Problem/Motivation

Error on composer installation - requirements problems.

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - drupal/console[v1.9.0, ..., 1.9.4] require php ^5.5.9 || ^7.0 -> your php version (8.1.2) does not satisfy that requirement.
    - drupal/console[1.9.5, ..., 1.9.10] require composer/installers ~1.0 -> found composer/installers[v1.0.0, ..., 1.x-dev] but it conflicts with your root composer.json require (^2.0).
    - Root composer.json requires drupal/console ^1.9 -> satisfiable by drupal/console[v1.9.0, ..., 1.9.10].

Details to include:

  • Drupal version : 10.0.0-rc2
  • PHP : 8.1.2

composer.json

{
    "name": "PROJECT_NAME",
    "description": "PROJECT_DESC",
    "type": "project",
    "license": "GPL-2.0-or-later",
    "repositories": [
        {
            "type": "composer",
            "url": "https://packages.drupal.org/8"
        }
    ],
    "require": {
        "composer/installers": "^2.0",
        "drupal/core-composer-scaffold": "^10.0",
        "drupal/core-recommended": "^10.0",
        "drush/drush": "^11.3",
        "vlucas/phpdotenv": "^5.5"
    },
    "conflict": {
        "drupal/drupal": "*"
    },
    "minimum-stability": "dev",
    "prefer-stable": true,
    "config": {
        "allow-plugins": {
            "composer/installers": true,
            "drupal/core-composer-scaffold": true,
            "phpstan/extension-installer": true,
            "dealerdirect/phpcodesniffer-composer-installer": true,
        },
        "sort-packages": true
    },
    "autoload": {
        "files": ["load.environment.php"]
    },
    "extra": {
        "drupal-scaffold": {
            "locations": {
                "web-root": "web/"
            }
        },
        "installer-paths": {
            "web/core": [
                "type:drupal-core"
            ],
            "web/libraries/{$name}": [
                "type:drupal-library"
            ],
            "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/profiles/custom/{$name}": [
                "type:drupal-custom-profile"
            ],
            "web/themes/custom/{$name}": [
                "type:drupal-custom-theme"
            ]
        }
    }
}

How to reproduce

composer require drupal/console
@faheemhameed
Copy link

We need the PHP 8.1 support as well.

Thanks for your great work!!

@LOBsTerr
Copy link
Member

I will take a look

@DmitrySidorenkoShim
Copy link

Hi @LOBsTerr,

Is it possible to resolve this issue in near future?
Sorry for pressure but I need to upgrade one project to Drupal 10 and PHP 8.1.
And this is the only module blocking this...

thanks in advance
best
Dimon

@crtlf
Copy link
Author

crtlf commented Jan 25, 2023

@DmitrySidorenkoShim

I understand this cannot be a solution, but if you are using Drupal Console essentially for generating controllers, modules, forms, etc... you can use the v11 of Drush that does the same.

https://www.drush.org/latest/commands/generate/

@DmitrySidorenkoShim
Copy link

@crtlf

thank you very much for the quick reply
and for the suggestion
yes, it make sense
I will try it
and I will remove "drupal/console" from project dependencies for now

I will still get notification if this issue will be resolved in future though

thanks
Dimon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants