doctrine / migrations

Doctrine Database Migrations Library
https://www.doctrine-project.org/projects/migrations.html
MIT License
4.68k stars 387 forks source link

PHP 8.1 + SF6 Cannot Install; composer cannot resolve set of packages #1219

Closed signmeuptwice closed 2 years ago

signmeuptwice commented 2 years ago

| Version | not installed yet

Support Question

I tried all version including composer require doctrine/migrations:3.4.x-dev and still cannot install the bundle

I am posting here because I can't believe symfony 6 would ship without this package ? there must be a bug ?

error message with current

Problem 1
  - friendsofphp/proxy-manager-lts[v1.0.4, ..., v1.0.5] require laminas/laminas-code ~3.4.1|^4.0 -> satisfiable by laminas/laminas-code[3.4.1, 4.0.0, ..., 4.4.3].
  - doctrine/doctrine-migrations-bundle[3.0.0, ..., 3.0.1] require php ^7.2 -> your php version (8.1.0) does not satisfy that requirement.
  - doctrine/doctrine-migrations-bundle[3.0.2, ..., 3.2.0] require symfony/framework-bundle ~3.4|~4.0|~5.0 -> found symfony/framework-bundle[v3.4.0, ..., v3.4.47, v4.0.0, ..., v4.4.34, v5.0.0, ..., v5.4.0] but it conflicts with your root composer.json require (6.0.*).
  - laminas/laminas-code 3.4.1 requires php ^7.1 -> your php version (8.1.0) does not satisfy that requirement.
  - laminas/laminas-code[4.0.0, ..., 4.4.3] require php ^7.4 || ~8.0.0 -> your php version (8.1.0) does not satisfy that requirement.
  - friendsofphp/proxy-manager-lts[v1.0.0, ..., v1.0.3] require symfony/filesystem ^4.4.17|^5.0 -> found symfony/filesystem[v4.4.17, ..., v4.4.27, v5.0.0, ..., v5.4.0] but the package is fixed to v6.0.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
  - doctrine/migrations[3.2.0, ..., 3.2.2] require doctrine/dbal ^2.11 -> found doctrine/dbal[2.11.0, ..., 2.13.6] but the package is fixed to 3.2.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
  - doctrine/migrations 3.3.0 requires symfony/console ^3.4 || ^4.4.16 || ^5.0 -> found symfony/console[v3.4.0, ..., v3.4.47, v4.4.16, ..., v4.4.34, v5.0.0, ..., v5.4.0] but it conflicts with your root composer.json require (6.0.*).
  - doctrine/doctrine-migrations-bundle 3.2.1 requires doctrine/migrations ^3.2 -> satisfiable by doctrine/migrations[3.2.0, ..., 3.3.2].
  - doctrine/migrations[3.3.1, ..., 3.3.2] require friendsofphp/proxy-manager-lts ^1.0 -> satisfiable by friendsofphp/proxy-manager-lts[v1.0.0, ..., v1.0.5].
  - Root composer.json requires doctrine/doctrine-migrations-bundle ^3.0 -> satisfiable by doctrine/doctrine-migrations-bundle[3.0.0, ..., 3.2.1].
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

error message with composer require doctrine/migrations:3.4.x-dev

  Problem 1
    - laminas/laminas-code 3.4.1 requires php ^7.1 -> your php version (8.1.0) does not satisfy that requirement.
    - laminas/laminas-code[4.0.0, ..., 4.4.3] require php ^7.4 || ~8.0.0 -> your php version (8.1.0) does not satisfy that requirement.
    - friendsofphp/proxy-manager-lts[v1.0.0, ..., v1.0.3] require symfony/filesystem ^4.4.17|^5.0 -> found symfony/filesystem[v4.4.17, ..., v4.4.27, v5.0.0, ..., v5.4.0] but these were not loaded, likely because it conflicts with another require.
    - doctrine/migrations 3.4.x-dev requires friendsofphp/proxy-manager-lts ^1.0 -> satisfiable by friendsofphp/proxy-manager-lts[v1.0.0, ..., v1.0.5].
    - friendsofphp/proxy-manager-lts[v1.0.4, ..., v1.0.5] require laminas/laminas-code ~3.4.1|^4.0 -> satisfiable by laminas/laminas-code[3.4.1, 4.0.0, ..., 4.4.3].
    - Root composer.json requires doctrine/migrations 3.4.x-dev -> satisfiable by doctrine/migrations[3.4.x-dev].

my composer.json

{
    "type": "project",
    "license": "proprietary",
    "minimum-stability": "stable",
    "prefer-stable": true,
    "require": {
        "php": ">=8.1.0",
        "ext-ctype": "*",
        "ext-fileinfo": "*",
        "ext-gd": "*",
        "ext-iconv": "*",
        "ext-imagick": "^3.6",
        "ext-json": "*",
        "ext-openssl": "*",
        "doctrine/doctrine-bundle": "^2.5",
        "doctrine/orm": "^2.10",
        "jms/serializer-bundle": "^4.0",
        "knplabs/knp-paginator-bundle": "^5.8",
        "symfony/asset": "6.0.*",
        "symfony/cache": "6.0.*",
        "symfony/config": "6.0.*",
        "symfony/console": "6.0.*",
        "symfony/dependency-injection": "6.0.*",
        "symfony/dotenv": "6.0.*",
        "symfony/flex": "^2",
        "symfony/framework-bundle": "6.0.*",
        "symfony/mailer": "6.0.*",
        "symfony/mime": "6.0.*",
        "symfony/runtime": "6.0.*",
        "symfony/twig-bundle": "6.0.*",
        "symfony/validator": "6.0.*",
        "symfony/web-profiler-bundle": "6.0.*",
        "symfony/yaml": "6.0.*"
    },
    "require-dev": {
        "symfony/maker-bundle": "^1.36",
        "symfony/var-dumper": "6.0.*"
    },
    "config": {
        "optimize-autoloader": true,
        "preferred-install": {
            "*": "dist"
        },
        "sort-packages": true
    },
    "autoload": {
        "psr-4": {
            "App\\": "src/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "App\\Tests\\": "tests/"
        }
    },
    "replace": {
        "symfony/polyfill-ctype": "*",
        "symfony/polyfill-iconv": "*",
        "symfony/polyfill-php72": "*",
        "symfony/polyfill-php73": "*",
        "symfony/polyfill-php74": "*",
        "symfony/polyfill-php80": "*"
    },
    "scripts": {
        "auto-scripts": {
            "cache:clear": "symfony-cmd",
            "assets:install %PUBLIC_DIR%": "symfony-cmd"
        },
        "post-install-cmd": [
            "@auto-scripts"
        ],
        "post-update-cmd": [
            "@auto-scripts"
        ]
    },
    "conflict": {
        "symfony/symfony": "*"
    },
    "extra": {
        "symfony": {
            "allow-contrib": false,
            "require": "6.0.*"
        }
    }
}
signmeuptwice commented 2 years ago

resolved with alias

    "laminas/laminas-code": "4.5.x-dev as 4.5.0",