Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I use fixtures in Doctrine 2?

Does anybody can get me started on using fixtures in doctrine 2? In doctrine 1 this was easy. But in the doctrine 2 documentation there's nothing I can find about fixtures.

Thanks.

like image 697
tom Avatar asked Aug 10 '10 07:08

tom


2 Answers

YAML data fixtures no longer exist in Doctrine 2.

you can use use regular PHP code to load data fixtures.

see this link

http://www.symfony-project.org/blog/2009/10/05/symfony-and-doctrine-2

like image 107
Haim Evgi Avatar answered Oct 24 '22 21:10

Haim Evgi


There are now data fixtures for Doctrine 2: https://github.com/doctrine/data-fixtures

like image 32
Olof Larsson Avatar answered Oct 24 '22 21:10

Olof Larsson