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

Php Xdg Base Dir Laravel Package

dnoegel/php-xdg-base-dir

Lightweight PHP library to locate XDG Base Directory paths (config, data, cache, state, runtime) on Linux and other Unix-like systems. Provides a simple API to read environment variables and return the correct user/system directories per the XDG spec.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit is strong for Unix/Linux-based applications (CLI tools, server-side PHP apps) where XDG compliance is required. It avoids hardcoding paths and leverages standard environment variables, making it ideal for portable configurations. However, it has limited value for Windows-centric or web apps where XDG specs don’t apply. Integration feasibility is high due to dependency-free design, minimal API (single class with 3-4 methods), and straightforward Composer installation. Technical risks include the 2019 last release (potential unaddressed edge cases or PHP 8+ compatibility gaps) and lack of active maintenance (no GitHub repository listed, though 6k+ stars suggest historical usage). Key questions: Does the target OS strictly support XDG (e.g., no Windows dependencies)? Are there known issues in community reports for PHP 8+? How does it handle non-standard environments (e.g., containerized apps with custom user contexts)?

Integration Approach

Stack fit is optimal for Laravel CLI commands, console services, or server-side daemons running on Linux. For web apps, it’s viable only if deployed on Unix-like systems where the web server user has proper XDG environment setup. Migration path involves replacing hardcoded paths (e.g., ~/.config/app) with XdgBaseDir::getConfigDir() calls in configuration bootstrapping (e.g., service providers or environment helpers). Compatibility requires PHP ≥5.6+ (per Packagist), but must verify Laravel version alignment (Laravel 8+ requires PHP 7.3+). Sequencing should prioritize early integration during project setup—before writing critical path logic—to avoid refactoring. For Laravel, inject the XDG resolver

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