Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 24646c4

Browse filesBrowse files
committed
[DI] add #[Required] where applicable
1 parent c7dbcc9 commit 24646c4
Copy full SHA for 24646c4

File tree

Expand file treeCollapse file tree

2 files changed

+4
-3
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+4
-3
lines changed

‎src/Symfony/Bundle/FrameworkBundle/Controller/AbstractController.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Controller/AbstractController.php
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
use Symfony\Component\Serializer\SerializerInterface;
4343
use Symfony\Component\WebLink\EventListener\AddLinkHeaderListener;
4444
use Symfony\Component\WebLink\GenericLinkProvider;
45+
use Symfony\Contracts\Service\Attribute\Required;
4546
use Symfony\Contracts\Service\ServiceSubscriberInterface;
4647
use Twig\Environment;
4748

@@ -60,6 +61,7 @@ abstract class AbstractController implements ServiceSubscriberInterface
6061
/**
6162
* @required
6263
*/
64+
#[Required]
6365
public function setContainer(ContainerInterface $container): ?ContainerInterface
6466
{
6567
$previous = $this->container;

‎src/Symfony/Contracts/Service/ServiceSubscriberTrait.php

Copy file name to clipboardExpand all lines: src/Symfony/Contracts/Service/ServiceSubscriberTrait.php
+2-3Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Symfony\Contracts\Service;
1313

1414
use Psr\Container\ContainerInterface;
15+
use Symfony\Contracts\Service\Attribute\Required;
1516
use Symfony\Contracts\Service\Attribute\SubscribedService;
1617

1718
/**
@@ -67,9 +68,7 @@ public static function getSubscribedServices(): array
6768
return $services;
6869
}
6970

70-
/**
71-
* @required
72-
*/
71+
#[Required]
7372
public function setContainer(ContainerInterface $container): ?ContainerInterface
7473
{
7574
$this->container = $container;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.