PHPackages                             teamneusta/pimcore-import-export-bundle - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. teamneusta/pimcore-import-export-bundle

ActivePimcore-bundle[File &amp; Storage](/categories/file-storage)

teamneusta/pimcore-import-export-bundle
=======================================

Export documents to YAML, so that they can be used in fixtures

4.0.0(1mo ago)34.7k↓34.6%1[2 PRs](https://github.com/teamneusta/pimcore-import-export-bundle/pulls)MITPHPPHP ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0CI passing

Since Feb 18Pushed 3mo ago8 watchersCompare

[ Source](https://github.com/teamneusta/pimcore-import-export-bundle)[ Packagist](https://packagist.org/packages/teamneusta/pimcore-import-export-bundle)[ RSS](/packages/teamneusta-pimcore-import-export-bundle/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (8)Dependencies (46)Versions (17)Used By (0)

Pimcore Import Export Bundle
============================

[](#pimcore-import-export-bundle)

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

[](#installation)

1. **Require the bundle**

    ```
    composer require teamneusta/pimcore-import-export-bundle
    ```
2. **Enable the bundle**

    Add the Bundle to your `config/bundles.php`:

    ```
    Neusta\Pimcore\ImportExportBundle\NeustaPimcoreImportExportBundle::class => ['all' => true],
    ```
3. **Assets Install**

    ```
    bin/console assets:install public --symlink
    ```

    Assets will be installed as symlinks in folder public.

Usage
-----

[](#usage)

### Pimcore Admin Backend

[](#pimcore-admin-backend)

#### Export

[](#export)

After enabling the bundle you should see a new menu item in the context menu of Pimcore Admin Backend:

DocumentsAssetsData Objects[![context_menu_export_assets.png](docs/images/context_menu_export_assets.png)](docs/images/context_menu_export_assets.png)[![context_menu_export_documents.png](docs/images/context_menu_export_documents.png)](docs/images/context_menu_export_documents.png)[![context_menu_export_objects.png](docs/images/context_menu_export_objects.png)](docs/images/context_menu_export_objects.png)Currently only YAML Export is supported by menu

After clicking one of the menu items you will be asked for a file name and the export will start:

[![filename_dialog.png](docs/images/filename_dialog.png)](docs/images/filename_dialog.png)

(german translation)

##### Special case: Assets Export

[](#special-case-assets-export)

Because Assets are mostly assigned to physical files (images, videos, documents, etc.) the export will create a ZIP file containing the binary data and a YAML file with the metadata. The same structured zip file can be used for the import of Assets as well.

#### Import

[](#import)

For the import you can have a look into the Tools Menu:

[![import_menu.png](docs/images/import_menu.png)](docs/images/import_menu.png)

### Symfony Commands

[](#symfony-commands)

This bundle provides several commands to export and import data into Pimcore.

Fur usage, run the commands with the `--help` option to see all available options and arguments.

- `neusta:pimcore:export:documents`
    - Export Pimcore documents (e.g., pages, snippets) to a YAML file. Export either the entire document tree or specific document IDs.
- `neusta:pimcore:export:assets`
    - Exports Pimcore assets (e.g., images, videos, PDFs) into two files: A YAML file along with a ZIP file containing the actual binary files.
    - Both files share the same base name (e.g., `assets.yaml` and `assets.zip`).
- `neusta:pimcore:export:objects`
    - Exports Pimcore DataObjects into a YAML file. The objects can be filtered by ID or exported in full.
- `neusta:pimcore:import:documents`
    - Imports Pimcore documents (e.g., pages, snippets) from a YAML file.
- `neusta:pimcore:import:assets`
    - Imports assets (e.g., images, PDFs, videos) into Pimcore based on a YAML definition.
    - The command expects a YAML file describing the assets and a ZIP archive containing the corresponding files. The ZIP file must be located in the same directory as the YAML file and must have the same base name (e.g., `assets.yaml` and `assets.zip`)
- `neusta:pimcore:import:objects`
    - Imports Pimcore DataObjects from a YAML file.

#### Common Options

[](#common-options)

All import commands follow a similar structure and support the following common options:

- `--input` or `-i`: Path to the input YAML file (required for import commands).
- `--dry-run`: Perform the operation without persisting data (only available for import commands).

### Notice: WYSIWYG - Editable

[](#notice-wysiwyg---editable)

For using a correct exporting and importing of WYSIWYG editables in older Pimcore versions (e.g. using `symfony/framework < 6.2.2`) you probably need to configure your Symfony HTML sanitizer as documented here:

In our integration test we have used the following configuration:

```
tests/app/config/packages/pimcore.yaml
```

because of already known bugs with `` - HTML tag.

Concepts
--------

[](#concepts)

### Page Export

[](#page-export)

The selected page will be exported into YAML format:

```
elements:
    -
        Pimcore\Model\Document:
            id: 123
            parentId: 1
            type: page
            published: true
            path: /
            language: de
            navigation_name: my-site
            navigation_title: 'My Site'
            key: my-site
            title: 'My Site'
            controller: 'App\DefaultController::indexAction'
            editables:
                main:
                    type: areablock
                    name: main
                    data: [ { key: '1', type: text-editor, hidden: false } ]
# ...
```

In the same way you can re-import your yaml file again by selecting: `Import from YAML` in the context menu.

### Page Import

[](#page-import)

The import process will create pages with the given data.

The following rule applies:

If the parseYaml method of the `PageImporter` is not called with `forcedSave`, the data from the provided YAML will be adopted, regardless of whether it makes sense or not, and without checking whether the page could be saved that way.

- If `forcedSave` is set to `true`, the ID will be retained (Caution – this can overwrite an existing page).
- If `forcedSave` is set to `true` and no ID has been set, it will be generated by Pimcore (Creating new page).
- If a `parentId` is specified, the corresponding document will be searched for.
- If it exists, it will be set as the parent (Note: This may override the `path` specification).
- If the `parentId` does not exist, an attempt will be made to find a parent using the `path` specification.
- If such a parent exists, the `parentId` will be set accordingly and saved.
- If neither is found, an InvalidArgumentException will be thrown, and the save operation will be aborted.

[![parent_flow.png](docs/images/parent_flow.png)](docs/images/parent_flow.png)

If multiple pages are imported and a path specification changes by the applied rules, this path specification will be replaced with the new, correct path specification in all provided page configurations.

### Parameterize your yaml files

[](#parameterize-your-yaml-files)

You can parameterize your yaml files with placeholders. The placeholders will be replaced by the values you provide in your fixtures.

```
elements:
    -
        Pimcore\Model\Document:
            id: 2
            parentId: 1
            # ...further properties
            editables:
              # ...several editables
              'main:1.img:1.image':
                  type: image
                  data:
                      id: %IMAGE_ID%
              'main:1.img:1.title':
              # ...
```

In the case above an image has been assigned to an `Editable/Image` editable. The image id is a placeholder `%IMAGE_ID%`.

You can use now a `Neusta\Pimcore\ImportExportBundle\Documents\Import\Filter\SearchAndReplaceFilter` instance to replace the placeholder with the actual image id (e.g. 1234).

```
$yamlContent = (new SearchAndReplaceFilter(['%IMAGE_ID%' => 1234]))->filterAndReplace($yamlContent);
```

If you want to change your yaml in a more complex way you can use the `Neusta\Pimcore\ImportExportBundle\Documents\Import\Filter\YamlFilter` interface to implement your own filter.

With that technique you can export test pages for Fixtures, change values into placeholders (e.g. for assets and data objects) and replace them with the actual values in your tests.

Contribution
------------

[](#contribution)

Feel free to open issues for any bug, feature request, or other ideas.

Please remember to create an issue before creating large pull requests.

### Local Development

[](#local-development)

To develop on your local machine, the vendor dependencies are required.

```
bin/composer install
```

We use composer scripts for our main quality tools. They can be executed via the `bin/composer` file as well.

```
bin/composer cs:fix
bin/composer phpstan
```

For the tests there is a different script, that includes a database setup.

```
bin/run-tests
```

###  Health Score

51

—

FairBetter than 96% of packages

Maintenance84

Actively maintained with recent releases

Popularity27

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 55.8% 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 ~49 days

Recently: every ~64 days

Total

9

Last Release

55d ago

Major Versions

1.1.0 → 2.0.02025-05-20

2.1.0 → 3.0.02025-08-11

3.0.1 → 4.0.02026-03-24

PHP version history (2 changes)1.0.0PHP ~8.1.0 || ~8.2.0 || ~8.3.0

4.0.0PHP ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/12913211?v=4)[team neusta SE](/maintainers/teamneusta)[@teamneusta](https://github.com/teamneusta)

---

Top Contributors

[![lukadschaak](https://avatars.githubusercontent.com/u/2377363?v=4)](https://github.com/lukadschaak "lukadschaak (24 commits)")[![mike4git](https://avatars.githubusercontent.com/u/5848798?v=4)](https://github.com/mike4git "mike4git (15 commits)")[![nsd0sneumann](https://avatars.githubusercontent.com/u/95299884?v=4)](https://github.com/nsd0sneumann "nsd0sneumann (2 commits)")[![mtramp-neusta](https://avatars.githubusercontent.com/u/74239222?v=4)](https://github.com/mtramp-neusta "mtramp-neusta (1 commits)")[![storbahn](https://avatars.githubusercontent.com/u/16591421?v=4)](https://github.com/storbahn "storbahn (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/teamneusta-pimcore-import-export-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/teamneusta-pimcore-import-export-bundle/health.svg)](https://phpackages.com/packages/teamneusta-pimcore-import-export-bundle)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)

PHPackages © 2026

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