orm:schema-tool:create not working
Closed this issue · 1 comments
tworzenieweb commented
Running the following cli command to build the schema ends up like this.
php bin/doctrine orm:schema-tool:create
PHP Warning: Missing argument 1 for Lw\Infrastructure\Persistence\Doctrine\EntityManagerFactory::build(), called in /home/tworzenieweb/projekty/last-wishes/cli-config.php on line 7 and defined in /home/tworzenieweb/projekty/last-wishes/src/Lw/Infrastructure/Persistence/Doctrine/EntityManagerFactory.php on line 13
PHP Stack trace:
PHP 1. {main}() /home/tworzenieweb/projekty/last-wishes/vendor/doctrine/orm/bin/doctrine:0
PHP 2. include() /home/tworzenieweb/projekty/last-wishes/vendor/doctrine/orm/bin/doctrine:4
PHP 3. require() /home/tworzenieweb/projekty/last-wishes/vendor/doctrine/orm/bin/doctrine.php:55
PHP 4. Lw\Infrastructure\Persistence\Doctrine\EntityManagerFactory->build() /home/tworzenieweb/projekty/last-wishes/cli-config.php:7
PHP Notice: Undefined variable: conn in /home/tworzenieweb/projekty/last-wishes/src/Lw/Infrastructure/Persistence/Doctrine/EntityManagerFactory.php on line 19
PHP Stack trace:
PHP 1. {main}() /home/tworzenieweb/projekty/last-wishes/vendor/doctrine/orm/bin/doctrine:0
PHP 2. include() /home/tworzenieweb/projekty/last-wishes/vendor/doctrine/orm/bin/doctrine:4
PHP 3. require() /home/tworzenieweb/projekty/last-wishes/vendor/doctrine/orm/bin/doctrine.php:55
PHP 4. Lw\Infrastructure\Persistence\Doctrine\EntityManagerFactory->build() /home/tworzenieweb/projekty/last-wishes/cli-config.php:7
PHP Fatal error: Uncaught exception 'InvalidArgumentException' with message 'Invalid argument: ' in /home/tworzenieweb/projekty/last-wishes/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php:847
Stack trace:
#0 /home/tworzenieweb/projekty/last-wishes/src/Lw/Infrastructure/Persistence/Doctrine/EntityManagerFactory.php(21): Doctrine\ORM\EntityManager::create(NULL, Object(Doctrine\ORM\Configuration))
#1 /home/tworzenieweb/projekty/last-wishes/cli-config.php(7): Lw\Infrastructure\Persistence\Doctrine\EntityManagerFactory->build()
#2 /home/tworzenieweb/projekty/last-wishes/vendor/doctrine/orm/bin/doctrine.php(55): require('/home/tworzenie...')
#3 /home/tworzenieweb/projekty/last-wishes/vendor/doctrine/orm/bin/doctrine(4): include('/home/tworzenie...')
#4 {main}
thrown in /home/tworzenieweb/projekty/last-wishes/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php on line 847
carlosbuenosvinos commented
I have fixed using the Application bootstraping. Thanks BTW