[String] Added a help message when translation-contracts is not installed
This commit is contained in:
parent
e8fb0d133e
commit
904fb1ae21
@ -15,6 +15,10 @@ use Symfony\Component\String\AbstractUnicodeString;
|
||||
use Symfony\Component\String\UnicodeString;
|
||||
use Symfony\Contracts\Translation\LocaleAwareInterface;
|
||||
|
||||
if (!interface_exists(LocaleAwareInterface::class)) {
|
||||
throw new \LogicException('You cannot use the "Symfony\Component\String\Slugger\AsciiSlugger" as the "symfony/translation-contracts" package is not installed. Try running "composer require symfony/translation-contracts".');
|
||||
}
|
||||
|
||||
/**
|
||||
* @author Titouan Galopin <galopintitouan@gmail.com>
|
||||
*
|
||||
|
Reference in New Issue
Block a user