1--TEST--
2Attribute on promoted property may only target parameter
3--EXTENSIONS--
4zend_test
5--FILE--
6<?php
7
8class AttrTest
9{
10    public function __construct(
11        #[ZendTestParameterAttribute('foo')] public $param
12    ) {}
13}
14
15$ref = new ReflectionClass(AttrTest::class);
16$attr = $ref->getConstructor()->getParameters()[0]->getAttributes();
17
18var_dump(count($attr));
19var_dump($attr[0]->getName());
20var_dump($attr[0]->newInstance()->parameter);
21
22$attr = $ref->getProperty('param')->getAttributes();
23
24var_dump(count($attr));
25
26?>
27--EXPECTF--
28int(1)
29string(26) "ZendTestParameterAttribute"
30string(3) "foo"
31int(0)
32