- Is anfallnorr/file-manager-system a Laravel package or a Symfony bundle?
- It is a Symfony bundle, not a Laravel package. It registers through config/bundles.php, uses Symfony attribute routing and AssetMapper, and assumes Twig for its UI. Laravel's container, routing, asset pipeline and Blade stack are different, so it does not drop into a Laravel app natively.
- Can I install anfallnorr/file-manager-system in a Laravel application?
- Composer will install it, but nothing will be auto-discovered the way Laravel packages are, because there is no Laravel service provider. You would need a wrapper service that instantiates FileManagerService and adapts Symfony dependencies such as RequestStack and session handling. Expect to rewrite routes, replace AssetMapper paths with Laravel's asset helper or Vite, and port any Twig templates.
- How do I install and register the FileManagerSystem bundle?
- Run composer require anfallnorr/file-manager-system, then add Anfallnorr\FileManagerSystem\FileManagerSystem::class => ['all' => true] to config/bundles.php. If you want the built-in controller and assets, also create config/packages/file_manager_system.yaml with the asset_mapper paths pointing at the bundle's assets directory. Then add config/routes/file_manager_system.yaml loading the bundle's Controller directory with type attribute and a prefix such as /files-manager.
- How does the per-session navigation state work in this file manager bundle?
- The bundle is stateful: it keeps a navigation context such as the current directory and browsing state across requests. That state is isolated per user session, so two users browsing at the same time do not see or affect each other's file system context. In Laravel you would need to make sure that state maps onto Laravel's session rather than Symfony's RequestStack-based session access.
- How do I list directories with depth limits and exclusions?
- The getDirs method accepts a path, an excludeDir value, and options for depth control and relative paths, so you can limit how deep the traversal goes and skip directories you never want exposed. It returns directory listings you can render in your own UI or controller. Absolute, Unix-like paths are expected, which matters if you normally work through Laravel's Storage facade.
- Does it handle MIME types and image resizing?
- Yes, MIME type detection and image resizing are part of the bundle's core feature set alongside create, delete, move and copy operations. In a Laravel codebase the pragmatic path is usually to reuse those ideas rather than the bundle itself. Equivalent native tooling exists: intervention/image for resizing and symfony/mime or a small MIME library for type detection.
- What PHP version does anfallnorr/file-manager-system require?
- The technical evaluation notes the bundle targets PHP 8.4. That is not a blocker for modern Laravel, since Laravel 10 and later support PHP 8.4, but older applications on PHP 8.1 or 8.2 cannot run it. Check the composer.json constraints before planning any integration work.
- How do I set or change the default upload directory?
- Inject FileManagerService and call setDefaultDirectory with an absolute path such as /var/uploads, then read it back with getDefaultDirectory. The setter is chainable, so you can configure it in a constructor or a service wrapper. Paths are treated as absolute, Unix-like locations rather than Laravel disk names, so translate Storage::disk('public')->path() results before passing them in.
- What are the Laravel alternatives to this Symfony file manager bundle?
- For most Laravel projects, spatie/laravel-medialibrary or a thin wrapper around Illuminate\Filesystem\Filesystem and the Storage facade covers listing, moving and deleting files. intervention/image handles resizing, and symfony/mime or mime-type covers MIME detection. These are maintained for Laravel specifically, avoid Symfony dependency conflicts, and work with Laravel's disk abstraction instead of hardcoded absolute paths.
- Is it safe to point this file manager at a production directory?
- Be conservative: point it at a dedicated uploads directory, never at your project root, and use the exclusion option to keep vendor, config, storage keys and .env out of reach. Since the bundle operates on real absolute paths rather than a disk abstraction, a path mistake exposes the actual server filesystem. Session isolation protects each user's browsing context, but it is not a substitute for authorization checks around the controller routes.