doctrine-fixtures/data-generation-bundle

Generate test data for development and testing

1.0.6 2022-12-29 11:51 UTC

This package is auto-updated.

Last update: 2025-06-29 02:16:44 UTC


README

This bundle aims to assist developers to generate random data for development and testing purposes.

Installation

composer require --dev "doctrine-fixtures/data-generation-bundle"

Create file fixtures-config.yml in root of your project:

# fixtures-config.yml
user:
  namespace: App\Entity\User
  defined_roles:
    - ROLE_USER
    - ROLE_ADMIN
    - ROLE_SUPER_ADMIN
    - ROLE_ALLOWED_TO_SWITCH
  rows: 500
entities:
  article:
    namespace: App\Entity\Article
    construct: true # Expects some class as constructor argument
    rows: 100
  article_page:
    namespace: App\Entity\ArticlePage
    rows: 60

User data

Users with email, password, roles