Fala Pessoal beleza? quebrei a cabeça por algum tempo até entender, e acertar as versões, meu projeto até a aula de "relacionamento OneToMany" ficou assim:
"require": {
"doctrine/orm": "^2.6",
"doctrine/migrations": "^2.0",
"symfony/cache": "^4.1"
},
"autoload": {
"psr-4": {
"Alura\\Doctrine\\": "src/"
}
}
}
desta forma migrations funciona... caso esteja com, outras verões devido a instalação via linha de comando se especificar a versão, ele geralmente instala a última, então poderá receber a seguinte mensagem no terminal o tentar rodar "composer require doctrine/migrations":
$ composer require "doctrine/migrations" Using version ^3.2 for doctrine/migrations ./composer.json has been updated Running composer update doctrine/migrations Loading composer repositories with package information Updating dependencies Your requirements could not be resolved to an installable set of packages.
Problem 1
- doctrine/migrations[3.2.0, ..., 3.2.1] require doctrine/dbal ^2.11 -> found doctrine/dbal[2.11.0, ..., 2.13.4] but the package is fixed to 3.1.3 (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.
- Root composer.json requires doctrine/migrations ^3.2 -> satisfiable by doctrine/migrations[3.2.0, 3.2.1].
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.***
( '-' )/