On Wed, Apr 29, 2020 at 9:47 AM Nicolas Grekas <nicolas.grekas+...@gmail.com>
wrote:

> > I think it might be best to apply to "both" and provide an isPromoted()
> > method on both ReflectionParameter and ReflectionProperty. Any code that
> > wishes to validate the allowed positions of an attribute can then skip
> > properties/parameters that report isPromoted() as true, to avoid
> reporting
> > false positives.
> >
>
> That sounds good. Deal on my side.
>

Just to mention, any approach here potentially conflicts with anything we
consider for potential target validation on attributes, i.e. declaring for
an attribute that it is only allowed on a property OR an argument.

At the point constructor promotion happens, we can also not look into the
attribute to see if its target=property or target=parameter, because this
would require triggering autoloader.



> Nicolas
>

Reply via email to