Lukesoft
Lukesoft

Reputation: 953

Propel model:build gives dos not creating model files with no notices or errors

Iam trying to generate model files using Propel ORM. I went through all the steps of installation using Composer. Then in Terminal i executed

admins-MacBook-Pro-2:~ nick$ cd testproject
admins-MacBook-Pro-2:testproject nick$ vendor/bin/propel

and i get the version details easily, but funny enough this only works the first time. After i close off my terminal and try to execute the commands above, terminal simply moves on to the command input prompt and nothing happens. And to make things even weirder for me (as a beginner to Propel), at this point any junk i pass as parameters to propel will have the same effect of not producing any response and asking for the next command to execute (as if the first one was successful).

Soo I get

 admins-MacBook-Pro-2:testproject nick$ vendor/bin/propel
 admins-MacBook-Pro-2:testproject nick$ _

even if i pass in junk data i get

admins-MacBook-Pro-2:testproject nick$ vendor/bin/propel junk
admins-MacBook-Pro-2:testproject nick$ _

Hence

admins-MacBook-Pro-2:testproject nick$ vendor/bin/propel model:build
admins-MacBook-Pro-2:testproject nick$ _

Directory Structure

-testproject(Folder)
 - composer.json
 - composer.lock
 - index.php
 - **propel.php**
 - **schema.xml**(generated by propel it self using reverse)
 - vendor(Folder)

Also not I am on a Mac and i had exactly the same problem yesterday on Windows Command Prompt. Searched all over for this and seems like Propel has close to NO Tutorials on we (obviously except the documentation which i went through over and over to make sure i did not miss something);

And Propel Community seems so small, should i just drop it for an ORM with a bigger community.

Upvotes: 0

Views: 652

Answers (2)

kripple
kripple

Reputation: 161

The verbosity option is your friend.

First off export your path so you only need to type propel

export PATH=$PATH:~/where/ever/you/installed/propel/bin/propel

Throw that in your .bash_rc to keep it persistent. Now let's try:

propel model:build --verbose

Don't forget to convert config. you can read the rest in the dox

Upvotes: 1

SCIF
SCIF

Reputation: 41

The most seems like your binary is just not executed. Try to execute explicitly:

php vendor/bin/propel

Upvotes: 0

Related Questions