Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [SF2][Symfony] - ładowanie danych do tabel za pomocą doctrine, wyjątek z błędem w konsoli Ubuntu
damianooo
post
Post #1





Grupa: Zarejestrowani
Postów: 496
Pomógł: 2
Dołączył: 15.07.2011
Skąd: Katowice

Ostrzeżenie: (0%)
-----


Witam,

Korzystam z wersji Symfony 2.1 na Ubuntu 14.04 .
Pobrałem swój stary projekt z Githuba, pobrałem również aktualne wersje bibliotek composerem.
Bazę danych utworzyłem, tabele również za pomocą polecenia:

  1. php app/console doctrine:schema:create


Próbuję teraz wykonać następujące polecenie w konsoli, które pozwoli załadować dane do tabel bazy danych :

  1. php app/console doctrine:fixtures:load


Niestety wyświetla mi się poniższy błąd:

  1. [ErrorException]
  2. Catchable Fatal Error: Argument 1 passed to Doctrine\Common\DataFixtures\Purger\ORMPurger::__construct() must be an
  3. instance of Doctrine\ORM\EntityManagerInterface, instance of EntityManager5524f5e6ae114_546a8d27f194334ee012bfe64f62
  4. 9947b07e4919\__CG__\Doctrine\ORM\EntityManager given, called in /var/www/ligatyperow/vendor/doctrine/doctrine-fixtur
  5. es-bundle/Doctrine/Bundle/FixturesBundle/Command/LoadDataFixturesDoctrineCommand.php on line 100 and defined in /var
  6. /www/ligatyperow/vendor/doctrine/data-fixtures/lib/Doctrine/Common/DataFixtures/Purger/ORMPurger.php line 53




ok , problem wydaje się rozwiązany ...

okazało się że w pliku composer.json miałem tak:
  1. "doctrine/data-fixtures": "dev-master",
  2. "doctrine/doctrine-fixtures-bundle": "dev-master",


należało usunąc linijkę:
  1. "doctrine/data-fixtures": "dev-master",


przy robieniu upadte bibliotek composerem pojawiał się poniższy komunikat:
  1. Your requirements could not be resolved to an installable set of packages.
  2.  
  3. Problem 1
  4. - Conclusion: remove doctrine/orm v2.3.6
  5. - Conclusion: don't install doctrine/orm v2.3.6
  6. - Conclusion: don't install doctrine/orm 2.3.5
  7. - Conclusion: don't install doctrine/orm 2.3.4
  8. - Conclusion: don't install doctrine/orm 2.3.3
  9. - Conclusion: don't install doctrine/orm 2.3.2
  10. - Conclusion: don't install doctrine/orm 2.3.1
  11. - Conclusion: don't install doctrine/orm 2.3.0
  12. - doctrine/orm 2.2.3 conflicts with doctrine/data-fixtures[dev-master].
  13. - doctrine/orm 2.2.3 conflicts with doctrine/data-fixtures[dev-master].
  14. - Installation request for doctrine/orm >=2.2.3,<2.4-dev -> satisfiable by doctrine/orm[2.2.3, 2.3.0, 2.3.1, 2.3.2, 2.3.3, 2.3.4, 2.3.5, v2.3.6].
  15. - Installation request for doctrine/data-fixtures dev-master -> satisfiable by doctrine/data-fixtures[dev-master].



po zmianie zrobiłem update bibliotek i wykonałe załadowanie danych do bazy bez problemu poleceniem

  1. php app/console doctrine:schema:create




Temat do zamknięcia.

Pozdrawiam



Ten post edytował damianooo 9.04.2015, 08:52:59
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 15.10.2025 - 17:00