snce/ezpublish-legacy-utility-bundle
A Symfony bundle of utility helpers for integrating eZ Publish Legacy into modern applications. It provides services and tooling to bridge legacy content, templates, and APIs with Symfony, simplifying migration and day-to-day development for projects running eZ Publish Legacy alongside contemporary...
composer require snce/ezpublish-legacy-utility-bundle. The package is tagged GPL-2.0 and its last release is from February 2018, so pin an explicit constraint (^1.0 or the exact tag) and check its composer.json for PHP/eZ version requirements before upgrading other dependencies.ezpublish/EzPublishKernel.php inside registerBundles(). As with any eZ 5+ bundle, it must be registered in the kernel, not only in config.yml.DependencyInjection/ and Resources/config/ — these tell you which services and parameters the bundle exposes.README and any Resources/doc/ — small utility bundles usually document their helpers there rather than in code comments.Twig/ or Templating/ if present — that is where legacy-facing Twig extensions usually live.ezpublish_legacy.kernel service and run legacy calls inside its callback, rather than including legacy files manually. Typical example:$legacyKernel = $this->get('ezpublish_legacy.kernel');
$legacyKernel->runCallback(function () {
// eZContentObject, eZINI, eZUser, etc. are now available
return eZContentObject::fetch($id);
});
ezpublish_legacy.kernel->runCallback() in a small application service so controllers and commands do not depend on the raw kernel. This keeps the boundary between new and legacy code explicit and testable.eZSiteAccess::change(...) or the siteaccess resolved by the legacy kernel) before accessing INI or content. Utility bundles usually assume the kernel has already resolved the siteaccess.runCallback() and avoid sharing legacy globals across iterations.ezpublish_legacy.kernel / legacy routing setup, and treat this bundle's services as helpers layered on top. Check Resources/config/services.yml for aliases you can inject instead of fetching from the container.config.yml under its root key if it exposes one; otherwise its services are auto-wired by the standard extension. Keep environment-specific legacy paths/INI overrides in config_<env>.yml.composer why-not and check the bundle's requirements before upgrading the platform.runCallback() boots/uses the legacy kernel. Do not call it per item in a loop if you can batch; the overhead dominates for large imports and reports.$http, eZINI caches, current user). In long-running processes or tests, reset or reinitialize between requests; otherwise one request's siteaccess/user leaks into the next.php app/console cache:clear, or bin/console on newer setups) and the legacy cache (php bin/php/ezcache.php --clear-all or the legacy admin). A stale legacy cache hides config changes.ezpublish.debug and legacy DebugSettings together; a failing legacy call inside runCallback() often surfaces as a generic exception unless legacy debug output and logs are on. Check ezpublish/logs/ and the legacy var/log/ directory.services.yml (same service ID), or decorate them. Twig extensions can be replaced by registering your own with the same function names.How can I help you explore Laravel packages today?