You must first sign up to be able to contribute.


Fixtures are data that's loaded into the model (and ultimately the database) to initialize the state of the project. Some fixtures are to initialize the project itself. Others are used to set up test cases.




Depending on whether you are using Propel or Doctrine, you may need to organize your fixtures differently. They are Yaml versions of data. They need to contain data appropriate for their model definitions. The top level is the entity name, each level below that is a named instance. Named instances can be references elsewhere via their name. A subset of php can be used to pre-process these files, allowing you to populate large data sets.

Propel (currently) requires the reference data to be defined before it's referenced. So, file names beginning numerically is commonly seen.


data from a fixture file from from Jobeet(Doctrine):

    JobeetCategory: programming
    type:         full-time
    company:      Sensio Labs
    logo:         /uploads/jobs/sensio_labs.png
    position:     Web Developer
    location:     Paris, France
    description:  |
      You've already developed websites with symfony and you want to work
      with Open-Source technologies. You have a minimum of 3 years
      experience in web development with PHP or Java and you wish to
      participate to development of Web 2.0 sites using the best
      frameworks available.
    how_to_apply: |
      Send your resume to fabien.potencier [at]
    is_public:    true
    is_activated: true
    token:        job_sensio_labs
    expires_at:   '2008-12-25'