Hi there

I recently wrote an article on how to achieve exactly what you are
after:

http://ezzatron.com/2010/06/10/per-environment-fixtures-in-symfony/

Hope this helps :)


Erin

On May 7, 6:05 pm, Dong YANG <jojoyangd...@gmail.com> wrote:
> Okay,  i see, thanks again and have a good week-end :)
>
> JoJo
>
> 2010/5/7 Pietrino Atzeni <pietrino.atz...@gmail.com>
>
>
>
> > Yes, it not environment dependent. Just to make it a little more clear,
> > note that it's best to define a different directory for production data,
> > with
>
> > --dir=data/prod-fixtures
>
> > since fixtures are loaded recursively.
>
> > You can use the same idea when modifying the db: you can create ad hoc
> > migrations, and prepopulate the new fields using something like:
>
> > --dir=data/migration-fixtures/015
>
> > Hope this helps
> > Pietro
>
> >       Thanks for your reply.
>
> >>      I think that using a custom fixture directory is the only
> >> solution, because fixture yaml itself is not environment-aware, isn't it?
>
> >>      Please correct me if I'm wrong.
>
> >>      Thanks and Regards,
>
> >> JoJo
>
> >>              I would like to know the best way to define fixtures by
> >>        environment.
>
> >>              For example, I need some *basic fixtures *for dev/test/prod
> >>        environment, and some *data fixtures *only for dev and test
> >>        environment.
> >>        So when Prod environment, I just load basic fixtures.
>
> >>              I think that this could be done by defined a custom fixture
> >>        directory, and launch the data-load with option --*dir*, but is
> >> this
> >>        only way to do this or there is better solution?
>
> >>              Any suggestion is welcomed.
>
> >>              Thanks and Regards,
>
> >>        JoJo
>
> >>    Yes, you can use that option --dir, or you can define a task that
> >>    makes all your deployment to the test/prod environments: rsync, set
> >>    permissions, migrate db, load fixtures.
>
> >>    Hope this helps,
> >>    Pietro
>
> > --
> > 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 symfony-users@googlegroups.com
> > To unsubscribe from this group, send email to
> > symfony-users+unsubscr...@googlegroups.com<symfony-users%2bunsubscr...@googlegroups.com>
> > For more options, visit this group at
> >http://groups.google.com/group/symfony-users?hl=en
>
> --
> 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 symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group 
> athttp://groups.google.com/group/symfony-users?hl=en

-- 
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 symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to