From e03ffd125ec6c104cc585d901ff63d5788b9fd0a Mon Sep 17 00:00:00 2001 From: spiralbot Date: Thu, 11 Jan 2024 13:33:36 +0000 Subject: [PATCH] Merge pull request #1056 from spiral/singleton-interface --- src/Translator.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Translator.php b/src/Translator.php index 812a2f41..115ae1e8 100644 --- a/src/Translator.php +++ b/src/Translator.php @@ -5,7 +5,7 @@ namespace Spiral\Translator; use Psr\EventDispatcher\EventDispatcherInterface; -use Spiral\Core\Container\SingletonInterface; +use Spiral\Core\Attribute\Singleton; use Spiral\Translator\Config\TranslatorConfig; use Spiral\Translator\Event\LocaleUpdated; use Spiral\Translator\Exception\LocaleException; @@ -16,7 +16,8 @@ * Implementation of Symfony\TranslatorInterface with memory caching, automatic message * registration and bundle/domain grouping. */ -final class Translator implements TranslatorInterface, SingletonInterface +#[Singleton] +final class Translator implements TranslatorInterface { private string $locale;