Hi

Am 2026-05-17 05:35, schrieb Larry Garfield:
But so far, this seems the least bad way to address the issue of attributes being fundamentally dumb about their context.

I consider that to be a feature, not an issue. Context-specific logic hidden in a function is neither obvious to humans, nor to code. If I write `#[Field]` with `public function __construct(public ?string $name = null)`, then I expect `->name` to be `null`, not something else. And code handling Attributes in a generic way - for example some code generation - expects “pass all the arguments to the constructor” to do the right thing.

I will also note the bonus feature in this RFC, the ReflectionAttributeTarget interface. I frankly want that even more than the reflection target. :-) Even if this RFC fails, that should be brought back in its own little RFC and needs to pass.

The interface makes sense to me. I suppose we could probably ship that without an RFC.

Best regards
Tim Düsterhus

Reply via email to