bengor-file/symfony-filesystem-bridge
Adapter bridge that makes BenGorFile/File objects compatible with Symfony’s Filesystem component. Install via Composer and use Symfony Filesystem operations while keeping the File library’s domain model. Includes PHPSpec test suite.
Symfony\Component\Filesystem) into a Laravel/PHP project that relies on a custom File class (e.g., from the BenGorFile/File library). This enables consistency in file operations (e.g., copying, moving, deleting) across microservices or monolithic apps where Symfony components are already used.Filesystem::mirror(), Filesystem::remove()) without rewriting existing File-based logic. Useful for teams transitioning from Laravel’s native filesystem helpers to Symfony’s ecosystem.BenGorFile/File and needs Symfony compatibility. Build only if the adapter’s limitations (e.g., lack of active maintenance) require custom extensions.File instances.BenGorFile/File and needs Symfony’s filesystem abstraction for consistency or advanced features.Filesystem component (if migrating fully to Symfony).Illuminate\Filesystem\Filesystem (if staying in Laravel).For Executives: "This lightweight adapter lets us reuse Symfony’s battle-tested filesystem tools (e.g., recursive directory operations, atomic moves) in our Laravel backend without rewriting core logic. It’s a low-risk way to standardize file handling across our hybrid stack, reducing technical debt during our migration to Symfony. The MIT license avoids legal friction, and the minimal overhead means we can pilot it in non-critical paths first."
For Engineering:
*"The SymfonyFilesystemBridge lets us wrap BenGorFile/File instances in Symfony’s Filesystem interface, enabling features like mirror() or remove() with zero changes to existing File usage. Key trade-offs:
For Developers: *"To integrate:
composer require bengor-file/symfony-filesystem-bridge.File instance: $symfonyFilesystem = new \BenGorFile\SymfonyFilesystemBridge\Adapter($yourFileInstance).$symfonyFilesystem->mirror('/source', '/dest').
Watch for: Potential deprecations in Symfony’s filesystem API if we upgrade later. Test thoroughly with your File library’s edge cases."*How can I help you explore Laravel packages today?