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
In your composer.json, remove the following lines :
// ...
"config": {
"platform": {
"php": "5.3.9"
}
},
// ...
See platform config in composer.
Somewhere in your composer.json
you have
"config": {
"preferred-install": "dist",
"platform": {
"php": "5.3.9"
}
}
That block overrides your current PHP version as described in composer doc.
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"
},