adlarge/fixtures-documentation-bundle
Symfony bundle that generates and serves documentation for your fixtures. Builds a JSON dataset and Twig UI with sections, tables, and links between entities, and can expose an action to reload fixtures so testers can inspect and reset test data.
fixtures ecosystem (e.g., laravel-fixtures, orchestra/testbench).blade).symfony/http-foundation for routing, symfony/twig-bridge for templating).php artisan db:seed) is analogous to Symfony’s fixtures.twig/laravel or spatie/laravel-twig-view.response()->json()).EventDispatcher, TwigBundle) or replacing them with Laravel equivalents.doctrine/annotations for PHP 8+ attributes).fixture: true in model comments).| Risk Area | Severity | Mitigation Strategy |
|---|---|---|
| Symfony Dependency Lock | High | Use Laravel-compatible Symfony components or rewrite core logic. |
| Twig Templating Gap | Medium | Fallback to Blade or generate static HTML/JS. |
| Fixture Discovery | Medium | Implement custom trait/interface for models. |
| Performance Overhead | Low | Cache JSON output (e.g., cache()->remember). |
| Maintenance Burden | Medium | Monitor upstream Symfony updates for breaking changes. |
fakerphp/faker)?User.hasMany(Post)) or just flat data?| Laravel Component | Bundle Equivalent/Replacement | Notes |
|---|---|---|
| Routing | Symfony routing.yml |
Use Laravel’s Route::get() or API resources. |
| Templating | TwigBundle | spatie/laravel-twig-view or Blade. |
| Fixture Loading | Doctrine Fixtures | Laravel’s DatabaseSeeder + factories. |
| JSON Output | FixturesDocumentationGenerator |
Custom service class. |
| Event System | Symfony Events | Laravel’s Events facade or manual hooks. |
| Configuration | config/packages/adlarge_fixtures.yaml |
Laravel’s config/fixtures.php. |
Phase 1: Proof of Concept (1–2 weeks)
spatie/laravel-twig-view (if using Twig) or adapt Blade.FixtureDocumenter service to:
#[Fixture] attribute).storage/app/public/fixtures.json).Phase 2: Full Integration (2–3 weeks)
EventDispatcher with Laravel’s Event system for fixture reloads.laravel-data-tables).php artisan fixtures:reload).POST /api/fixtures/reload).spatie/laravel-permission).Phase 3: Optimization (1 week)
cache()->forever()).fixtures_v2.json).config/fixtures.php).FixtureDocumenter service.illuminate/support, spatie/laravel-twig-view (optional).doctrine/annotations (for PHP <8.0), laravel-data-tables (for UI).TwigBundle with spatie/laravel-twig-view.DoctrineFixturesBundle with Laravel’s DatabaseSeeder + factories.laravel-fixtures or custom seeders).Log facade to track JSON generation errors.tinker to inspect fixture data before JSON serialization.laravel-data-tables).How can I help you explore Laravel packages today?