Skip to content

Rename ParameterResolver interface to Resolver#33

Merged
alganet merged 1 commit into
mainfrom
rename-resolver-interface
Jun 25, 2026
Merged

Rename ParameterResolver interface to Resolver#33
alganet merged 1 commit into
mainfrom
rename-resolver-interface

Conversation

@alganet

@alganet alganet commented Jun 25, 2026

Copy link
Copy Markdown
Member

Swap the names so the contract carries the minimal name and the implementation carries the qualifier describing what it does. The interface is the generic resolve() promise; the concrete class is specifically about resolving parameters from a PSR-11 container.

ParameterResolver (interface) -> Resolver
Resolver (class) -> ContainerResolver

This frees the bare Resolver name for consumers depending on the abstraction (Resolver $resolver) and gives future strategies parallel, self-describing names. ContainerResolver's name now carries strictly more information than the interface's, matching the usual contract-vs- implementation convention.

BC break (clean, no aliases): ships as a major version bump.

  • ParameterResolver is removed; type-hint Resolver instead.
  • The old Resolver class becomes ContainerResolver; new Resolver(...) callers must switch to new ContainerResolver(...).

README and tests updated; ResolverTest renamed to ContainerResolverTest.

Swap the names so the contract carries the minimal name and the
implementation carries the qualifier describing what it does. The
interface is the generic `resolve()` promise; the concrete class is
specifically about resolving parameters from a PSR-11 container.

  ParameterResolver (interface) -> Resolver
  Resolver (class)              -> ContainerResolver

This frees the bare `Resolver` name for consumers depending on the
abstraction (`Resolver $resolver`) and gives future strategies parallel,
self-describing names. ContainerResolver's name now carries strictly
more information than the interface's, matching the usual contract-vs-
implementation convention.

BC break (clean, no aliases): ships as a major version bump.
- ParameterResolver is removed; type-hint Resolver instead.
- The old Resolver class becomes ContainerResolver; `new Resolver(...)`
  callers must switch to `new ContainerResolver(...)`.

README and tests updated; ResolverTest renamed to ContainerResolverTest.
@alganet alganet merged commit 542379d into main Jun 25, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants