- Can I use ezsystems/ezpublish-kernel directly in a Laravel project without Symfony?
- No, this package is tightly coupled with Symfony’s framework components like Dependency Injection and EventDispatcher. Laravel’s service container is incompatible, so you’d need to bridge Symfony into Laravel (e.g., via `symfony/bridge`) or treat eZ Publish as a separate microservice. Direct integration risks dependency conflicts and architectural mismatches.
- What Laravel versions support ezsystems/ezpublish-kernel via Symfony bridge?
- The package itself doesn’t enforce Laravel version constraints, but compatibility depends on the Symfony bridge (e.g., `symfony/bridge` v5.x+ for Laravel 8/9). Test thoroughly—Laravel’s autoloading and service providers may clash with Symfony’s kernel bootstrapping. Aim for Laravel 8+ with PHP 8.0+ for stability.
- How do I migrate existing eZ Platform content to Laravel without the kernel?
- Avoid the kernel for greenfield Laravel projects. Instead, export eZ content as JSON/XML via its REST API or database dumps, then import into Laravel using Eloquent or a package like `spatie/laravel-export`. For real-time sync, consider a cron job or GraphQL layer (e.g., eZ’s API → Laravel’s GraphQL with `nesbot/carbon` for scheduling).
- What’s the best way to use eZ Publish’s ContentRepository in Laravel without bloating the app?
- Run eZ Publish and Laravel as separate services, then consume eZ’s REST API (e.g., `ezsystems/ezplatform-rest`) from Laravel using Guzzle or HTTP clients. This keeps Laravel lean but adds latency. For low-latency needs, use a database view or read replica to sync eZ’s `ezcontentobject` tables into Laravel’s MySQL, but expect eventual consistency.
- Are there Laravel alternatives to eZ Publish’s content modeling for enterprise apps?
- Yes. For structured content, consider `spatie/laravel-media-library` (for assets) + a headless CMS like Strapi or Contentful (API-driven). For relational content, Laravel’s Eloquent with `spatie/laravel-activitylog` or `orchid/software` for admin panels. If you need eZ’s workflows, evaluate `spatie/laravel-permission` + custom state machines.
- How do I handle authentication between Laravel and eZ Publish when using the kernel?
- If bridging Symfony into Laravel, use eZ’s Symfony Security component (e.g., `ezsystems/ezplatform-security`) and map it to Laravel’s Auth system via a custom guard. Alternatively, implement OAuth2/JWT between services (e.g., Laravel Passport + eZ’s OAuth provider). Avoid mixing session handlers—stick to token-based auth for microservices.
- Will ezsystems/ezpublish-kernel work in Laravel Forge or shared hosting?
- Unlikely without heavy customization. The kernel requires Symfony’s full stack (e.g., `symfony/http-kernel`), which may conflict with Laravel’s autoloader or PHP extensions. Shared hosting often lacks required extensions (e.g., `pdo_sqlite`, `intl`). For production, use a VPS with Docker to isolate Symfony/Laravel services or deploy eZ separately.
- Can I use Blade templates with eZ Publish content fetched via the kernel?
- Indirectly, but not natively. Fetch eZ content via REST API or database views, then pass it to Blade templates. Avoid templating inside the kernel—Symfony’s Twig will conflict with Laravel’s Blade. For dynamic rendering, use Laravel’s `@include` or a service like `spatie/laravel-view-models` to structure data before passing to Blade.
- How do I test Laravel routes that depend on ezsystems/ezpublish-kernel?
- Mock the kernel’s dependencies (e.g., `ContentRepository`, `SearchService`) using PHPUnit’s `createMock()`. Avoid testing Symfony’s routing directly—wrap eZ logic in Laravel controllers/middleware and test those layers. For API tests, use Laravel’s `Http::fake()` to mock eZ’s REST endpoints if not using the kernel directly.
- Is ezsystems/ezpublish-kernel actively maintained for Laravel integration?
- The package itself is maintained by eZ Systems for eZ Platform, but Laravel integration is unsupported. The Symfony bridge approach is community-driven. Check GitHub issues for updates, but expect limited fixes for Laravel-specific conflicts. For long-term projects, consider forking or rewriting critical components (e.g., a lightweight Doctrine-to-Eloquent adapter).