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

Filesystem Laravel Package

phpdocumentor/filesystem

Lightweight filesystem utilities from phpDocumentor: path handling, directory/file discovery, and convenience helpers for interacting with the local filesystem. Useful as a small dependency for tools that need consistent file operations and traversal.

View on GitHub
Deep Wiki
Context7

Getting Started

This package is effectively obsolete—do not start new projects with it. With only 1 star, no public repository, and no maintenance since ~2016, it predates modern PHP filesystem standards. If you inherit code using it (e.g., in legacy phpDocumentor v2 tooling), identify usage via phpdocumentor\filesystem\File:: calls. The API is minimal: likely static methods like File::getContent($path) and File::putContent($path, $content)—redundant with PHP’s native file_get_contents()/file_put_contents() and far less robust than Laravel’s File::get()/File::put().

Implementation Patterns

  • Avoid entirely: No legitimate use case justifies adopting this today. Laravel’s Illuminate\Filesystem (backed by Symfony’s Filesystem component) offers superior reliability, PSR-14 integration, and active maintenance.
  • Migration path only: If upgrading legacy docs tooling, replace phpdocumentor/filesystem with:
    // Laravel (recommended)
    \Illuminate\Support\Facades\File::put($path, $content);
    \Illuminate\Support\Facades\File::copy($from, $to);
    
    // Or Symfony directly (if decoupled)
    use Symfony\Component\Filesystem\Filesystem;
    $fs = new Filesystem();
    $fs->copy($from, $to, $overwrite = true);
    
  • No integration points: It lacks service providers, facades, config files, or test doubles—manual wrappers would add technical debt.

Gotchas and Tips

  • ⚠️ Critical deprecation: No PHP 8+ compatibility confirmed. Likely crashes on type declarations or strict return types.
  • ⚠️ Broken error handling: Methods probably suppress errors or return false without exceptions—debugging requires manual error_get_last() inspection.
  • ⚠️ Zero test coverage: Edge cases (race conditions, symlinks, non-UTF-8 paths) are untested and may corrupt data silently.
  • No extension hooks: Static methods with no interfaces or events—can’t mock in tests without dependency injection (which the package doesn’t support).
  • Debug workflow:
    1. Run grep -r "phpdocumentor\\\\filesystem" app/ to locate legacy calls.
    2. Replace en masse with Laravel’s File facade or symfony/filesystem.
    3. Audit permission handling—older code often assumes world-readable/writable paths.
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.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport