Weave 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

Config Laravel Package

respect/config

Respect\Config is a lightweight PHP configuration package with a clean API for loading, merging, and accessing settings from arrays and files. It supports dot-notation, validation, and framework integration, making application configuration simple and predictable.

Deep Wiki
Context7

A powerful, small, deadly simple configurator and dependency injection container DSL made to be easy

Frequently asked questions about Config
What is Respect\Config and how does it work with Laravel?
Respect\Config is a small PHP configuration container that loads settings from arrays or files into an object you can read and reuse. In Laravel you can use it alongside the framework's config system by loading files in a service provider or binding it into the container. It is not a Laravel package with built-in auto-discovery, so you wire it in manually where needed. It helps keep environment-specific values out of code and groups related options for easier access.
How do I install Respect\Config in a Laravel project?
Install it with Composer using composer require respect/config. Since the repository is listed as unknown, confirm the package name and available versions with composer show respect/config before relying on it. After installation, you can require the Composer autoloader if needed or use Laravel's existing autoloading. Then create a small service provider or bootstrap file to load your configuration.
Does Respect\Config support Laravel 10, 11, or 12 and PHP 8?
Respect\Config is a standalone PHP configuration container, so Laravel version support depends mainly on its Composer PHP constraint rather than Laravel-specific code. Check the package's composer.json for required PHP versions and test against your Laravel version. For modern Laravel apps on PHP 8.1 or newer, it should work as a plain library when loaded manually. There is no official Laravel integration to guarantee compatibility.
How do I load configuration files with Respect\Config?
You typically point Respect\Config at a PHP file or array that returns your settings, then access the loaded values through its simple API. File-based configuration keeps settings out of application code and makes environment-specific overrides easier to manage. In Laravel you can store those files in config/ or a custom directory and load them from a service provider. Keep file paths explicit so cached or deployed environments resolve the right configuration.
Can I use dot notation to access nested configuration values in Respect\Config?
Yes, the package is designed for nested option access, and dot notation is the usual way to reach grouped settings such as database.connections.mysql. This makes hierarchical configuration easier to read than deeply nested arrays. You can still work with arrays or objects directly if you prefer. Check the package's API for the exact accessor methods available in your installed version.
How does Respect\Config handle environment-specific configuration?
Respect\Config keeps environment-specific values out of code by loading them from files or arrays, so you can swap configuration per environment. You might load a base file and then merge an environment-specific override file in a service provider. This pattern works well for local, staging, and production settings without editing application code. Avoid committing secrets; combine it with environment variables for sensitive values.
Is Respect\Config a replacement for Laravel's config system or service container?
No. Respect\Config is a configuration container for reading and managing settings, not a dependency injection container like Laravel's service container. It can complement Laravel's config repository, but it does not replace config/app.php, env() handling, or config:cache. Use it when you want a small, file-based configuration object with nested access. For dependency wiring, continue using Laravel's container or a dedicated DI package.
How do I merge configuration arrays or files in Respect\Config?
Respect\Config supports loading and merging settings so you can combine a base configuration with overrides. A common approach is to load the default file first, then merge an environment-specific file on top. Merge order matters: later values should win for environment overrides. Test merge behavior for nested arrays, since shallow and recursive merges can produce different results.
Can I cache Respect\Config configuration in production with Laravel?
Respect\Config is file-based, so production caching depends on how you load it. If you load plain PHP arrays, opcache can cache the files, but Laravel's config:cache will not automatically include values managed outside Laravel's config repository. If the package supports caching or compiled configuration, use it and clear the cache on deploy. Otherwise, load configuration during boot and avoid mutating it at runtime.
What are the alternatives to Respect\Config for Laravel configuration?
Laravel's built-in config repository, config files, and environment variables are the default choice and integrate with config:cache. Other options include symfony/config for hierarchical configuration, illuminate/config as a standalone component, and lightweight array-based loaders. Choose Respect\Config if you want a minimal configuration container with file-based settings and nested access. For most Laravel apps, the native config system is simpler unless you need the package's specific API.
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.
gmostafa/php-graphql-client
xeviant/paystack
snowsoft/faker
meditationsteps/blogetc
animalyoung/laravel-influxdb
onix-solutions/sms-telera
lonely-lights/prosetta
oxygen/data
oxygen/core
jengo/base
xiloryx/log-collector
a21ns1g4ts/filament-stripe
la-php/laravel-admin
artisan-build/community-prompts
vleroy/smart
ayles-software/laravel-australian-public-holidays
cboxdk/laravel-id-spatie
cboxdk/laravel-id-billing
cboxdk/laravel-id-billing-bridge
simple-as-fuck/php-performance-log