Symfony2, composer, your PHP version (5.6.18) overriden by “config.platform.php” version (5.3.9) does not satisfy requirement

后端 未结 3 1823
悲&欢浪女
悲&欢浪女 2021-02-03 20:16

I am trying to install doctrine to my project. I am getting the error about the wrong PHP version. What can be done to remove the real reason for this error? The way to overcome

3条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-03 20:24

    I use doctrine migrations with Symfony 2.7

    In my composer.json I have, I noticed you don't, you could try adding it

    "doctrine/doctrine-migrations-bundle": "^1.0"
    

    I manually installed migrations following Symfony2 docs, you can read it here.

    This is my whole 2.7 Symfony composer:

    "require": {
        "php": ">=5.3.9",
        "symfony/symfony": "2.7.*",
        "doctrine/orm": "~2.2,>=2.2.3,<2.5",
        "doctrine/dbal": "<2.5",
        "doctrine/doctrine-bundle": "~1.4",
        "symfony/assetic-bundle": "~2.3",
        "symfony/swiftmailer-bundle": "~2.3",
        "symfony/monolog-bundle": "~2.4",
        "sensio/distribution-bundle": "~4.0",
        "sensio/framework-extra-bundle": "~3.0,>=3.0.2",
        "incenteev/composer-parameter-handler": "~2.0",
        "friendsofsymfony/user-bundle": "1.3.*@dev",
        "ircmaxell/password-compat": "^1.0",
    
        "sonata-project/block-bundle": "2.3.*@dev",
        "sonata-project/easy-extends-bundle": "^2.1",
        "sonata-project/datagrid-bundle": "~2.2@dev",
        "sonata-project/admin-bundle": "~2.3@dev",
        "sonata-project/doctrine-orm-admin-bundle": "~2.3@dev",
        "sonata-project/user-bundle": "~2.3@dev",
        "doctrine/doctrine-migrations-bundle": "^1.0"
    
    },
    

提交回复
热议问题