Как установить api-платформу в существующее приложение symfony 3.4 без flex? - PullRequest
0 голосов
/ 26 мая 2019

Я пытаюсь установить api-платформу в существующее приложение Symfony 3.4, которое устанавливается без flex.

Когда я пытаюсь установить его с composer require api-platform/core, произошла ошибка:

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 api-platform/core v2.4.3
    - Conclusion: don't install api-platform/core v2.4.2
    - Conclusion: don't install api-platform/core v2.4.1
    - Conclusion: remove symfony/symfony v3.4.21
    - Installation request for api-platform/core ^2.4 -> satisfiable by api-platform/core[v2.4.0, v2.4.1, v2.4.2, v2.4.3].
    - Conclusion: don't install symfony/symfony v3.4.21
    - api-platform/core v2.4.0 requires symfony/web-link ^4.1 -> satisfiable by symfony/web-link[v4.1.0, v4.1.1, v4.1.10, v4.1.11, v4.1.12, v4.1.2, v4.1.3, v4.1.4, v4.1.5, v4.1.6, v4.1.7, v4.1.8, v4.1.9, v4.2.0, v4.2.1, v4.2.2, v4.2.3, v4.2.4, v4.2.5, v4.2.6, v4.2.7, v4.2.8].
    - don't install symfony/web-link v4.1.0|don't install symfony/symfony v3.4.21
    - don't install symfony/web-link v4.1.1|don't install symfony/symfony v3.4.21
    - don't install symfony/web-link v4.1.10|don't install symfony/symfony v3.4.21
    - don't install symfony/web-link v4.1.11|don't install symfony/symfony v3.4.21
    - don't install symfony/web-link v4.1.12|don't install symfony/symfony v3.4.21
    - don't install symfony/web-link v4.1.2|don't install symfony/symfony v3.4.21
    - don't install symfony/web-link v4.1.3|don't install symfony/symfony v3.4.21
    - don't install symfony/web-link v4.1.4|don't install symfony/symfony v3.4.21
    - don't install symfony/web-link v4.1.5|don't install symfony/symfony v3.4.21
    - don't install symfony/web-link v4.1.6|don't install symfony/symfony v3.4.21
    - don't install symfony/web-link v4.1.7|don't install symfony/symfony v3.4.21
    - don't install symfony/web-link v4.1.8|don't install symfony/symfony v3.4.21
    - don't install symfony/web-link v4.1.9|don't install symfony/symfony v3.4.21
    - don't install symfony/web-link v4.2.0|don't install symfony/symfony v3.4.21
    - don't install symfony/web-link v4.2.1|don't install symfony/symfony v3.4.21
    - don't install symfony/web-link v4.2.2|don't install symfony/symfony v3.4.21
    - don't install symfony/web-link v4.2.3|don't install symfony/symfony v3.4.21
    - don't install symfony/web-link v4.2.4|don't install symfony/symfony v3.4.21
    - don't install symfony/web-link v4.2.5|don't install symfony/symfony v3.4.21
    - don't install symfony/web-link v4.2.6|don't install symfony/symfony v3.4.21
    - don't install symfony/web-link v4.2.7|don't install symfony/symfony v3.4.21
    - don't install symfony/web-link v4.2.8|don't install symfony/symfony v3.4.21
    - Installation request for symfony/symfony 3.4.21 -> satisfiable by symfony/symfony[v3.4.21].


Installation failed, reverting ./composer.json to its original content.

Это мои текущие требования композитора (и require-dev):

    "require": {
        "php": ">=7.2",
        "ext-curl": "*",
        "ext-exif": "*",
        "ext-json": "*",
        "accord/mandrill-swiftmailer-bundle": "^1.3",
        "beberlei/DoctrineExtensions": "^1.0",
        "braincrafted/bootstrap-bundle": "^2.2",
        "bukashk0zzz/hellosign-bundle": "^1.0",
        "callr/sdk-php": "^0.11.1",
        "doctrine/doctrine-bundle": "^1.6",
        "doctrine/doctrine-migrations-bundle": "^1.3",
        "doctrine/orm": "^2.5",
        "dopiaza/slack-exception-logger-bundle": "^2.0",
        "facebook/graph-sdk": "^5.6",
        "friendsofsymfony/oauth-server-bundle": "^1.6",
        "friendsofsymfony/rest-bundle": "^2.3",
        "friendsofsymfony/user-bundle": "2.0.*",
        "google/apiclient": "^2.2",
        "google/cloud-storage": "^1.10",
        "hpatoio/bitly-bundle": "^1.0",
        "incenteev/composer-parameter-handler": "^2.0",
        "jms/serializer-bundle": "^2.3",
        "knplabs/knp-paginator-bundle": "^2.7",
        "liip/imagine-bundle": "^1.9",
        "nelmio/api-doc-bundle": "^3.3",
        "nelmio/cors-bundle": "^1.5",
        "phobetor/rabbitmq-supervisor-bundle": "^3.1",
        "php-amqplib/rabbitmq-bundle": "^1.14",
        "predis/predis": "^1.1",
        "sensio/distribution-bundle": "^5.0.19",
        "sensio/framework-extra-bundle": "^5.0.0",
        "sentry/sentry-symfony": "^2.0",
        "snc/redis-bundle": "^2.0",
        "stof/doctrine-extensions-bundle": "^1.3",
        "symfony/assetic-bundle": "^2.8",
        "symfony/monolog-bundle": "^3.1.0",
        "symfony/polyfill-apcu": "^1.0",
        "symfony/swiftmailer-bundle": "^2.6.4",
        "symfony/symfony": "3.4.21",
        "twig/extensions": "^1.5",
        "twig/twig": "^1.0||^2.0"
    },
    "require-dev": {
        "brianium/paratest": "^1.1",
        "doctrine/doctrine-fixtures-bundle": "^3.0",
        "escapestudios/symfony2-coding-standard": "3.x-dev",
        "friendsofphp/php-cs-fixer": "^2.14",
        "liip/functional-test-bundle": "^1.9",
        "phpmd/phpmd": "^2.6",
        "phpunit/phpunit": "^6",
        "sensio/generator-bundle": "^3.1",
        "squizlabs/php_codesniffer": "*",
        "symfony/phpunit-bridge": "^4.0"
    },

Я не могу найти способ решить мою проблему, и ошибка композитора не совсем очевидна, поэтому я не понял, что мне не хватало.

1 Ответ

2 голосов
/ 26 мая 2019

Похоже, api-platform/core ^2.4 несовместимо с symfony/symfony v3.4.21, потому что для этого требуется symfony/web-link v4.1.0, и я уверен, что все ветки Symfony v4 предназначены для Symfony 4, попробуйте использовать api-platform/core v2.2, который, похоже, не имеетлюбые зависимости от любого строго ветки v4.https://github.com/api-platform/core/blob/2.2/composer.json

...