vardumper / ibexa-automatic-migrations-bundle
Ibexa automatic migrations bundle eliminates the need to manually create migrations for various admin changes. Migration files are automatically generated when settings change in the admin panel.
Package info
github.com/vardumper/IbexaAutomaticMigrationsBundle
Type:symfony-bundle
pkg:composer/vardumper/ibexa-automatic-migrations-bundle
Requires
- php: >=8.1
- guzzlehttp/promises: ^2.3
- ibexa/admin-ui: ^4.4|^5.0.4
- ibexa/core: ^4.4|^5.0.4
- nyholm/psr7: ^1.8.2
Requires (Dev)
- brainmaestro/composer-git-hooks: dev-master
- friendsofphp/php-cs-fixer: ^3.92.3
- mrk-te/ibexa-migration-bundle2: ^1.0|^2.0|^3.0
- pestphp/pest: *
- phpstan/phpstan: ^2.1.33
- rector/swiss-knife: ^2.3.3
- symplify/easy-coding-standard: ^13.0
README
|
|
|
IbexaAutomaticMigrationsBundle
This is a bundle for Ibexa DXP. It automatically creates migrations for content types and content type groups.
The goal is to eliminate the need to manually create migrations or test them – instead have Ibexa auto-generate them for us whenever content types change.
Migrations are created in the default locations (in src/Migrations/Ibexa/migrations when using ibexa/migrations or in src/MigrationsDefinitions when using kaliop, tanoconsulting, mrk-te open source migration bundle).
Requirements
- Ibexa DXP >= v5.0
- Ibexa DXP >= v4.4 (untested)
- A migrations bundle if using Ibexa OSS
Features
- Automatically create migrations when changes are made in the admin panel
- Supports Ibexa DXP v5.x Headless, Experience and Commerce editions via
ibexa/migrations - Supports Ibexa DXP v5.x. Open Source Edition via
mrk-te/ibexa-migration-bundle2
Supported Types of Migrations
- Content Type Group
- Content Type
- Language
- Object State Group
- Object State
- Role
- Section
- URL Wildcards
- URL Manager
Installation
1. Install the bundle
composer require vardumper/ibexa-automatic-migrations-bundle:dev-main
2. Register the bundle in your config/bundles.php:
Remember that even though you activate this bundle for all to activate this bundle for all environments, only when APP_ENV is set to dev it will create migration files.
To configure which kind of migration files will be created, head to Admin > Migrations > Settings, make changes and save the Bundle settings.
return [ // ... vardumper\IbexaAutomaticMigrationsBundle\IbexaAutomaticMigrationsBundle::class => ['all' => true], ];
Register the backend controller. Create a file called config/routes/dev/ibexa_automatic_migrations.yaml with this content:
ibexa_automatic_migrations: resource: '@IbexaAutomaticMigrationsBundle/src/Controller/' type: attribute
Testing
This bundle uses Pest for testing.
Running Tests
First, install the development dependencies:
composer install --dev
Then run the tests:
./vendor/bin/pest
Coverage Report
You can also generate a coverage report by running the following command.
XDEBUG_MODE=coverage vendor/bin/pest --coverage-html=coverage-report
Roadmap
- Allow admins to execute pending migrations in the admin panel
- Support more types of migrations, not only content types are relevant, but Languages, Sections, etc.
- Determine or allow configuring which Migration Bundle one wants to use (if kaliop and ibexa bundles are installed)