-
-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 6.4: Fix RequestPayloadValueResolver handling error with no ExpectedTypes [Mime] Fix serializing uninitialized RawMessage::$message to null [Notifer][Smsapi] Set messageId of SentMessage [DX] Use Symfony "dark-mode"-responsive logo in README support lazy evaluated exception messages with Xdebug 3 Provide more precise phpdoc for FileLocatorInterface::locate [DependencyInjection] #[Autowire] attribute should have precedence over bindings
- Loading branch information
Showing
4 changed files
with
122 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
Tests/Fixtures/TaggedLocatorConsumerWithServiceSubscriber.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Symfony package. | ||
* | ||
* (c) Fabien Potencier <fabien@symfony.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Symfony\Component\DependencyInjection\Tests\Fixtures; | ||
|
||
use Psr\Container\ContainerInterface; | ||
use Symfony\Component\DependencyInjection\Attribute\TaggedLocator; | ||
use Symfony\Contracts\Service\Attribute\Required; | ||
use Symfony\Contracts\Service\ServiceSubscriberInterface; | ||
|
||
final class TaggedLocatorConsumerWithServiceSubscriber implements ServiceSubscriberInterface | ||
{ | ||
private ?ContainerInterface $container = null; | ||
|
||
public function __construct( | ||
#[TaggedLocator('foo_bar', indexAttribute: 'key')] | ||
private ContainerInterface $locator, | ||
) { | ||
} | ||
|
||
public function getLocator(): ContainerInterface | ||
{ | ||
return $this->locator; | ||
} | ||
|
||
public function getContainer(): ?ContainerInterface | ||
{ | ||
return $this->container; | ||
} | ||
|
||
#[Required] | ||
public function setContainer(ContainerInterface $container): void | ||
{ | ||
$this->container = $container; | ||
} | ||
|
||
public static function getSubscribedServices(): array | ||
{ | ||
return [ | ||
'subscribed_service', | ||
]; | ||
} | ||
} |