Doctrine 2 orm:schema-tool:create giving Runtime Exception: Too many arguments

半腔热情 提交于 2019-12-11 16:15:06

问题


i am trying out the Doctrine 2 sandbox. downloaded the main Doctrine 2 ORM from http://github.com/doctrine/doctrine2 the dbal from http://github.com/doctrine/dbal and common from http://github.com/doctrine/common. placed the packages in approparate folders ...

D:\ResourceLibrary\Frameworks\Doctrine\lib\Doctrine\ORM
D:\ResourceLibrary\Frameworks\Doctrine\lib\vendor\doctrine-common\lib\Doctrine\Common
D:\ResourceLibrary\Frameworks\Doctrine\lib\vendor\doctrine-dbal\lib\Doctrine\DBAL

from the sandbox folder i tried to get the version to see if everything works ok ...

D:\ResourceLibrary\Frameworks\Doctrine\tools\sandbox>php doctrine.php -V
Doctrine Command Line Interface version 2.0.0BETA4-DEV

looks ok.

D:\ResourceLibrary\Frameworks\Doctrine\tools\sandbox>php doctrine.php orm:schema-tool:create ./Entities

  [RuntimeException]
  Too many arguments.

orm:schema-tool:create [--dump-sql] [-h|--help] [-q|--quiet] [-v|--verbose] [-V|--version] [-c|--color] [-n|--no-interaction] command

then fails ...

how can i fix this?


回答1:


This is a known problem with the tutorial. Try removing the ./Entities argument as suggested in the bug report: http://www.doctrine-project.org/jira/browse/DWEB-53?page=com.atlassian.jira.ext.fisheye%3Afisheye-issuepanel.




回答2:


Do:

php doctrine.php orm:schema-tool:create --dump-sql


For a running example of the Cookbook code that can be downloaded, see here.



来源:https://stackoverflow.com/questions/3270596/doctrine-2-ormschema-toolcreate-giving-runtime-exception-too-many-arguments

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!