tags:

views:

34

answers:

2

i am trying to get started with Doctrine 2. and i am reading their intro. i am stuck trying to run

D:\Projects\Websites\php\Doctrine\sandbox>doskey doctrine=php d:\resourcelibrary\frameworks\doctrine\bin\doctrine.php $*

D:\Projects\Websites\php\Doctrine\sandbox>doctrine --version
Doctrine Command Line Interface version 2.0-DEV

// from here u can see that doctrine works ... i used doskey to shorten typing

D:\Projects\Websites\php\Doctrine\sandbox>doctrine orm:schema-tool:create ./entities

  [RuntimeException]
  Too many arguments.

orm:schema-tool:create [--dump-sql] [-h|--help] [-q|--quiet] [-v|--verbose] [-V|--version] [-a|--ansi] [-n|--no-interact
ion] command

D:\Projects\Websites\php\Doctrine\sandbox>

i thought this is more or less the exact same code as the tutorial?

UPDATE

i discovered that in the package download from http://www.doctrine-project.org/projects/orm/download the sand box dont even have the folders entities, yaml & xml folders! the one from SVN ... i think onlye had the DBAL package (i think, in Doctrine) and the rest in lib. the structure seems off ... thats really a unusable beta?

which beta download can i use to start learning Doctrine 2?

A: 

Did you read the note on that tutorial page?

The sandbox is only available via SVN or soon as a separate download on the downloads page.

I checked it out from http://svn.github.com/doctrine/doctrine2.git and it had the complete Sandbox environment.

BenV
i tried that but does it work for u? sandbox is ok there but lib has `Doctrine\ORM` only and `lib\vendor\doctrine-common` is empty
jiewmeng
jiewmeng
i think i must download `dbal` and `common` separately... but i still have the same too many arguments error
jiewmeng
+2  A: 

It's a better idea to download it using git, because that will allow you to get your dependencies (dbal and common).

git clone git://github.com/doctrine/doctrine2.git doctrine2-orm
cd doctrine2-orm
git submodule update --init

But the actual problem you are having is that you're passing an argument to orm:schema-tool:create where it doesn't want one. It looks like this behaviour was changed resulting in out-of-date documentation.

The following works for me:

cd tools/sandbox
./doctrine orm:schema-tool:create

Which outputs:

Creating database schema...
Database schema created successfully!
igorw
jiewmeng
Yes, I'm pretty sure it takes that information from cli-config.php now.
igorw