PHPackages                             sulu/phpcr-migration-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. [Database &amp; ORM](/categories/database)
4. /
5. sulu/phpcr-migration-bundle

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

sulu/phpcr-migration-bundle
===========================

The bundle provides command to migrate the Sulu database from phpCr to the SuluContentBundle.

1.0.0(1mo ago)68.2k↑40.6%3[1 PRs](https://github.com/sulu/SuluPHPCRMigrationBundle/pulls)MITPHPPHP ^8.2CI passing

Since Apr 9Pushed 1w ago5 watchersCompare

[ Source](https://github.com/sulu/SuluPHPCRMigrationBundle)[ Packagist](https://packagist.org/packages/sulu/phpcr-migration-bundle)[ RSS](/packages/sulu-phpcr-migration-bundle/feed)WikiDiscussions 0.x Synced 2d ago

READMEChangelog (9)Dependencies (44)Versions (11)Used By (0)

SuluPhpcrMigrationBundle
========================

[](#suluphpcrmigrationbundle)

 [ ![Official Sulu Bundle Badge](https://camo.githubusercontent.com/8ac484ac60dbf97b4f747c6d0f704a16d2c005414d62dfcb2525b7c4cbf82466/68747470733a2f2f73756c752e696f2f75706c6f6164732f6d656469612f383030782f30302f3233302d4f6666696369616c25323042756e646c652532305365616c2e7376673f763d322d3626696e6c696e653d31) ](https://sulu.io/)

Upgrading Data from Sulu 2.6 to Sulu 3.0
----------------------------------------

[](#upgrading-data-from-sulu-26-to-sulu-30)

> !\[Note\] The upgrade from Sulu 2.6 to Sulu 3.0 is a major upgrade and will require some migration steps.

You can find the full upgrade guide here: [sulu/sulu UPGRADE.md](https://github.com/sulu/sulu/blob/3.0/UPGRADE-3.x.md)

How to install
--------------

[](#how-to-install)

Install the package:

```
composer require sulu/phpcr-migration-bundle
```

Add the new migration bundle to your `config/bundles.php`:

```
// config/bundles.php

return [
    // ...
+   Sulu\Bundle\PhpcrMigrationBundle\SuluPhpcrMigrationBundle::class => ['all' => true],
```

Configure the SuluPhpcrMigrationBundle in `config/packages/sulu_phpcr_migration.yaml`:

> If you are currently using Jackrabbit, use the "jackrabbit://" based DSN string. After the upgrade, Apache Jackrabbit is no longer used by Sulu’s new content storage and can be removed from your projects in most situations.

```
# config/packages/sulu_phpcr_migration.yaml

sulu_phpcr_migration:
    # dbal://?workspace=
    # jackrabbit://:@:/server?workspace=
    #    DSN: "dbal://default?workspace=%env(PHPCR_WORKSPACE)%"
    #    DSN: "jackrabbit://admin:admin@127.0.0.1:8080/server?workspace=%env(PHPCR_WORKSPACE)%"
    DSN: "dbal://default?workspace=%env(PHPCR_WORKSPACE)%"
    target:
        dbal:
            connection: default
```

How to use
----------

[](#how-to-use)

```
# Update the database to the latest phpcr migration to prepare the structure
php bin/adminconsole phpcr:migrations:migrate

# Run the command to migrate for the data
php bin/adminconsole sulu:phpcr-migration:migrate
```

In case of some errors on customized code, you can try to fix it and rerun the command. The migration command can be rerun, the existing already migrated content will be overwritten and not duplicated.

If you only want to migrate certain document types pass them as an argument (or comma separated if it's a list)

```
php bin/adminconsole sulu:phpcr-migration:migrate snippet
```

Allowed types are: `snippet`, `page`, `article`

### Dry-run mode

[](#dry-run-mode)

Preview a migration without writing anything to the target database:

```
php bin/adminconsole sulu:phpcr-migration:migrate --dry-run
```

This executes the full parse and persist pipeline against your real PHPCR content, but every database write is intercepted in-memory. The command collects every exception (one per document or document/locale pair), continues past failures, and at the end prints a grouped summary plus a JSON report you can hand off for data cleanup.

Default report path: `var/phpcr-migration/dry-run-YYYYMMDD-HHMMSS.json`. Override it with `--report=/path/to/report.json`.

**Limitations.** Dry-run catches PHP-level validation errors (title/slug length, missing webspace or parent, missing shadow template, etc.) but does **not** catch database-level issues such as foreign-key violations, unique-key collisions between two rows that would be written in the same run, column truncation, or NOT NULL violations on columns populated only by database defaults. Post-migration queries (permission contexts, access controls, automation tasks) are skipped in dry-run mode.

🛠️ Development
--------------

[](#️-development)

### Quick Start

[](#quick-start)

```
# Install dependencies
composer install

# Run tests
composer test

# Run code quality checks
composer lint

# Auto-fix code style
composer fix
```

### Testing

[](#testing)

This bundle uses functional tests with JSON baseline comparison to validate migration correctness.

See **[docs/TESTING.md](docs/TESTING.md)** for comprehensive documentation:

- Test infrastructure and architecture
- How baseline comparison works
- Adding new test content to Sulu 2.6
- Updating Sulu 3.0 target schema
- Regenerating baselines

❤️ Support and Contributions
----------------------------

[](#️-support-and-contributions)

The Sulu content management system is a **community-driven open source project** backed by various partner companies. We are committed to a fully transparent development process and **highly appreciate any contributions**.

In case you have questions, we are happy to welcome you in our official [Slack channel](https://sulu.io/services-and-support). If you found a bug or miss a specific feature, feel free to **file a new issue** with a respective title and description on the [sulu/SuluPHPCRMigrationBundle](https://github.com/sulu/SuluPHPCRMigrationBundle) repository.

📘 License
---------

[](#-license)

The Sulu content management system is released under the under terms of the [MIT License](LICENSE).

###  Health Score

53

—

FairBetter than 96% of packages

Maintenance94

Actively maintained with recent releases

Popularity33

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 74.6% 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 ~48 days

Recently: every ~27 days

Total

10

Last Release

10d ago

PHP version history (2 changes)1.0.0-alpha1PHP ^8.1

1.0.0-RC1PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/5dbafb2ec00aab7a9f476cf2dd77f63923acfda214ec7bf728c662a9e88f39c7?d=identicon)[chirimoya](/maintainers/chirimoya)

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

![](https://avatars.githubusercontent.com/u/1698337?v=4)[Alexander Schranz](/maintainers/alexander-schranz)[@alexander-schranz](https://github.com/alexander-schranz)

![](https://avatars.githubusercontent.com/u/25978473?v=4)[Prokyonn](/maintainers/Prokyonn)[@Prokyonn](https://github.com/Prokyonn)

---

Top Contributors

[![Prokyonn](https://avatars.githubusercontent.com/u/25978473?v=4)](https://github.com/Prokyonn "Prokyonn (88 commits)")[![martinlagler](https://avatars.githubusercontent.com/u/24388840?v=4)](https://github.com/martinlagler "martinlagler (12 commits)")[![wachterjohannes](https://avatars.githubusercontent.com/u/1464615?v=4)](https://github.com/wachterjohannes "wachterjohannes (8 commits)")[![alexander-schranz](https://avatars.githubusercontent.com/u/1698337?v=4)](https://github.com/alexander-schranz "alexander-schranz (6 commits)")[![mamazu](https://avatars.githubusercontent.com/u/14860264?v=4)](https://github.com/mamazu "mamazu (3 commits)")[![benr77](https://avatars.githubusercontent.com/u/2156742?v=4)](https://github.com/benr77 "benr77 (1 commits)")

---

Tags

migrationsuluphpcrcontent-bundle

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Type Coverage Yes

### Embed Badge

![Health badge](/badges/sulu-phpcr-migration-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/sulu-phpcr-migration-bundle/health.svg)](https://phpackages.com/packages/sulu-phpcr-migration-bundle)
```

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M388](/packages/easycorp-easyadmin-bundle)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1616.4k14](/packages/2lenet-crudit-bundle)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9421.6k61](/packages/open-dxp-opendxp)

PHPackages © 2026

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