framework
framework copied to clipboard
[spiral/translator] Add TranslatorInterface::setLocale()
In the "TestCase.php" generated by create-project:
if ($container->has(TranslatorInterface::class)) {
$container->get(TranslatorInterface::class)->setLocale('en');
}
phpstan:
Line tests/TestCase.php
------ ---------------------------------------------------------------------------------
34 Call to an undefined method Spiral\Translator\TranslatorInterface::setLocale().
🪪 method.notFound
Good catch. The setLocale() method has been present in the implementation for a long time. We should consider adding this method to the interface in the next major release.