- Can I use oro/marketing in a Laravel project without Symfony?
- No, this package is built for Symfony/Oro applications and relies on Doctrine ORM, Symfony’s event system, and dependency injection. Laravel’s Eloquent and service container would require significant abstraction layers or forking to integrate, making it non-trivial for pure Laravel projects.
- What Laravel versions does oro/marketing support?
- It does not natively support Laravel. The package targets OroPlatform/OroCommerce/OroCRM (Symfony-based) and lacks Laravel-specific features like Eloquent, Scout, or Nova compatibility. You’d need to manually bridge components like events, routes, and templates.
- How do I install oro/marketing in a Laravel project?
- Add it via Composer as `oro/marketing:1.0.*`, but expect conflicts with Laravel’s dependencies (e.g., Doctrine vs. Eloquent). You’ll need to resolve Symfony-specific components (e.g., Twig templates, event listeners) via custom middleware or abstraction layers.
- Does oro/marketing work with Laravel’s Eloquent ORM?
- No, it uses Doctrine ORM exclusively. To use Eloquent, you’d need to rewrite all entities, repositories, and queries—effectively recreating the marketing logic from scratch or using a hybrid ORM like Laravel Doctrine.
- Are there Laravel alternatives for marketing segmentation?
- Yes, consider packages like **spatie/laravel-activitylog** for tracking, **spatie/laravel-permission** for role-based segmentation, or **laravel-marketing** (if available) for Laravel-native solutions. Oro’s strength is B2B workflows, but Laravel’s ecosystem leans toward simpler, frontend-friendly tools.
- Can I use oro/marketing’s API in Laravel?
- The API endpoints (e.g., `/api/marketingactivitytypes`) are Symfony-based and would need to be rewritten for Laravel’s routing (e.g., `routes/api.php`) or proxied via middleware. Authentication (Symfony’s security system) would also require integration with Laravel’s Sanctum/Passport.
- How do I handle Twig templates in Laravel?
- Oro uses Twig templates, which won’t work natively in Laravel. You’d need to either port them to Blade manually or use a bridge like **laravel-twig-bridge**, but this adds complexity and may break styling or logic tied to Symfony’s Twig extensions.
- What’s the maintenance effort for integrating oro/marketing?
- High. You’d need to abstract Symfony dependencies (DI, events, Doctrine), rewrite API routes, and adapt templates—all while ensuring compatibility with Laravel’s lifecycle (e.g., service providers, migrations). Major Oro updates may also force refactoring.
- Does oro/marketing support Laravel Scout for search?
- No, it relies on Symfony’s search abstractions (e.g., Oro’s custom solr/elasticsearch integrations). To use Scout, you’d need to build a separate search layer or replace Oro’s search logic entirely, which isn’t straightforward.
- What are the risks of using oro/marketing in production?
- Key risks include dependency conflicts (Symfony vs. Laravel), breaking changes during major versions (e.g., API path updates), and unclear licensing (NOASSERTION). Testing would require rewriting Symfony-focused unit/integration tests, and performance may differ due to Doctrine vs. Eloquent optimizations.