Container vs. Laravel’s Illuminate\Container.HttpKernel vs. Laravel’s Router.EventDispatcher vs. Laravel’s Events facade.Validator vs. Laravel’s Validator (though similar, integration requires adapters).baks-dev/core (a private/undocumented dependency) is a major risk.baks-dev/core (≥7.4): This is a critical unknown. Without access to its source or public API, integration is high-risk. Possible scenarios:
doctrine/dbal or custom scripts).LifecycleCallbacks) with Laravel equivalents.--group=drom-products), but they are not publicly visible. Assess:
baks-dev/core (if tests pass without it, the package may be incomplete).| Risk Area | Severity | Description | Mitigation Strategy |
|---|---|---|---|
| Symfony-Laravel Integration | Critical | Bundle relies on Symfony components (DI, routing, events) incompatible with Laravel. | Build adapters for critical services (e.g., wrap EventDispatcher in Laravel’s Events). |
Undocumented baks-dev/core |
Critical | Private dependency with no public API; may contain hidden logic. | Fork the package and stub/mock core dependencies during POC. |
| Doctrine-Eloquent Conflict | High | Doctrine entities may not map cleanly to Eloquent. | Use hybrid approach: Keep DB schema via Doctrine but expose via Eloquent models. |
| Performance Overhead | Medium | Symfony’s DI and event systems may add latency. | Benchmark with/without bundle; optimize via Laravel’s service container. |
| Localization Lock-in | Medium | Russian-specific features (tax, payments) may not generalize. | Abstract compliance logic into strategy patterns for future localization. |
| Future Maintenance | High | 0 stars, no issues, and last release in 2026 (but repo appears new). | Fork immediately and contribute fixes upstream. |
| API Design | Medium | If the bundle includes REST endpoints, they may conflict with Laravel’s routing. | Prefix routes (e.g., /drom/products) or replace with Laravel controllers. |
baks-dev/core?
spatie/laravel-product, orchid/software, or webpatser/laravel-uuid for core features.doctrine/dbal, or must they be rewritten?baks-dev/core sub-licenses restrict use.| Layer | Technology | Notes |
|---|---|---|
| Backend | Laravel 10+ (PHP 8.4) | Use Laravel’s service container to replace Symfony DI. |
| ORM | Eloquent (with Doctrine DBAL fallback) | Map Doctrine entities to Eloquent; use raw queries for complex logic. |
| Routing | Laravel’s Route |
Replace Symfony routes with Laravel controllers. |
| Validation | Laravel’s Validator |
Adapt Symfony validators to Laravel’s rules. |
| Events | Laravel’s Events facade |
Wrap Symfony’s EventDispatcher in a Laravel listener. |
| Testing | Pest or PHPUnit | Replace Symfony test helpers with Laravel’s testing tools. |
| API | Laravel Sanctum/Passport | If the bundle includes APIs, rewrite endpoints with Laravel’s auth. |
Phase 0: Assessment (1 week)
baks-dev/core).Phase 1: Dependency Isolation (2 weeks)
baks-dev/core: Replace its calls with mocks or minimal implementations.// Mock baks-dev/core service
$this->app->singleton('baks.core.service', function () {
return new class {
public function calculateTax() { return 0; } // Stub
};
});
// app/Providers/SymfonyAdapterServiceProvider.php
public function register()
{
$this->app->singleton(SymfonyEventDispatcher::class, function () {
return new LaravelEventDispatcher(); // Custom adapter
});
}
Phase 2: Entity Mapping (2 weeks)
// app/Models/Product.php
class Product extends Model
{
protected $fillable = ['sku', 'name', 'price', 'seller_id'];
// Override bundle logic
public function variants()
{
return $this->hasMany(ProductVariant::class);
}
}
doctrine/dbal for schema migrations if needed.
composer require doctrine/dbal
Phase 3: API/Route Integration (1 week)
How can I help you explore Laravel packages today?