Download the PHP package shopware/fixture-bundle without Composer

On this page you can find all versions of the php package shopware/fixture-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package fixture-bundle

Shopware FixtureBundle

The FixtureBundle provides a flexible and organized way to load test data into your Shopware 6 application. It supports dependency management, priority-based execution, and group filtering.

Installation

Creating Fixtures

Basic Fixture

Create a class that implements FixtureInterface and add the #[Fixture] attribute:

Fixture with Priority

Higher priority fixtures are executed first:

Fixture with Dependencies

Specify other fixtures that must be loaded before this one:

Fixture with Groups

Organize fixtures into groups for selective loading:

Complete Example

Commands

Loading Fixtures

Load all fixtures:

Load only fixtures from a specific group:

Listing Fixtures

View all available fixtures and their execution order:

List fixtures from a specific group:

Example output:

Fixture Attributes

The #[Fixture] attribute accepts the following parameters:

Execution Order

Fixtures are executed in an order determined by:

  1. Dependencies: Fixtures with dependencies always run after their dependencies
  2. Priority: Among fixtures without dependency relationships, higher priority runs first
  3. Circular dependency detection: The system will throw an exception if circular dependencies are detected

Service Registration

Fixtures are automatically discovered and registered if they:

  1. Implement the FixtureInterface
  2. Have the #[Fixture] attribute
  3. Are registered as services (auto-configuration is enabled by default)

Theme Fixtures

The FixtureBundle provides a convenient way to configure theme settings through fixtures using the ThemeFixtureLoader and ThemeFixtureDefinition classes.

Basic Theme Fixture

Multiple Theme Configuration

Setting Logo

Theme Fixture Features

Available Configuration Fields

Common theme configuration fields include:

Note: Available fields depend on your theme's configuration schema defined in theme.json

Custom Field Fixtures

The FixtureBundle provides helper classes to easily create and manage custom fields through fixtures using CustomFieldSetFixtureLoader and related definition classes.

Basic Custom Field Fixture

Customer Fixtures

The FixtureBundle provides comprehensive customer management through fixtures using CustomerFixtureLoader and CustomerFixtureDefinition classes for creating test customers with addresses, custom fields, and relationships.

Basic Customer Fixture

Customer with Complete Information

Customer with Addresses

Guest Customer Fixture

Best Practices

  1. Use meaningful names: Name your fixtures clearly to indicate what data they create
  2. Organize with groups: Use groups to categorize fixtures (e.g., 'test-data', 'demo-data', 'performance-test', 'theme-config', 'customers')
  3. Declare dependencies explicitly: Always declare dependencies to ensure correct execution order
  4. Keep fixtures focused: Each fixture should have a single responsibility
  5. Make fixtures idempotent: Fixtures should be able to run multiple times without errors
  6. Use dependency injection: Inject the services you need rather than accessing the container directly
  7. Handle theme errors gracefully: Use try-catch blocks when configuring optional themes
  8. Use email as unique identifier: Customer fixtures use email as the primary identifier for updates vs. creation

All versions of fixture-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
shopware/administration Version ^6.6.10
shopware/core Version ^6.6.10
shopware/storefront Version ^6.6.10
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package shopware/fixture-bundle contains the following files

Loading the files please wait ...