File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Bundle/FrameworkBundle/Controller Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 42
42
use Symfony \Component \Serializer \SerializerInterface ;
43
43
use Symfony \Component \WebLink \EventListener \AddLinkHeaderListener ;
44
44
use Symfony \Component \WebLink \GenericLinkProvider ;
45
+ use Symfony \Contracts \Service \Attribute \Required ;
45
46
use Symfony \Contracts \Service \ServiceSubscriberInterface ;
46
47
use Twig \Environment ;
47
48
@@ -60,6 +61,7 @@ abstract class AbstractController implements ServiceSubscriberInterface
60
61
/**
61
62
* @required
62
63
*/
64
+ #[Required]
63
65
public function setContainer (ContainerInterface $ container ): ?ContainerInterface
64
66
{
65
67
$ previous = $ this ->container ;
Original file line number Diff line number Diff line change 12
12
namespace Symfony \Contracts \Service ;
13
13
14
14
use Psr \Container \ContainerInterface ;
15
+ use Symfony \Contracts \Service \Attribute \Required ;
15
16
use Symfony \Contracts \Service \Attribute \SubscribedService ;
16
17
17
18
/**
@@ -67,9 +68,7 @@ public static function getSubscribedServices(): array
67
68
return $ services ;
68
69
}
69
70
70
- /**
71
- * @required
72
- */
71
+ #[Required]
73
72
public function setContainer (ContainerInterface $ container ): ?ContainerInterface
74
73
{
75
74
$ this ->container = $ container ;
You can’t perform that action at this time.
0 commit comments