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

Symfony Config Test Laravel Package

matthiasnoback/symfony-config-test

PHPUnit helpers for testing Symfony Config definitions. Provides a test case trait and assertions to validate config trees, ensuring required nodes, types, and constraints behave as expected by asserting valid and invalid configuration arrays.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. Buy: Buy – Eliminates the need to build custom validation logic for Symfony Config Component configurations, reducing development time and maintenance overhead.
  • Feature Expansion: Enables robust configuration validation testing for Symfony-based applications, ensuring correctness in complex nested configurations (e.g., Doctrine, API Platform, or custom bundles).
  • Quality Assurance: Supports shift-left testing by validating configuration schemas early in development, reducing runtime errors in production.
  • Roadmap Priorities:
    • Symfony Ecosystem Projects: Critical for teams using Symfony’s Config Component (e.g., API Platform, Doctrine, or custom bundles with complex configs).
    • Configuration-Driven Features: Ideal for products where user-defined configs (e.g., CMS settings, plugin systems) must be validated rigorously.
    • Test Coverage Gaps: Fills gaps in existing test suites where manual validation of config trees is error-prone or missing.
  • Use Cases:
    • Bundle Development: Validate configuration trees for Symfony bundles before release.
    • CLI Tools: Ensure CLI-driven config tools (e.g., symfony/console) process inputs correctly.
    • Migration Paths: Test backward compatibility during config schema updates (e.g., Symfony 6 → 7).
    • SaaS Platforms: Validate tenant-specific configs in multi-tenant applications.

When to Consider This Package

  • Adopt When:

    • Your project uses Symfony’s Config Component (e.g., symfony/config) for defining configuration schemas.
    • You need to test validation logic for complex, nested configs (e.g., arrays, prototypes, required fields).
    • Your team lacks dedicated QA resources for manual config validation or relies on flaky runtime checks.
    • You’re building configuration-driven products (e.g., plugins, CMS, or CLI tools) where schema correctness is critical.
    • You want to reduce technical debt by replacing ad-hoc validation tests with a standardized library.
  • Look Elsewhere If:

    • You’re not using Symfony’s Config Component (e.g., using Laravel’s spatie/laravel-config or custom parsers).
    • Your configs are trivially simple (e.g., flat key-value pairs with no validation rules).
    • You prefer runtime validation over preemptive testing (e.g., relying on exception handling in production).
    • Your stack is non-PHP (e.g., Node.js, Python) or uses a different config system (e.g., YAML/JSON schemas with json-schema-validator).
    • You’re constrained by legacy PHP versions (<7.1) or PHPUnit <7.0 (package drops support for these).

How to Pitch It (Stakeholders)

For Executives: "This package lets us automate and enforce configuration validation for Symfony-based systems, reducing bugs in production caused by misconfigured setups. For example, if we’re building a plugin system or a CLI tool where users define complex configs, this ensures their inputs are validated before they cause runtime failures. It’s a low-cost, high-impact way to improve reliability—especially for teams using Symfony’s Config Component. Think of it as ‘unit tests for your configuration schemas.’"

For Engineering Teams: *"This library provides PHPUnit assertions to test Symfony Config Component trees, covering:

  • Invalid configs: Catch missing required fields or invalid types early.
  • Merged configs: Verify how multiple config sources (e.g., YAML + env vars) combine.
  • Subset testing: Focus on specific branches of a config tree (e.g., doctrine.orm without testing doctrine.dbal). It’s zero-boilerplate—just extend a trait and use built-in assertions like assertConfigurationIsInvalid() or assertProcessedConfigurationEquals(). It’s actively maintained (last release: 2026), supports Symfony 7/8 and PHPUnit 10–13, and integrates seamlessly with existing test suites."*

For Developers: *"Need to test that your Configuration class rejects bad inputs or processes them correctly? This package gives you:

  • assertConfigurationIsInvalid(): Verify exceptions for malformed configs.
  • assertProcessedConfigurationEquals(): Check merged/processed output matches expectations.
  • Breadcrumb paths: Test specific subtrees (e.g., array_node.*.default_value for prototyped nodes). It’s lightweight, well-documented, and saves hours of manual validation logic. Example:
$this->assertConfigurationIsInvalid([[]], 'required_value'); // Fails if 'required_value' is missing.
```"*
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.
filament/spatie-laravel-tags-plugin
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata
splash/openapi