我使用ZF3和Doctrine,当我执行command./vendor/bin/doctrine
来查看可能的命令时,我得到这个错误:
您缺少项目中的“cli-config.php”或“config / cli-config.php”文件,这是使Doctrine控制台正常工作所必需的。您可以使用以下示例作为模板:
<?php use Doctrine\ORM\Tools\Console\ConsoleRunner; // replace with file to your own project bootstrap require_once 'bootstrap.php'; // replace with mechanism to retrieve EntityManager in your app $entityManager = GetEntityManager(); return ConsoleRunner::createHelperSet($entityManager);
有谁知道如何解决这个问题?
请改用./vendor/bin/doctrine-module
。
您正在使用的命令是在您不使用Doctrine作为ZF3 MODULE时,而是在您的普通PHP项目中使用的工具。
与使用php bin/console doctrine:*
和Symfony一样。