Download the PHP package davidbadura/fixtures without Composer
On this page you can find all versions of the php package davidbadura/fixtures. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package fixtures
davidbadura\fixtures
Features:
- Use Services like fzaninotto/Faker, a PHP library that generates fake data for you
- Resolve object dependency automatically (also bidirectional references)
- Configurable default fixture converter (constructor, properties, set and add methods)
- Easy to create your own converter
- Many fixtures loader: Yaml, Json, Toml und PHP
- Extendable by events (currently with symfony/event-dispatcher)
- Fixture filtering by tags
- Object validation (currently with symfony/validator over events)
- Persist Fixtures with Doctrine ORM, Doctrine MongoDb or Propel
- Easy to add your own Persister
- Use an expression-language with symfony/expression-language
Todos:
- Add cli functionality.
- Translate documentation ( my english is really bad ;) )
- Write documentation
Documentation
Installation
You can easily install this package over composer
Useage
First, you must create fixtures files in yaml, json, toml, php or mixed. In this example, we have different formats:
YAML
PHP
JSON
You can reference to other objects with following expression @{fixture-name}:{fixture-key}
. The references will resolved automatically.
What other formats are supported you can read under Loader.
How the fixture manager converte the fixtures to objects can you read in the Converter section. You can use the default fixture converter or write your own converter.
Load Fixtures
Now, you can load the fixtures, crate the objects and persist these in the database. For this, we use the default fixture manager.
You can easily instance your own fixture manager. For more information you can read FixtureManager documentation.
All versions of fixtures with dependencies
symfony/event-dispatcher Version ^4.4|^5.3|^6.0
symfony/finder Version ^4.4|^5.3|^6.0