- What is gaufrette/extras used for?
- It adds practical utilities to Gaufrette, the PHP filesystem abstraction library. Its main feature is a resolvable filesystem wrapper that maps stored paths to public URLs through adapter-agnostic resolvers. It is most useful in existing Gaufrette-based applications that need consistent URL resolution across local or remote storage. It is not a native Laravel storage layer.
- Does gaufrette/extras work with Laravel Storage?
- Not natively. Laravel Storage is built on Flysystem, while gaufrette/extras extends Gaufrette, so the two abstractions do not share the same filesystem API. You would need a manual bridge or adaptor layer. For greenfield Laravel work, use Laravel Storage or Flysystem and implement resolution logic internally.
- How do I install gaufrette/extras in a Laravel app?
- Installation is through Composer as a normal PHP dependency, but integration is manual. There is no Laravel service provider or framework-native configuration in the package. You must wire the Gaufrette filesystem and resolver yourself. Audit Composer constraints first because the package may conflict with modern PHP, Laravel, or Gaufrette versions.
- Which Laravel and PHP versions does gaufrette/extras support?
- The available context does not define modern Laravel or PHP support. The last release was in 2017, so constraints likely target PHP 7-era dependencies and may not work with PHP 8+, Laravel 9, 10, or 11. Run a compatibility spike and dependency audit before adopting. Do not assume the old release is production-safe on current runtimes.
- How does ResolvableFilesystem resolve a path to a URL?
- ResolvableFilesystem wraps a Gaufrette filesystem and delegates path-to-URL mapping to a custom resolver. The wrapper is adapter-agnostic, so local and remote backends can share the same resolution contract. Actual behavior depends on the resolver you provide. Test missing filesystems, invalid paths, and unauthorized resolver results explicitly.
- Can gaufrette/extras resolve URLs for S3 or other remote storage?
- The package is adapter-agnostic and supports custom resolvers for local and remote storage. Whether S3 or another backend works depends on the underlying Gaufrette adapter and the resolver you implement. It does not provide Laravel-native cloud disk configuration. You remain responsible for credentials, URL signing, and access boundaries.
- Is gaufrette/extras maintained and safe for production?
- Maintenance is effectively absent, with the last release in 2017, low adoption, and an unknown repository. The main risk is lifecycle risk rather than complexity: stale dependencies, missing security patches, PHP incompatibility, and unclear ownership. Treat it as a tactical legacy bridge only. Do not put it in a critical storage path without a fork, ownership plan, and security review.
- What are the best alternatives to gaufrette/extras for Laravel?
- For new Laravel applications, use Laravel Storage or Flysystem directly and implement dynamic filesystem resolution as an internal service. If the app already depends on Gaufrette, wrap Gaufrette-specific code behind an internal interface such as FilesystemResolver. That preserves an exit path to Laravel Storage or Flysystem. The equivalent resolver behavior is usually small enough to own internally.
- How should I test a Gaufrette resolvable filesystem integration?
- Test the resolver contract, path-to-URL output, missing filesystems, invalid paths, backend selection, and unauthorized resolver returns. Keep Gaufrette-specific code in one adapter module and cover it with focused integration tests. Compare results against a small Laravel Storage or Flysystem implementation. Also test Composer resolution on the target PHP and Laravel versions.
- Can I replace gaufrette/extras with Laravel Storage or Flysystem?
- Yes, especially for greenfield Laravel work. Implement the same dynamic filesystem or URL resolution behavior around Laravel Storage or Flysystem, then keep any Gaufrette compatibility code behind an internal interface. This avoids taking a stale dependency into new code. If you must support legacy Gaufrette backends, treat the package as a bridge and plan the replacement.