PHPackages                             basilicom/pimcore-fixtures - 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. [Database &amp; ORM](/categories/database)
4. /
5. basilicom/pimcore-fixtures

ActivePimcore-bundle[Database &amp; ORM](/categories/database)

basilicom/pimcore-fixtures
==========================

Load yml fixtures in pimcore

v2026.5.1(1w ago)1220↓62.7%MITPHPPHP ^8.3CI passing

Since May 19Pushed 6d agoCompare

[ Source](https://github.com/basilicom/pimcore-fixtures)[ Packagist](https://packagist.org/packages/basilicom/pimcore-fixtures)[ RSS](/packages/basilicom-pimcore-fixtures/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (8)Dependencies (14)Versions (9)Used By (0)

Pimcore YML Fixtures
====================

[](#pimcore-yml-fixtures)

**Export your Pimcore content to YAML files, then load it back into any environment.**

Point the bundle at a folder in your Pimcore tree and it writes everything it finds — data objects, documents, assets, plus the system config they depend on — to plain YAML files. Commit those files, and any teammate or CI environment can recreate the exact same Pimcore state with a single command.

Typical use cases:

- Seed dev environments with a realistic baseline of content
- Ship a demo/staging dataset alongside your code
- Snapshot a customer's content for local debugging
- Keep system-level config (sites, roles, glossary, units, classification stores) in version control

Works with Pimcore 12 / PHP 8.3 / Symfony 7.

---

Installation
------------

[](#installation)

```
composer require --dev basilicom/pimcore-fixtures
```

Register the bundle in `config/bundles.php`:

```
return [
    // ...
    Basilicom\PimcoreFixtures\PimcoreFixturesBundle::class => ['dev' => true],
    // ...
];
```

Optional config in `config/packages/basilicom_pimcore_fixtures.yaml`:

```
basilicom_pimcore_fixtures:
  path: '%kernel.project_dir%/fixtures'   # where YAML files live
  ignored_fields: []                       # DataObject field names to skip
  ignored_classes: []                      # DataObject classes to skip
  ignored_paths: []                        # Pimcore paths to skip
  ignored_properties: []                   # Pimcore property names to skip on documents/assets/dataObjects
  ignored_website_settings: []             # Website setting names to skip
```

Defaults are sensible — `path` falls back to `var/bundles/PimcoreFixtures`. Empty values (`null`, `''`, `[]`) and inherited values are skipped during generation to keep files clean.

`ignored_properties` matches on `Property::getName()` and applies wherever Pimcore properties are exported (document YAML, asset `_metadata.yaml`, and dataObject property holders). `ignored_website_settings` matches on `WebsiteSetting::getName()` and filters entries before they are written to `pimcore/website_settings.yaml`.

---

How it works
------------

[](#how-it-works)

The bundle has two sides:

- **Generate** — read live Pimcore content and write YAML fixture files.
- **Load** — read those YAML files and recreate the content in another Pimcore instance.

Loading is idempotent: re-running won't duplicate content, it updates existing entries by fixture key.

Below is a tour of the main commands. Run any of them with `--help` to see all options.

---

What gets exported
------------------

[](#what-gets-exported)

### Data objects

[](#data-objects)

```
bin/console basilicom:pimcore:fixtures:generate
```

The main generation command. Without arguments it opens an interactive picker (filter, ↑/↓, space, enter) to choose one or more folders from your data object tree. Pass `--folder=/products` to skip the picker, or `--all` to export everything.

By default it also follows **cross-domain references**: if a Product points to a Category, a hero image, and a landing page, all four are pulled into the same export — including parent folders so paths resolve cleanly on load. Disable with `--no-follow-refs`.

Re-running merges new entries into existing fixture files. Pass `--force` to overwrite from scratch.

### Documents

[](#documents)

```
bin/console basilicom:pimcore:fixtures:generate-documents
```

Same flags as `generate`. Exports pages, snippets, links, emails, and folders to `{path}/documents/`. Includes title, description, pretty URL, controller, template, editables, link targets, properties, and the original sibling `index` so loaded documents keep their Pimcore tree order. Reference following pulls in any data objects and assets the documents link to.

> Not yet supported: hardlinks.

### Assets

[](#assets)

```
bin/console basilicom:pimcore:fixtures:generate-assets
```

Copies asset binaries into `{path}/assets/`, mirroring the Pimcore asset tree. On load, files are restored to their original Pimcore paths. Same flag set as the other generators (interactive picker, `--folder`, `--all`, `--levels`, `--force`, …).

You can also drop replacement files into `fixtures/assets/` manually — merge mode leaves existing binaries untouched.

Per-asset metadata that can't be expressed by the binary itself (currently own Pimcore properties) is written to `{path}/assets/_metadata.yaml`. The asset seeder reads this sidecar after creating the binaries and applies the properties.

### System configuration

[](#system-configuration)

A few Pimcore-wide settings travel with your fixtures, written as single files under `{path}/pimcore/`:

FileContains`sites.yaml`Sites and their root documents`website_settings.yaml`Website settings (with element references resolved by path)`glossary.yaml`Glossary entries`units.yaml`QuantityValue units`classification_store.yaml`Stores, groups, keys, collections (the *config*, not field values)`roles.yaml`Roles, role folders, permissions, workspaces`shared_translations.yaml`Shared translations (default `messages` domain)`admin_translations.yaml`Admin UI translations (`admin` domain)Most are emitted automatically when you run `generate`. Classification stores, roles, and translations have their own dedicated commands if you want to regenerate just one:

```
bin/console basilicom:pimcore:fixtures:generate-classification-store
bin/console basilicom:pimcore:fixtures:generate-roles
bin/console basilicom:pimcore:fixtures:generate-translations
```

**Translation file format** — each top-level key is a translation key, each value is a `locale → text` map:

```
my.label.headline:
  de: 'Überschrift'
  en: 'Headline'
my.label.subtitle:
  de: 'Untertitel'
  en: 'Subtitle'
```

On load, missing keys are created and existing keys updated; locales not configured in Pimcore are skipped with a warning. Pass `--skip-translations` to `generate` or `load` to opt out entirely.

> File-based config that already lives in `var/config/` — static routes, predefined properties, document types — isn't fixturized. Commit those files directly.

---

Loading fixtures
----------------

[](#loading-fixtures)

```
bin/console basilicom:pimcore:fixtures:load
```

Loads everything in the fixtures folder back into Pimcore in the right order: units and classification config first, then assets, document shells, data objects (in two passes so circular relations work), document content, sites, glossary, website settings, and finally roles.

Useful options:

OptionEffect`--dry-run`Preview without writing`--omit-validation`Skip mandatory-field validation when saving objects`--check-path-exists`Update an existing object at the same path instead of creating a new one`--skip-translations`Don't load shared/admin translation fixtures---

Resetting
---------

[](#resetting)

```
bin/console basilicom:pimcore:fixtures:reset --force
```

Truncates Pimcore content tables before a fresh load. The `--force` flag is mandatory to avoid accidents.

Scope it with `--types` (`objects`, `documents`, `assets`), `--classes`, `--exclude`, or `--drop-folder`. Some shared tables (`notes`, `edit_lock`, `search_backend_data`, `recyclebin`) are always truncated.

---

Fixture file format
-------------------

[](#fixture-file-format)

Fixtures are plain YAML keyed by class and fixture id, with `@key` references between entries.

**Data object example:**

```
\App\Model\DataObject\Product:
  001_product_example_abc123:
    key: example-product
    parentId: 1
    published: true
    name: 'Example product'
    category: '@002_category_shoes_def456'   # cross-fixture reference
```

**Document example:**

```
\Pimcore\Model\Document\Page:
  003_page_about_xyz789:
    key: about-us
    parent: '@001_folder_content_abc123'
    title: 'About Us'
    template: '@AppBundle/Default/default.html.twig'
    properties:
      - { name: nav_title, type: text, data: About, inheritable: false }
```

**Classification store field values** on a data object are nested by `groupName → keyName → language`:

```
classificationAttributes:
  technicalSpecs:
    weight:
      default: '2.5 kg'
  marketingData:
    headline:
      de: Produktüberschrift
      en: Product headline
```

---

Extending
---------

[](#extending)

You can teach the bundle about new Pimcore field types or custom load behaviour without forking it.

- **Custom field type** — add a transformer in `src/Generation/DataTransformer/` for export, and a hydrator implementing `ChainedPropertyHydratorInterface` for load. Tag the hydrator service with `basilicom_pimcore_fixtures.property_hydrator` and a priority.
- **Custom property hydrator** — same tag, used as a fallback when none of the built-in hydrators match.
- **Pre/post processors** — extend `AbstractProcessor` and tag with `basilicom_pimcore_fixtures.pre_processor` or `basilicom_pimcore_fixtures.post_processor` to run code around each object save.

See [AGENTS.md](./AGENTS.md) for architectural details.

---

Contributing
------------

[](#contributing)

You don't need a local PHP or Composer install — everything runs in Docker via `make`.

```
git clone git@github.com:basilicom/pimcore-fixtures.git
cd pimcore-fixtures
make setup
```

Common tasks:

CommandPurpose`make lint`PHP-CS-Fixer + PHPStan`make lint-php-fix`Auto-fix style issues`make test-unit`Run PHPUnit`make help`List everythingRun `make lint && make test-unit` before opening a PR. Architecture and conventions are documented in [AGENTS.md](./AGENTS.md).

###  Health Score

48

—

FairBetter than 94% of packages

Maintenance99

Actively maintained with recent releases

Popularity18

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 86.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

7

Last Release

11d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/afb6145ee5c0c6af7662a537e76ee9c679d30e7e6217636d72576ea5ccd8b002?d=identicon)[AlexanderHeidrich](/maintainers/AlexanderHeidrich)

---

Top Contributors

[![AlexanderHeidrich](https://avatars.githubusercontent.com/u/9350895?v=4)](https://github.com/AlexanderHeidrich "AlexanderHeidrich (13 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![kerstinbasilicom](https://avatars.githubusercontent.com/u/38213550?v=4)](https://github.com/kerstinbasilicom "kerstinbasilicom (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/basilicom-pimcore-fixtures/health.svg)

```
[![Health](https://phpackages.com/badges/basilicom-pimcore-fixtures/health.svg)](https://phpackages.com/packages/basilicom-pimcore-fixtures)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.7k532.1M19.2k](/packages/laravel-framework)[laravel/octane

Supercharge your Laravel application's performance.

4.0k24.7M203](/packages/laravel-octane)[statamic/cms

The Statamic CMS Core Package

4.8k3.5M901](/packages/statamic-cms)[laravel/ai

The official AI SDK for Laravel.

9782.1M153](/packages/laravel-ai)[wnx/laravel-backup-restore

A package to restore database backups made with spatie/laravel-backup.

210389.8k2](/packages/wnx-laravel-backup-restore)[power-components/livewire-powergrid

PowerGrid generates Advanced Datatables using Laravel Livewire.

1.7k1.8M6](/packages/power-components-livewire-powergrid)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
