nicodemuz/doctrine-fixtures-timing-bundle

A Symfony bundle to load Doctrine fixtures with timing information and a top slowest fixtures report

Installs: 1 082

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:symfony-bundle

pkg:composer/nicodemuz/doctrine-fixtures-timing-bundle

v1.0.0 2025-04-02 12:14 UTC

This package is not auto-updated.

Last update: 2025-10-02 13:03:14 UTC


README

A Symfony bundle that extends the DoctrineFixturesBundle to load fixtures with timing information ⏳ and a report of the top slowest fixtures 🐢.

🚀 Installation

Install the bundle via Composer:

composer require nicodemuz/doctrine-fixtures-timing-bundle

Enable the bundle in your Symfony application by adding it to config/bundles.php:

return [
    // ...
    Nicodemuz\DoctrineFixturesTimingBundle\DoctrineFixturesTimingBundle::class => ['dev' => true, 'test' => true],
];

🛠️ Usage

Run the command to load your fixtures with timing analysis:

php bin/console nicodemuz:doctrine:fixtures:load-with-timing

⏱️ Output Example

Top 15 Slowest Fixtures
-----------------------

 ------------------------------------------------------ ----------------------
  Fixture Class                                          Time Taken (seconds)  
 ------------------------------------------------------ ----------------------
  App\DataFixtures\ORM\UserFixtures                      7.251                 
  App\DataFixtures\ORM\MediaFixtures                     0.537                 
  App\DataFixtures\ORM\TagFixtures                       0.336                 
  App\DataFixtures\ORM\ForumFixtures                     0.204                 
  App\DataFixtures\ORM\SubscriptionFixtures              0.150                 
  ...                                                   ...                   
 ------------------------------------------------------ ----------------------

[✅] All 108 fixtures loaded in 24.591 seconds

⚡ Now you can easily identify and optimize the slowest fixtures in your project! 🚀