mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-22 03:26:22 +00:00
380 B
380 B
date | id | title |
---|---|---|
20201117 | f0c76a12-b940-461d-8888-fecdab2fa971 | Required |
Description
Attribute replacement for @required.
Syntax
use Symfony\Contracts\Service\Attribute\Required;
class SomeService
{
#[Required]
public Bar $bar;
#[Required]
public function setFoo(Foo $foo): void
{
// ...
}
}