On Mon, Jun 7, 2010 at 12:47 PM, Eno <[email protected]> wrote:
> On Mon, 7 Jun 2010, Luis Alberto Zarrabeitia wrote:
>
>> How do I make tools like ./symfony guard:promote use the right DB
>> connection configuration?
>
> Im not familiar with that CLI task, but does it take any additional
> parameters allowing you to specify the connection? Maybe try the help
> command?

So, is it configured "per task"?  I imagined there was some kind of
config file... now that I think about it, it doesn't makes sense
either (one would have to update that one). Ok, that particular task
has a --env argument. But I imagined it would be something general to
all tasks, and not something that one task may or may not accept.

Btw, which "help" command are you referring to? "symfony help" doesn't
say much. The help for /that/ task, mentions --env (not that I knew
about it, thanks for the hint that it was task-specific instead of
symfony-wide), but my question was more generic (I used the
guard:promote example only because it was the latest I ran into). So
there doesn't seem to be a "help file" that answer the question "how
do I make tools like [some example] use the right DB connection
configuration?", thought there is one that answers "how do I make this
particular task use the right DB configuration?", which, of course,
solves it for that particular task.

>> Another somewhat related question. I also need to configure some
>> parameters differently, depending on whether I'm on the production
>> server or on the dev environment (some file paths, legacy php
>> libraries, mailer configuration, etc). Which would be the best place
>> to do it? (I assume that it would be a .yml file... which one, and how
>> do I access it?). the goal is to minimize the ammount of changes that
>> I must manually do after a project:deploy.
>
> Several ways to approach this:
>
> Set them programmatically in your project configuration (you can check if
> you are in dev or prod mode and change values as appropriate).
>
> You can also set them in app.yml.

Thank you. I'm going to try that.

> Or you can have two sets of configs (dev and prod) and copy the prod one
> over when deploying.

(that's kind of what I'm doing now).

> See symfony reference book:
> http://www.symfony-project.org/reference/1_4/en/

I've read it. Several times. The first one, before I chose to use
symfony. And also parts of the source code... but I didn't memorize
it, and it seems my google skills weren't good enough to find my
answer there. Could you provide me a more specific link?

Thank you again. You may have saved me a lot of future troubles.

Regards,

Luis.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to