Skip to content

Add generics to Constructor#5

Merged
XedinUnknown merged 42 commits into
0.2.xfrom
task/constructor-generics
Mar 21, 2026
Merged

Add generics to Constructor#5
XedinUnknown merged 42 commits into
0.2.xfrom
task/constructor-generics

Conversation

@XedinUnknown
Copy link
Copy Markdown
Member

This allows static analysis to deduce the type of the service
that will be created from a Constructor definition.

This allows static analysis to deduce the type of the service
that will be created from a `Constructor` definition.
@XedinUnknown XedinUnknown added this to the v0.1 milestone Apr 9, 2021
@XedinUnknown XedinUnknown requested a review from mecha April 9, 2021 10:19
@XedinUnknown XedinUnknown self-assigned this Apr 9, 2021
Copy link
Copy Markdown
Member

@mecha mecha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

mecha
mecha previously approved these changes Apr 10, 2021
I guess, in `class-string<T>`, `T` must be of type `object`.

See vimeo/psalm#3933.
I guess, in `class-string<T>`, `T` must be of type `object`.

See vimeo/psalm#3933.
This corresponds to the minimal requirement.
Maintaining config compatibility is hard otherwise.
It is necessary for PHP 8.4+.
This is a library. It doesn't use its own methods.

See vimeo/psalm#11320 in relation to attribute.
mecha
mecha previously approved these changes Nov 21, 2025
Is now like a real builder.
Is now stringable. Less methods to call, less chars to type.
1. Now allows controlling whether uniqueness includes autoloaded space.
2. If `extends` is configured, it will be used as the class prefix. This helps identify this class during debugging.
@XedinUnknown XedinUnknown changed the base branch from 0.1.x to 0.2.x March 21, 2026 15:22
@XedinUnknown XedinUnknown dismissed mecha’s stale review March 21, 2026 15:22

The base branch was changed.

@XedinUnknown XedinUnknown merged commit 0e0257d into 0.2.x Mar 21, 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