Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Fixtures Bundle

Fixtures Bundle Laravel Package

pccomponentes/fixtures-bundle

PcComponentes Fixtures Bundle offers a Symfony-friendly way to define and load database fixtures. Organize reusable fixture sets, seed development and test environments, and execute them via console commands with straightforward configuration.

View on GitHub
Deep Wiki
Context7

At a glance

Frequently asked questions about Fixtures Bundle
How do I install pccomponentes/fixtures-bundle?
Install it with Composer by running composer require pccomponentes/fixtures-bundle, then register the bundle in your Symfony application's bundle configuration (bundles.php under Symfony Flex, or your Kernel). Once registered, the bundle's console commands become available and you can start organizing fixture sets. Check the repository README for any configuration file you need to create or publish.
Can I use this fixtures bundle in a Laravel app instead of seeders?
No. pccomponentes/fixtures-bundle is a Symfony bundle that exposes Symfony console commands and bundle configuration, so it is not a drop-in replacement for Laravel's database seeders. In a Laravel application you would normally use seeders with the db:seed command, optionally combined with model factories or Faker. The bundle is aimed at teams running Symfony applications.
How do I organize fixtures into reusable sets?
The bundle lets you group fixture definitions into sets that can be reused across environments instead of duplicating data definitions in every test or development setup. You define those sets in your project and execute only the ones you need from the console, keeping development and test seeding consistent. See the README for the exact directory structure and naming conventions the bundle expects.
How do I load fixtures from the console?
After registering the bundle, you run its console command through bin/console and it executes the fixture sets you point it at. That makes seeding a development or test environment a repeatable, scriptable step in your setup workflow. Check the README for the exact command name plus its arguments and options.
Does the bundle work with Doctrine entities?
The bundle concentrates on defining, organizing and executing fixture sets rather than replacing your persistence layer, so it is typically paired with whatever ORM your Symfony app already uses, most commonly Doctrine. Your fixture code performs the actual persistence while the bundle handles organization and console execution. Confirm the supported integrations in the README before adopting it.
How do I use fixtures in automated tests?
Define a fixture set that produces the baseline data your tests need, then load it during test bootstrap, for example in a base test case that boots the kernel and executes that set. Keep each set small and focused so every test starts from a known state. You can also trigger the same loading from CI setup scripts before running your test suite.
Is it safe to run fixtures against a production database?
Fixtures are meant for development and test environments where overwriting or duplicating data is acceptable, so you should not point them at production data. If you need baseline reference data in production, use reviewed migrations or a dedicated idempotent seed command instead. Guard your configuration so the fixture commands are only available and runnable outside production.
How do I configure the bundle?
Configuration goes through standard Symfony bundle configuration under the bundle's own config key, which is where you point it at your fixture sets and related options. Most projects keep that file in config/packages/ and add environment-specific overrides in config/packages/dev and config/packages/test. Refer to the README for the available keys, since the options are documented there.
Which PHP and Symfony versions are supported, and is the bundle maintained?
Check the package's composer.json and Packagist page for the exact PHP and Symfony version constraints plus the release history, because those constraints are what Composer enforces at install time. PcComponentes publishes the package publicly on GitHub, so recent commits, tags and open issues are the quickest way to judge maintenance activity before adopting it. Pin a version in composer.json and review changelogs when you upgrade Symfony.
What are the alternatives to this fixtures bundle?
The best-known Symfony option is DoctrineFixturesBundle, often combined with Faker or Alice for generating realistic data; those are more widely used and better documented. This bundle's differentiator is the fixture-set organization and console-driven execution described in its README. If you are working in Laravel, native seeders plus model factories cover the same ground.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core