comphppuebla / dbal-fixtures
Fixtures management with Doctrine DBAL
Installs: 33 136
Dependents: 0
Suggesters: 0
Security: 0
Stars: 10
Watchers: 3
Forks: 9
Open Issues: 2
Requires
- php: >=7.1
- doctrine/dbal: ^2.5 | ^3.3
- fakerphp/faker: ^1.12
- symfony/console: ^4.0 | ^5.0 | ^6.0
- symfony/yaml: ^4.0 | ^5.0 | ^6.0
Requires (Dev)
- phpunit/phpunit: ^6.0
README
Fixtures management using YAML files. It supports: foreign key references, and generation of fake data.
Installation
Install this package using composer
$ composer require comphppuebla/dbal-fixtures
Documentation
The following yml
file will insert 3 rows into the table stations
using random values generated by Faker for all the columns
stations: station_[1..3]: name: "${company}" address_line_1: "${streetAddress}" location: "${city}" coordinates: "`PointFromText('POINT(${latitude} ${longitude})')`" created_at: "${date('Y-m-d H:i:s', 'yesterday')}" last_updated_at: "${date('Y-m-d H:i:s')}"
Please visit the documentation page for more details.
Contribute
Please refer to CONTRIBUTING for information on how to contribute to this package.
License
Released under the MIT License.