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 eae19f2

Browse filesBrowse files
minor #37512 [String] Added a help message when translation-contracts is not installed (lyrixx)
This PR was submitted for the master branch but it was merged into the 5.0 branch instead. Discussion ---------- [String] Added a help message when translation-contracts is not installed | Q | A | ------------- | --- | Branch? | 5.1 | Bug fix? | yes and no | New feature? | no | Deprecations? | no | Tickets | Fix #37060 | License | MIT | Doc PR | Commits ------- 904fb1a [String] Added a help message when translation-contracts is not installed
2 parents e8fb0d1 + 904fb1a commit eae19f2
Copy full SHA for eae19f2

File tree

1 file changed

+4
-0
lines changed
Filter options

1 file changed

+4
-0
lines changed

‎src/Symfony/Component/String/Slugger/AsciiSlugger.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/String/Slugger/AsciiSlugger.php
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@
1515
use Symfony\Component\String\UnicodeString;
1616
use Symfony\Contracts\Translation\LocaleAwareInterface;
1717

18+
if (!interface_exists(LocaleAwareInterface::class)) {
19+
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".');
20+
}
21+
1822
/**
1923
* @author Titouan Galopin <galopintitouan@gmail.com>
2024
*

0 commit comments

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