PHPackages                             atournayre/fixtures-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. atournayre/fixtures-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

atournayre/fixtures-bundle
==========================

Fixtures bundle

0.2.0(2y ago)070PHPPHP &gt;=8.1

Since May 1Pushed 2y ago1 watchersCompare

[ Source](https://github.com/atournayre/fixtures-bundle)[ Packagist](https://packagist.org/packages/atournayre/fixtures-bundle)[ RSS](/packages/atournayre-fixtures-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (7)Versions (4)Used By (0)

Atournayre Fixtures Bundle
==========================

[](#atournayre-fixtures-bundle)

This bundle helps creating fixtures (with Alice).

Requirements
------------

[](#requirements)

Symfony `6.2.*`

PHP `>=8.2`

Install
-------

[](#install)

Use [Composer](https://getcomposer.org) to install the package:

### Composer

[](#composer)

```
composer require atournayre/fixtures-bundle --dev
```

### Register bundle

[](#register-bundle)

```
// config/bundles.php

return [
    // ...
    Hautelook\AliceBundle\HautelookAliceBundle::class => ['dev' => true, 'test' => true],
    Atournayre\Bundle\FixtureBundle\AtournayreFixtureBundle::class => ['dev' => true, 'test' => true],
    // ...
]
```

Features
--------

[](#features)

Command to load fixtures:

```
php bin/console fixtures
```

Events:

- BeforeFixturesEvent
- AfterFixturesEvent

Providers:

- DateTime
- Entity
- Uuid
- Hash password

Examples
--------

[](#examples)

### Fixtures

[](#fixtures)

```
App\Entity\User:
  admin:
    # id: ''
    id: ''
    # id: ''
    # id: ''
    # id: ''
    email: 'admin@example.com'
    password: ''
    # The current date with specific time
    dateTime: ''
    # The current date with random hour
    otherDateTime: ''
    # A related entity identified by its id
    relatedEntity: '
