Solucionado (ver solução)
Solucionado
(ver solução)
8
respostas

Não consigo instalar orm-fixtures

Eu executo o comando: composer require orm-fixtures mas recebo uma mensagem de erro: Your requirements could not be resolved to an installable set of packages. um log enorme e no fim a mensagem: Installation request for doctrine/doctrine-fixtures-bundle ^3.3 -> satisfiable by doctrine/doctrine-fixtures-bundle[3.3.0, 3.3.1, 3.3.2]. Como eu resolvo?

8 respostas

Rodolfo, posta todo o "log enorme", por favor?

 Problem 1
    - doctrine/doctrine-fixtures-bundle 3.3.2 requires symfony/console ^3.4|^4.3|^5.0 -> satisfiable by symfony/console[3.4.x-dev, 4.3.x-dev, 4.4.x-dev,
 5.0.x-dev, 5.1.x-dev, 5.x-dev, v3.4.0, v3.4.0-BETA1, v3.4.0-BETA2, v3.4.0-BETA3, v3.4.0-BETA4, v3.4.0-RC1, v3.4.0-RC2, v3.4.1, v3.4.10, v3.4.11, v3.4.1
2, v3.4.13, v3.4.14, v3.4.15, v3.4.16, v3.4.17, v3.4.18, v3.4.19, v3.4.2, v3.4.20, v3.4.21, v3.4.22, v3.4.23, v3.4.24, v3.4.25, v3.4.26, v3.4.27, v3.4.2
8, v3.4.29, v3.4.3, v3.4.30, v3.4.31, v3.4.32, v3.4.33, v3.4.34, v3.4.35, v3.4.36, v3.4.37, v3.4.38, v3.4.39, v3.4.4, v3.4.40, v3.4.41, v3.4.42, v3.4.43
, v3.4.44, v3.4.45, v3.4.46, v3.4.5, v3.4.6, v3.4.7, v3.4.8, v3.4.9, v4.3.0, v4.3.0-BETA1, v4.3.0-BETA2, v4.3.0-RC1, v4.3.1, v4.3.10, v4.3.11, v4.3.2, v
4.3.3, v4.3.4, v4.3.5, v4.3.6, v4.3.7, v4.3.8, v4.3.9, v4.4.0, v4.4.0-BETA1, v4.4.0-BETA2, v4.4.0-RC1, v4.4.1, v4.4.10, v4.4.11, v4.4.12, v4.4.13, v4.4.
14, v4.4.15, v4.4.16, v4.4.2, v4.4.3, v4.4.4, v4.4.5, v4.4.6, v4.4.7, v4.4.8, v4.4.9, v5.0.0, v5.0.0-BETA1, v5.0.0-BETA2, v5.0.0-RC1, v5.0.1, v5.0.10, v
5.0.11, v5.0.2, v5.0.3, v5.0.4, v5.0.5, v5.0.6, v5.0.7, v5.0.8, v5.0.9, v5.1.0, v5.1.0-BETA1, v5.1.0-RC1, v5.1.0-RC2, v5.1.1, v5.1.2, v5.1.3, v5.1.4, v5
.1.5, v5.1.6, v5.1.7, v5.1.8, v5.2.0-BETA1, v5.2.0-BETA2, v5.2.0-BETA3] but these conflict with your requirements or minimum-stability.
    - doctrine/doctrine-fixtures-bundle 3.3.1 requires symfony/console ^3.4|^4.3|^5.0 -> satisfiable by symfony/console[3.4.x-dev, 4.3.x-dev, 4.4.x-dev,
 5.0.x-dev, 5.1.x-dev, 5.x-dev, v3.4.0, v3.4.0-BETA1, v3.4.0-BETA2, v3.4.0-BETA3, v3.4.0-BETA4, v3.4.0-RC1, v3.4.0-RC2, v3.4.1, v3.4.10, v3.4.11, v3.4.1
2, v3.4.13, v3.4.14, v3.4.15, v3.4.16, v3.4.17, v3.4.18, v3.4.19, v3.4.2, v3.4.20, v3.4.21, v3.4.22, v3.4.23, v3.4.24, v3.4.25, v3.4.26, v3.4.27, v3.4.2
8, v3.4.29, v3.4.3, v3.4.30, v3.4.31, v3.4.32, v3.4.33, v3.4.34, v3.4.35, v3.4.36, v3.4.37, v3.4.38, v3.4.39, v3.4.4, v3.4.40, v3.4.41, v3.4.42, v3.4.43
, v3.4.44, v3.4.45, v3.4.46, v3.4.5, v3.4.6, v3.4.7, v3.4.8, v3.4.9, v4.3.0, v4.3.0-BETA1, v4.3.0-BETA2, v4.3.0-RC1, v4.3.1, v4.3.10, v4.3.11, v4.3.2, v
4.3.3, v4.3.4, v4.3.5, v4.3.6, v4.3.7, v4.3.8, v4.3.9, v4.4.0, v4.4.0-BETA1, v4.4.0-BETA2, v4.4.0-RC1, v4.4.1, v4.4.10, v4.4.11, v4.4.12, v4.4.13, v4.4.
14, v4.4.15, v4.4.16, v4.4.2, v4.4.3, v4.4.4, v4.4.5, v4.4.6, v4.4.7, v4.4.8, v4.4.9, v5.0.0, v5.0.0-BETA1, v5.0.0-BETA2, v5.0.0-RC1, v5.0.1, v5.0.10, v
5.0.11, v5.0.2, v5.0.3, v5.0.4, v5.0.5, v5.0.6, v5.0.7, v5.0.8, v5.0.9, v5.1.0, v5.1.0-BETA1, v5.1.0-RC1, v5.1.0-RC2, v5.1.1, v5.1.2, v5.1.3, v5.1.4, v5
.1.5, v5.1.6, v5.1.7, v5.1.8, v5.2.0-BETA1, v5.2.0-BETA2, v5.2.0-BETA3] but these conflict with your requirements or minimum-stability.
    - doctrine/doctrine-fixtures-bundle 3.3.0 requires symfony/console ^3.4|^4.3|^5.0 -> satisfiable by symfony/console[3.4.x-dev, 4.3.x-dev, 4.4.x-dev,
 5.0.x-dev, 5.1.x-dev, 5.x-dev, v3.4.0, v3.4.0-BETA1, v3.4.0-BETA2, v3.4.0-BETA3, v3.4.0-BETA4, v3.4.0-RC1, v3.4.0-RC2, v3.4.1, v3.4.10, v3.4.11, v3.4.1
2, v3.4.13, v3.4.14, v3.4.15, v3.4.16, v3.4.17, v3.4.18, v3.4.19, v3.4.2, v3.4.20, v3.4.21, v3.4.22, v3.4.23, v3.4.24, v3.4.25, v3.4.26, v3.4.27, v3.4.2
8, v3.4.29, v3.4.3, v3.4.30, v3.4.31, v3.4.32, v3.4.33, v3.4.34, v3.4.35, v3.4.36, v3.4.37, v3.4.38, v3.4.39, v3.4.4, v3.4.40, v3.4.41, v3.4.42, v3.4.43
, v3.4.44, v3.4.45, v3.4.46, v3.4.5, v3.4.6, v3.4.7, v3.4.8, v3.4.9, v4.3.0, v4.3.0-BETA1, v4.3.0-BETA2, v4.3.0-RC1, v4.3.1, v4.3.10, v4.3.11, v4.3.2, v
4.3.3, v4.3.4, v4.3.5, v4.3.6, v4.3.7, v4.3.8, v4.3.9, v4.4.0, v4.4.0-BETA1, v4.4.0-BETA2, v4.4.0-RC1, v4.4.1, v4.4.10, v4.4.11, v4.4.12, v4.4.13, v4.4.
14, v4.4.15, v4.4.16, v4.4.2, v4.4.3, v4.4.4, v4.4.5, v4.4.6, v4.4.7, v4.4.8, v4.4.9, v5.0.0, v5.0.0-BETA1, v5.0.0-BETA2, v5.0.0-RC1, v5.0.1, v5.0.10, v
5.0.11, v5.0.2, v5.0.3, v5.0.4, v5.0.5, v5.0.6, v5.0.7, v5.0.8, v5.0.9, v5.1.0, v5.1.0-BETA1, v5.1.0-RC1, v5.1.0-RC2, v5.1.1, v5.1.2, v5.1.3, v5.1.4, v5
.1.5, v5.1.6, v5.1.7, v5.1.8, v5.2.0-BETA1, v5.2.0-BETA2, v5.2.0-BETA3] but these conflict with your requirements or minimum-stability.
    - Installation request for doctrine/doctrine-fixtures-bundle ^3.3 -> satisfiable by doctrine/doctrine-fixtures-bundle[3.3.0, 3.3.1, 3.3.2].


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

Aproveitando baixei o projeto da aula 6 em outra máquina e novamente parei na mesma etapa: Ao executar o composer require orm-fixtures: apresentou o erro. Abaixo

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - doctrine/doctrine-fixtures-bundle[3.3.0, ..., 3.3.2] require symfony/config ^3.4|^4.3|^5.0 -> found symfony/config[v3.4.0, ..., v3.4.46, v4.3.0, ..., v4.4.16, v5.0.0, ..., v5.1.8] but the package is fixed to v4.2.12 (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/doctrine-fixtures-bundle ^3.3 -> satisfiable by doctrine/doctrine-fixtures-bundle[3.3.0, 3.3.1, 3.3.2].

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.


Acho que a solução de um servirá para o outro

Tentou fazer um composer update?

Tentei após a atualização tentei novamente o comando :composer require orm-fixtures mas obtive outro erro.

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - doctrine/doctrine-fixtures-bundle 3.3.2 requires symfony/console ^3.4|^4.3|^5.0 -> no matching package found.
    - doctrine/doctrine-fixtures-bundle 3.3.1 requires symfony/console ^3.4|^4.3|^5.0 -> no matching package found.
    - doctrine/doctrine-fixtures-bundle 3.3.0 requires symfony/console ^3.4|^4.3|^5.0 -> no matching package found.
    - Installation request for doctrine/doctrine-fixtures-bundle ^3.3 -> satisfiable by doctrine/doctrine-fixtures-bundle[3.3.0, 3.3.1, 3.3.2].

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
 - It's a private package and you forgot to add a custom repository to find it

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

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

Consegui resolver o problema da instalação do Fixture mas arrumei outro hahaha. Para pode atualizar tive que retirar a limitação de versão no composer.Jason. Antes estava com ^4.2* troquei para ^4.2. e executei o composer update. No especialidade.repository tu fez uso do RegistryInterface com a atualização essa interface deve ter sido substituída por outra. Ele aconselha trocar pelo Manager interface. Vou postar abaixo a mensagem de erro:

Symfony operations: 1 recipe (846c57924cb0e9ac9e246624be7c1b80)
  - Configuring doctrine/doctrine-fixtures-bundle (>=3.0): From github.com/symfony/recipes:master
Executing script cache:clear [KO]
 [KO]
Script cache:clear returned with error code 1
!!
!!  In DefinitionErrorExceptionPass.php line 54:
!!  

!!    Cannot autowire service "App\Repository\EspecialidadeRepository": argument "$registry" of method "__construct()" references interface "Symfony\Bridge\Doctrin
e
!!    \RegistryInterface" but no such service exists. Try changing the type-hint to "Doctrine\Persistence\ManagerRegistry" instead.

!!  

!!
!!
Script @auto-scripts was called via post-update-cmd

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

No Php storm a classe aparece riscada com a mensagem: References Doctrine connections and entity managers. Deprecated: since Symfony 4.4, use Doctrine\Persistence\ManagerRegistry instead

solução!

Fiz a substituição da classe RegistryInterface pela ManagerRegistry ( do tipo interface: \Doctrine\Persistence\ManagerRegistry) e a priori parece cumprir a mesma função sem perda. fiz a substituição em Medicos.Repository e em Especialidades.Repository. Tem mais algum lugar pra verificar ou teste pra verificar se está tudo certo?

Rodolfo, que eu me lembre (já tem bastante tempo que gravei esse treinamento) nós fizemos somente estes 2 repositórios sim. Em qualquer outro lugar que precisarmos do RegistryInterface, é só usar o ManagerRegistry e deve dar tudo certo. :-D