# symfony/options-resolver

Provides an improved replacement for the array_replace PHP function

Repository: https://github.com/symfony/options-resolver
Canonical: https://ross.abutalabs.com/products/options-resolver
Homepage: https://symfony.com/options-resolver
Language: PHP
License: MIT
License Family: permissive
Topics: php, symfony, component, symfony-component, config, configuration, options
Last push: 2026-08-14T13:23:19+00:00

## Health v2 (maintenance only)
Score: 94/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 97, release rhythm 86, longevity 100
- inputs: {"age_days": 5222, "days_push": 19, "days_rel": 96, "gap_med": 5.5, "n_releases_24m": 19}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3230, forks 28 (observed 2026-08-28T04:07:50.118134+00:00)

## What it is
A standalone Symfony PHP component that improves on array_replace for handling configuration options. It provides required options, defaults, type and value validation, and normalization for option arrays.

## Use cases
- resolve options arrays with defaults in php
- validate configuration options types and values
- require certain options to be passed
- normalize option values before use
- replace boilerplate array_merge config handling
- define nested or prototype options

## When to choose
- you build PHP libraries or classes accepting an options array
- you want declarative defaults, required options, and validation instead of manual isset checks
- you already use Symfony components

## When to avoid
- your project is not PHP
- you only need simple array merging with no validation
- you prefer constructor promotion or DTO-based configuration

## Facets
- artifact type: library
- maturity: stable
- function: configuration-management, developer-tools
- domain: developer-tools, web-development, backend
- platform: php, cross-platform
- tags: options-resolver, array-replace, defaults, validation, symfony-component, composer

## Member repositories
- symfony/options-resolver (main) score 94

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:50.118134+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T07:24:40.161396+00:00, confidence not recorded.
  - readme: https://github.com/symfony/options-resolver (fetched 2026-08-28T04:07:50.118134+00:00, sha c61e8b9e07b6)
  - homepage: https://symfony.com/options-resolver (fetched 2026-08-29T09:37:39.327982+00:00, sha 60c84222f361)
  - site_page: https://symfony.com/doc (fetched 2026-08-29T09:37:39.377969+00:00, sha 44889134f4fb)
  - site_page: https://symfony.com/doc/current/components/options_resolver.html (fetched 2026-08-29T09:37:39.380644+00:00, sha 1b47ac0fd39e)
  - site_page: https://symfony.com/releases (fetched 2026-08-29T09:37:39.383148+00:00, sha 2fd410222cfe)
  - site_page: https://symfony.com/blog/category/releases (fetched 2026-08-29T09:37:39.384971+00:00, sha 98212d5a6d55)
- Data as of 2026-08-30T08:39:29.467469+00:00.
