dovstone/symfony-blog-admin-bundle-mongodb-based
The package is Symfony-based (not Laravel-native), posing immediate compatibility risks for Laravel projects. Key misalignments include:
Bundle structure (e.g., DependencyInjection, EventDispatcher), which requires Laravel-specific wrappers (e.g., SymfonyBridge or manual service binding). Laravel’s service container and autowiring may reject Symfony’s ContainerAware interfaces without adaptation.doctrine/mongodb-odm), conflicting with Laravel’s Eloquent/Query Builder. Integration would require:
jenssegers/mongodb for Laravel), adding complexity.register()/boot() methods for Laravel’s AppServiceProvider.EventListener may not integrate with Laravel’s Handle middleware.YamlRouteLoader vs. Laravel’s RouteServiceProvider.spatie/laravel-medialibrary for media, spatie/laravel-permission for auth).Container expects PSR-11; Symfony’s ContainerInterface requires adapters (e.g., symfony/dependency-injection → illuminate/container).EventDispatcher must be bound to Laravel’s Events facade or replaced with Illuminate\Events\Dispatcher.config/packages/*.yaml; Laravel expects config/services.php or php artisan vendor:publish.MongoModel extending Illuminate\Database\Eloquent\Model).HttpTests, DatabaseMigrations). Integration tests would need mocking of:
Illuminate\Foundation\Application.Illuminate\Routing\Router.throttle middleware).Container + MongoDB’s BSON serialization.EventDispatcher → Illuminate\Events).Bundle structure.spatie/laravel-activitylog for auditing, spatie/laravel-permission for auth)?composer why symfony/* to audit.)EventDispatcher be replaced with Laravel’s Events without breaking functionality?YamlRouteLoader) be merged with Laravel’s router?jenssegers/mongodb)?laravel-queue) for async MongoDB operations?.env?Pest) mock Symfony components (e.g., Container)?DependencyInjection may conflict with Laravel 10’s improved autowiring.HttpFoundation (e.g., Request, Response) may require adapters (e.g., symfony/http-foundation-bridge).mongodb PHP extension (for MongoDB ODM).symfony/* extensions (e.g., yaml, event-dispatcher).intl, gd) could break Symfony’s utilities.doctrine/mongodb-odm compatibility).mysql/pgsql connections.Container with Laravel’s Illuminate\Container\Container.EventDispatcher → Illuminate\Events\Dispatcher).Post, Comment) via custom repositories.EventDispatcher with Laravel’s Events.config/packages/*.yaml to Laravel’s config/services.php.config/database.php:
'connections' => [
'mongodb' => [
'driver' => 'mongodb',
'host' => env('DB_MONGODB_HOST', '127.0.0.1'),
'database' => env('DB_MONGODB_DATABASE', 'blog'),
],
],
jenssegers/mongodb for Laravel-Eloquent compatibility:
use Jenssegers\Mongodb\Eloquent\Model as EloquentModel;
class Post extends EloquentModel { ... }
DatabaseSeeder (not Symfony’s Fixtures).EventListener must be converted to Laravel’s Handle middleware:
// Symfony (original)
class PostListener implements EventSubscriberInterface {
public static function getSubscribedEvents() { ... }
}
// Laravel (adapted)
class PostListener {
public function handle(PostEvent $event) { ... }
}
YamlRouteLoader with Laravel’s RouteServiceProvider:
Route::prefix('admin')->group(function () {
Route::resource('posts', PostController::class);
});
Events facade:
// In AppServiceProvider
Event::listen('post.created', function ($post) {
// Laravel logic
});
trans() instead of Symfony’s Translator.composer why symfony/* and composer why mongodb/*.How can I help you explore Laravel packages today?