Doctrine 2 orm:schema-tool:create giving Runtime E

2019-09-08 07:21发布

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?

标签: php doctrine
2条回答
兄弟一词,经得起流年.
2楼-- · 2019-09-08 07:40

Do:

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


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

查看更多
forever°为你锁心
3楼-- · 2019-09-08 07:47

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.

查看更多
登录 后发表回答