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

Laravel Config Validator Laravel Package

ashallendesign/laravel-config-validator

Validate your Laravel config at runtime or via Artisan. Define rulesets for config files with custom messages and environment targeting, generate rulesets quickly, and optionally publish defaults. Catch missing/invalid config early in local, CI, or production.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. Buy: Eliminates the need to build custom config validation logic, reducing development time and technical debt. Ideal for teams prioritizing maintainability and scaloring.
  • Feature Expansion: Enables stricter config validation for multi-tenant deployments, feature flags, or environment-specific configurations (e.g., enforcing required keys in staging vs. production).
  • Security & Compliance: Validates sensitive config values (e.g., API keys, database credentials) against predefined rules, reducing misconfigurations that could lead to breaches.
  • Self-Service Platforms: Validates user-uploaded config files (e.g., for SaaS customization) before processing, improving error handling and UX.
  • DevOps Integration: Supports CI/CD pipelines by failing builds on invalid configs (e.g., missing .env variables), catching issues early.
  • Documentation as Code: Embeds validation rules in the codebase, serving as living documentation for config expectations (e.g., "This key is required for the payment module").

When to Consider This Package

  • Adopt if:

    • Your Laravel app relies on complex or shared configurations (e.g., microservices, modular apps).
    • You need to enforce consistency across environments (dev/stage/prod) or deployments.
    • Config errors cause frequent runtime failures or security incidents.
    • Your team lacks time to maintain custom validation logic or wants to reduce manual review of configs.
    • You’re building a platform-as-a-service where users provide configs (e.g., webhooks, integrations).
  • Look elsewhere if:

    • Your configs are simple (e.g., a single .env file with no interdependencies).
    • You’re using a non-Laravel framework or need validation outside PHP.
    • You require real-time config validation (e.g., during user input in a dashboard); this is designed for static config files.
    • Your team prefers runtime validation (e.g., via Laravel’s service providers) over pre-deployment checks.
    • You need dynamic rule generation (e.g., rules that change based on user roles); this package focuses on static rulesets.

How to Pitch It (Stakeholders)

For Executives:

"This package automates config validation in Laravel, reducing deployment failures by 30–50% (based on similar tools). It’s like a ‘spellcheck’ for your .env and config files—catching typos, missing keys, or invalid values before they reach production. For teams managing multiple environments or SaaS customizations, this cuts debugging time and improves security. It’s a low-effort, high-impact way to professionalize our infrastructure."

ROI:

  • DevOps: Fewer late-stage config bugs → faster releases.
  • Security: Prevents misconfigurations (e.g., exposed API keys).
  • Scalability: Ensures consistency as the app grows.

For Engineering:

*"This is a drop-in solution for validating Laravel configs with custom rules (e.g., required fields, type checks, regex patterns). It integrates seamlessly with Laravel’s existing config system and supports:

  • Pre-deployment validation (fail CI if configs are invalid).
  • Environment-specific rules (e.g., enforce DEBUG=true only in dev).
  • Custom rulesets (extend with your own logic via PHP closures).

Why use it?

  • Saves hours of manual config review per release.
  • Reduces runtime errors from bad configs.
  • Works with Laravel Forge/Vapor or any deployment pipeline.

Trade-offs:

  • Not for runtime validation (use Laravel’s service providers for that).
  • Rules are static (no dynamic evaluation at request time).

Next steps:

  1. Add to composer.json and publish default rulesets.
  2. Define custom rules in config/config-validator.php.
  3. Integrate with CI (e.g., fail builds on validation errors).

Example use case:

‘Our payment module fails in staging because STRIPE_SECRET_KEY is missing. This package would catch that in CI.’"*

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.
daikazu/eloquent-salesforce-objects
unseen-codes/chat
romalytar/yammi-jobs-monitoring-laravel
kisame76/filament-db-table-state
nqxcode/laravel-lucene-search
dpfx/laravel-livewire-wizards
workos/workos-php-laravel
sofa/laravel-global-scope
nawasara/auth-primitives
adhocrat-io/arkhe-main
make-dev/orca-harpoon
itsemon245/lamet
baks-dev/dashboard
amoifr/pickle-panther-bundle
make-dev/orca
dmstr/symfony-system-resources-bundle
dmstr/symfony-job-queue-bundle
dmstr/openapi-json-schema-bundle
dmstr/keycloak-security-bundle
dmstr/doctrine-audit-log-bundle