Closed
Description
Description
The following code:
<?php
class Foo {
public function __construct(
#[SensitiveParameter]
public string $password
)
{
throw new \Exception('foo');
}
}
new Foo('bar');
Resulted in this output:
Fatal error: Attribute "SensitiveParameter" cannot target property (allowed targets: parameter) in php-src/test.php on line 4
But I expected this output instead:
Fatal error: Uncaught Exception: foo in php-src/test.php:9
Stack trace:
#0 php-src/test.php(13): Foo->__construct(Object(SensitiveParameterValue))
#1 {main}
thrown in /tmp/php-src/test.php on line 9
PHP Version
Current git master
Operating System
No response