ibexa/rector
Rector rule sets for upgrading Ibexa DXP projects between versions. Install as a dev dependency, add an ibexa set (e.g., IBEXA_50) to rector.php, and run Rector to automatically refactor code for the target Ibexa release.
ezplatform bundles, legacy eZ Publish code), accelerating onboarding and reducing context-switching for new hires.ezpublish services, ezplatform-admin-ui patterns).ezpublish services → Symfony DI).ezplatform → ibexa namespace).rector/rector, php-cs-fixer, or laravel-shift/rector).*"This tool eliminates the bottleneck of manual Ibexa DXP upgrades, which historically take months and require specialized contractors. By automating 90% of the refactoring—like updating deprecated APIs or migrating bundles—we’ll:
Think of it as ‘autopilot for Ibexa migrations’: A one-time investment that pays dividends every time we upgrade. For example, migrating from Ibexa 4.x to 5.0 would cost $50K+ in consulting—this tool does it for $0 in dev time after setup."*
Key Outcomes:
| Metric | Impact |
|---|---|
| Migration Speed | 80% faster upgrades |
| Cost Savings | $50K–$100K/upgrade avoided |
| Developer Productivity | 50% less time on manual fixes |
| Risk Reduction | Fewer breaking changes in PRs |
*"Ibexa Rector lets us automate Ibexa-specific refactoring using Rector’s rule engine, targeting:
ezpublish → Symfony DI, Twig filter deprecations).ezplatform bundle calls).Why This Over Alternatives:
ezplatform-admin-ui or ezpublish services that generic tools miss.Proposal:
Trade-offs:
Next Steps:
rector.php and test against a sample Ibexa project.*"This is like artisan migrate but for your Ibexa code. Instead of manually updating every:
ezpublish service call → Symfony DI container,ezplatform bundle reference → ibexa namespace,Just run:
composer require --dev ibexa/rector
./vendor/bin/rector process src/ --dry-run
How to Use It:
rector.php:
return RectorConfig::configure()
->withPaths([__DIR__.'/src', __DIR__.'/tests'])
->withSets([IbexaSetList::IBEXA_50]); // Target Ibexa 5.0
./vendor/bin/rector process src/ --dry-run # Preview changes
./vendor/bin/rector process src/ # Auto-fix
Pro Tips:
--parallel for faster runs on large codebases.phpstan for static analysis post-refactor.composer.json scripts:
"scripts": {
"rector": "rector process src/"
}
Works Great With:
ezplatform bundles.ibexa/laravel-bridge)."**"This tool integrates seamlessly into CI/CD pipelines to enforce Ibexa code standards. Here’s how to deploy it:
- name: Run Ibexa Rector
run: vendor/bin/rector process src/ --level=strict
rector:
stage: test
script:
- composer require --dev ibexa/rector
- ./vendor/bin/rector process src/ --dry-run
RECTOR_CHANGES.md file for review.Why This Matters:
Next Steps:
php-cs-fixer workflow as a parallel stepHow can I help you explore Laravel packages today?