doctrine / dbal

Doctrine Database Abstraction Layer
https://www.doctrine-project.org/projects/dbal.html
MIT License
9.48k stars 1.34k forks source link

Not adding a dependency doctrine/dbal #3299

Closed gultyayev closed 6 years ago

gultyayev commented 6 years ago

I'm trying to add doctrine/dbal to an existing laravel project. Executing composer require doctrine/dbal results in error

Using version ^2.8 for doctrine/dbal
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Conclusion: don't install doctrine/dbal v2.8.0
    - Conclusion: don't install doctrine/dbal 2.9.x-dev
    - tcg/voyager v1.1.5 requires doctrine/dbal ~2.5.0|~2.6.0|~2.7.0 -> satisfiable by doctrine/dbal[2.5.x-dev, 2.6.x-dev, 2.7.x-dev].
    - tcg/voyager v1.1.5 requires doctrine/dbal ~2.5.0|~2.6.0|~2.7.0 -> satisfiable by doctrine/dbal[2.5.x-dev, 2.6.x-dev, 2.7.x-dev].
    - tcg/voyager v1.1.5 requires doctrine/dbal ~2.5.0|~2.6.0|~2.7.0 -> satisfiable by doctrine/dbal[2.5.x-dev, 2.6.x-dev, 2.7.x-dev].
    - Can only install one of: doctrine/dbal[2.8.x-dev, 2.5.x-dev].
    - Can only install one of: doctrine/dbal[2.8.x-dev, 2.6.x-dev].
    - Can only install one of: doctrine/dbal[2.8.x-dev, 2.7.x-dev].
    - Installation request for doctrine/dbal ^2.8 -> satisfiable by doctrine/dbal[2.8.x-dev, 2.9.x-dev, v2.8.0].
    - Installation request for tcg/voyager (locked at v1.1.5, required as ^1.1) -> satisfiable by tcg/voyager[v1.1.5].

Installation failed, reverting ./composer.json to its original content.
morozov commented 6 years ago

@gultyaev why are you filing it here if it conflicts with Laravel? Doesn't Laravel have its own requirements for doctrine/dbal?

gultyayev commented 6 years ago

I don't think so. They've written that one should install doctrine/dbal via composer require doctrine/dbal. Nothing more nothing less

morozov commented 6 years ago

Could you provide your composer.json or at least the fragment which causes the conflict?

gultyayev commented 6 years ago

I wish I knew what causes the conflict as you say.

    "name": "laravel/laravel",
    "description": "The Laravel Framework.",
    "keywords": [
        "framework",
        "laravel"
    ],
    "license": "MIT",
    "type": "project",
    "require": {
        "php": "^7.1.3",
        "fideloper/proxy": "^4.0",
        "laravel/framework": "5.7.*",
        "laravel/tinker": "^1.0",
        "tcg/voyager": "^1.1"
    },
    "require-dev": {
        "beyondcode/laravel-dump-server": "^1.0",
        "filp/whoops": "^2.0",
        "fzaninotto/faker": "^1.4",
        "mockery/mockery": "^1.0",
        "nunomaduro/collision": "^2.0",
        "phpunit/phpunit": "^7.0"
    },
    "autoload": {
        "classmap": [
            "database/seeds",
            "database/factories"
        ],
        "psr-4": {
            "App\\": "app/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\\": "tests/"
        }
    },
    "extra": {
        "laravel": {
            "dont-discover": []
        }
    },
    "scripts": {
        "post-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "@php artisan key:generate"
        ],
        "post-autoload-dump": [
            "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
            "@php artisan package:discover"
        ]
    },
    "config": {
        "preferred-install": "dist",
        "sort-packages": true,
        "optimize-autoloader": true
    },
    "minimum-stability": "dev",
    "prefer-stable": true,
    "repositories": {
        "hooks": {
            "type": "composer",
            "url": "https://larapack.io"
        }
    }
}
Majkl578 commented 6 years ago

As you can see from the composer error:

tcg/voyager v1.1.5 requires doctrine/dbal ~2.5.0|~2.6.0|~2.7.0

tcg/voyager package requires DBAL 2.5-2.7, thus installation of DBAL 2.8 is blocked.

Closing, not a DBAL issue - needs to be reported to tcg/voyager.

github-actions[bot] commented 2 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.