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 { // ... } }