elao/mce-media-bundle
Symfony bundle integrating TinyMCE Image Manager/File Manager. Adds an “asset” input type with upload button, image preview, and stored path. Supports configurable labels/icons/sizes plus external authentication and role/secret key access control.
Flysystem, Swiftmailer). Laravel’s Storage facade or Spatie Media Library would need alignment for file/image management.filemanager, imagemanager) are incompatible with modern TinyMCE 5/6 APIs. A plugin migration or custom bridge (e.g., using TinyMCE’s plugins config) would be required.routing component must be replaced with Laravel’s Route service provider.SecurityContext) must map to Laravel’s Auth or Gate system.EntityManager) would need Eloquent equivalents or a data mapper pattern.| Risk Area | Severity | Mitigation |
|---|---|---|
| TinyMCE Version Incompatibility | High | Rewrite plugins or use a compatibility layer (e.g., tinymce/tinymce npm package). |
| Symfony-Laravel Abstraction | Medium | Create adapter classes for DI, routing, and auth. |
| Deprecated Dependencies | Medium | Replace Symfony 2.x components with Laravel equivalents (e.g., Psr-15 middleware). |
| No Active Maintenance | High | Fork the repo or build a minimal viable integration. |
| File/Image Storage Assumptions | Medium | Standardize on Laravel’s Storage facade or Spatie Media Library. |
Storage is critical.tinymce-image-upload) that could replace this bundle?Events service provider can substitute.tinymce/tinymce (npm) for v5/6, or polyfill v4 plugins via custom JS.Flysystem with Laravel’s Storage or Spatie Media Library.SecurityContext to Laravel’s Auth::user() or Gate policies.Route::get() or API routes.| Symfony Component | Laravel Equivalent |
|---|---|
Doctrine EntityManager |
Eloquent ORM (App\Models\Media) |
Swiftmailer |
Laravel’s Mail facade |
Symfony EventDispatcher |
Laravel’s Event service provider |
Twig |
Blade templates or Laravel’s view layer |
tinymce/tinymce).filemanager/imagemanager plugins with:
/api/upload) using Laravel’s FormRequest.fetch() or Axios.config/tinymce.php).MceMediaBundle services to Laravel’s container.// app/Providers/MceMediaServiceProvider.php
public function register() {
$this->app->singleton('mce.media.manager', function () {
return new LaravelMediaManager(); // Custom implementation
});
}
Storage::disk() or Spatie Media Library.// routes/api.php
Route::post('/upload', [MediaController::class, 'upload']);
filemanager/imagemanager plugins are TinyMCE 4.x-specific. Solutions:
Plugin API.MceMediaManager) will require wrapper classes to abstract Symfony dependencies.id, url, mime_type).Storage.MceMediaBundle services.Doctrine, Swiftmailer) add unnecessary overhead in a Laravel stack.Spatie Media Library or custom solutions for long-term viability.SecurityContext) will require cross-stack debugging.telescope, laravel-debugbar) for logging and monitoring.laravel-queue) for scalability.mime_type, user_id).Storage facade.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| TinyMCE Plugin JS Errors | Broken editor UI | Fallback to basic TinyMCE config; log errors via Sentry. |
| File Upload Failures | Corrupted media | Validate uploads with Validator; use Storage::put() with checksums. |
| Symfony-Laravel Service Collision |
How can I help you explore Laravel packages today?