jldev / ibexa-enhanced-migrations
Additional features that improve the native ibexa migrations bundle.
Package info
github.com/jlecocq/ibexa-enhanced-migrations
pkg:composer/jldev/ibexa-enhanced-migrations
1.0.4
2026-01-23 11:22 UTC
Requires
- php: ^7.4 || ^8.0
- ibexa/migrations: >= 4.6.0
README
This bundle provides additional migration features to the native Ibexa DXP migrations bundle (available in ibexa content, ibexa experience and ibexa commerce). It is compatible with Ibexa 4.x and 5.x.
Installation
composer require jldev/ibexa-enhanced-migrations:^1.0.0
Make sure the bundle is enabled in your config/bundles.php file:
JL\IbexaEnhancedMigrations\IbexaEnhancedMigrationsBundle::class => ['all' => true],
Features
Custom functions that can be used in migration files (official documentation):
content_id_from_content_remote_id("remote_id"): load a content by remote id and return its idlocation_id_from_content_remote_id("remote_id"): load a content by remote id and return its main location idlocation_path_string_from_content_remote_id("remote_id"): load a content by remote id and return its main location path stringcontent_id_from_location_remote_id("remote_id"): load a location by remote id and return its content idlocation_id_from_location_remote_id("remote_id"): load a location by remote id and return its location idlocation_path_string_from_location_remote_id("remote_id"): load a location by remote id and return its path stringsection_id_from_section_identifier("section_identifier"): load a section by identifier and return its idcontent_id_from_user_login("login"): load a user by login and return its idcontent_remote_id_from_user_login("login"): load a user by login and return its content remote idlocation_id_from_user_login("login"): load a user by id and return its main location idlocation_remote_id_from_user_login("login"): load a user by id and return its main location remote idlocation_remote_id_from_content_remote_id("remote_id"): load a content by remote id and return its main location remote idcontent_remote_id_from_location_remote_id("remote_id"): load a location by remote id and return its content remote idcontent_id_from_content_name("name"): load a content by name and return its id (triggers an exception if name is not unique)
Example of usage in a migration file:
-
type: role
mode: update
match:
field: identifier
value: 'Anonymous'
policies:
mode: append
list:
-
module: content
function: read
limitations:
- { identifier: Node, values: [ '###XXX location_id_from_content_remote_id("my_remote_id") XXX###' ] }