khepin / KhepinYamlFixturesBundle

Easy loading of fixtures defined in YAML files for Symfony2 and Doctrine2
MIT License
58 stars 42 forks source link

Support for application parameters in fixtures #34

Open dvc opened 10 years ago

dvc commented 10 years ago

for example:

# app/config/parameters.yml
parameters:
   base_path: web/files

#.../DataFixtures/data.yml
model: Me\MyBundle\Entity\File
fixtures:
  file1:
    src: %base_path%/1.jpg

SELECT * from File
id, src
1, web/files/1.jpg

It could helps for deploy and testing.

khepin commented 10 years ago

Could be good indeed. You're welcome to send a PR for it ;)

luishdez commented 10 years ago

+1 This will be awesome