Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [inny][DoctrineORM] InvalidArgumentException - Identifier "dispatcher" does not contain an object definition.
czychacz
post
Post #1





Grupa: Zarejestrowani
Postów: 189
Pomógł: 13
Dołączył: 20.09.2008
Skąd: Lublin

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


Próbuję przejść przez tutorial do Doctrine ORM z jego strony, ale mam problemy z adaptacją go do frameworka Silex.
src/bootstrap.php:
  1. <?php
  2.  
  3. use Doctrine\ORM\Tools\Setup;
  4. use Doctrine\ORM\EntityManager;
  5.  
  6. $isDevMode = true;
  7. $config = Setup::createAnnotationMetadataConfiguration(array(__DIR__), $isDevMode);
  8.  
  9. require_once __DIR__ . '/../config/dbconfig.php';
  10. $entityManager = EntityManager::create($dbConfig, $config);

src/cli_config.php:
  1. <?php
  2.  
  3. require_once 'bootstrap.php';
  4.  
  5. return \Doctrine\ORM\Tools\Console\ConsoleRunner::createHelperSet($entityManager);

config/dbconfig.php:
  1. <?php
  2.  
  3. $dbConfig = [
  4. 'driver' => 'pdo_mysql',
  5. 'host' => 'localhost',
  6. 'dbname' => '*',
  7. 'user' => '*',
  8. 'password' => '*',
  9. 'charset' => 'utf8mb4',
  10. 'port' => 3307,
  11. ];

Przy próbie wywołania
Cytat
src>..\vendor\bin\doctrine orm:schema-tool:create
dostaję
Cytat
[InvalidArgumentException] Identifier "dispatcher" does not contain an object definition.

Co tu uwaliłem, że to nie działa?

//Edit:
Do zamknięcia - pomogła zmiana sposobu konfiguracji na yaml
Go to the top of the page
+Quote Post

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: 20.08.2025 - 11:46