Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Media Bundle

Media Bundle Laravel Package

phpmob/media-bundle

Symfony bundle configuring media storage via a PHPCR-backed Flysystem filesystem. Provides ready-to-import YAML config and supports overriding the PHPCR UTF-8 connection parameter for media storage.

View on GitHub
Deep Wiki
Context7

At a glance

Frequently asked questions about Media Bundle
Does phpmob/media-bundle work with Laravel 10 or PHP 8.2+?
No, the package hasn’t been updated since 2019 and likely conflicts with Laravel 10+ or PHP 8.2+ due to deprecated functions (e.g., `create_function`) and missing `strict_types`. Test thoroughly or fork the repo to patch compatibility.
How do I configure PHPCR storage for media files?
Edit `app/config/config.yml` to import the bundle’s YAML configs (`@PhpMobMediaBundle/Resources/config/app/main.yml` and `phpcr.yml`), then override the `phpcr.connection` parameter to specify your PHPCR connection name (e.g., `media`). Ensure UTF-8 encoding is set for PHPCR.
Can I use this bundle with S3 or other Laravel filesystem disks?
Yes, the bundle leverages Laravel’s filesystem abstraction, so you can configure it to use any disk (S3, local, etc.) defined in `config/filesystems.php`. Just ensure the disk is registered before the bundle loads.
What’s the best way to handle media model associations in Eloquent?
The bundle likely integrates with Eloquent for media-model relationships, but since it’s outdated, you may need to manually define `belongsToMany` or `morphTo` associations. Check the bundle’s documentation for model binding examples or extend it with custom traits.
Are there alternatives to phpmob/media-bundle for Laravel media management?
Yes, consider modern alternatives like `spatie/laravel-medialibrary` (actively maintained, supports Laravel 10+) or `intervention/image` for processing. These offer better long-term support, dynamic disk switching, and Laravel conventions.
How do I generate thumbnails or process media files?
The bundle supports thumbnail generation and resizing, but its processing pipeline may use outdated PHP GD/Imagick methods. Test with your media types, or replace the logic with a modern library like `intervention/image` wrapped in a service provider.
What security risks should I watch for with this bundle?
The 2019 codebase may lack CSRF protection for uploads, file type validation, or secure storage permissions. Mitigate risks by adding custom middleware (e.g., `VerifyCsrfToken` for upload routes) and validating file types server-side before processing.
Can I migrate existing media files to this bundle’s storage?
Yes, create a data migration to copy existing files to the new PHPCR-backed filesystem. Use Laravel’s filesystem methods to move files and update database records with new paths. Test with a backup first.
How do I override the bundle’s default YAML configuration?
Extend the bundle’s YAML configs by importing them in your `config.yml` and overriding parameters after the `imports` section. For example, override `phpmob.flysystem.phpcr.connection` to point to a custom PHPCR connection.
What’s the performance impact of using PHPCR for media storage?
PHPCR (Jackrabbit) can introduce latency for large-scale media operations, especially with synchronous thumbnail generation. Benchmark with your expected workload, or consider caching strategies (e.g., Redis) for frequently accessed media.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky