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 dc9648a

Browse filesBrowse files
committed
minor #40960 [Translation] [Loco] Simplify namespace (OskarStark)
This PR was merged into the 5.3-dev branch. Discussion ---------- [Translation] [Loco] Simplify namespace | Q | A | ------------- | --- | Branch? | 5.x | Bug fix? | no | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tickets | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT | Doc PR | --- Based on #40945 (comment) (`@nicolas`-grekas ) Commits ------- e6af3c2 [Translation] [Loco] Simplify namespace
2 parents 63496df + e6af3c2 commit dc9648a
Copy full SHA for dc9648a

File tree

Expand file treeCollapse file tree

8 files changed

+8
-16
lines changed
Filter options
Expand file treeCollapse file tree

8 files changed

+8
-16
lines changed

‎src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@
169169
use Symfony\Component\Stopwatch\Stopwatch;
170170
use Symfony\Component\String\LazyString;
171171
use Symfony\Component\String\Slugger\SluggerInterface;
172-
use Symfony\Component\Translation\Bridge\Loco\Provider\LocoProviderFactory;
172+
use Symfony\Component\Translation\Bridge\Loco\LocoProviderFactory;
173173
use Symfony\Component\Translation\Command\XliffLintCommand as BaseXliffLintCommand;
174174
use Symfony\Component\Translation\PseudoLocalizationTranslator;
175175
use Symfony\Component\Translation\Translator;

‎src/Symfony/Bundle/FrameworkBundle/Resources/config/translation_providers.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Resources/config/translation_providers.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace Symfony\Component\DependencyInjection\Loader\Configurator;
1313

14-
use Symfony\Component\Translation\Bridge\Loco\Provider\LocoProviderFactory;
14+
use Symfony\Component\Translation\Bridge\Loco\LocoProviderFactory;
1515
use Symfony\Component\Translation\Provider\NullProviderFactory;
1616
use Symfony\Component\Translation\Provider\TranslationProviderCollection;
1717
use Symfony\Component\Translation\Provider\TranslationProviderCollectionFactory;

‎src/Symfony/Component/Translation/Bridge/Loco/Provider/LocoProvider.php renamed to ‎src/Symfony/Component/Translation/Bridge/Loco/LocoProvider.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Translation/Bridge/Loco/LocoProvider.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace Symfony\Component\Translation\Bridge\Loco\Provider;
12+
namespace Symfony\Component\Translation\Bridge\Loco;
1313

1414
use Psr\Log\LoggerInterface;
1515
use Symfony\Component\Translation\Exception\ProviderException;

‎src/Symfony/Component/Translation/Bridge/Loco/Provider/LocoProviderFactory.php renamed to ‎src/Symfony/Component/Translation/Bridge/Loco/LocoProviderFactory.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Translation/Bridge/Loco/LocoProviderFactory.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace Symfony\Component\Translation\Bridge\Loco\Provider;
12+
namespace Symfony\Component\Translation\Bridge\Loco;
1313

1414
use Psr\Log\LoggerInterface;
1515
use Symfony\Component\Translation\Exception\UnsupportedSchemeException;

‎src/Symfony/Component/Translation/Bridge/Loco/Tests/LocoProviderFactoryTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Translation/Bridge/Loco/Tests/LocoProviderFactoryTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Symfony\Component\Translation\Bridge\Loco\Tests;
44

5-
use Symfony\Component\Translation\Bridge\Loco\Provider\LocoProviderFactory;
5+
use Symfony\Component\Translation\Bridge\Loco\LocoProviderFactory;
66
use Symfony\Component\Translation\Provider\ProviderFactoryInterface;
77
use Symfony\Component\Translation\Test\ProviderFactoryTestCase;
88

‎src/Symfony/Component/Translation/Bridge/Loco/Tests/LocoProviderTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Translation/Bridge/Loco/Tests/LocoProviderTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use Psr\Log\LoggerInterface;
66
use Symfony\Component\HttpClient\MockHttpClient;
7-
use Symfony\Component\Translation\Bridge\Loco\Provider\LocoProvider;
7+
use Symfony\Component\Translation\Bridge\Loco\LocoProvider;
88
use Symfony\Component\Translation\Loader\ArrayLoader;
99
use Symfony\Component\Translation\Loader\LoaderInterface;
1010
use Symfony\Component\Translation\Loader\XliffFileLoader;

‎src/Symfony/Component/Translation/Exception/UnsupportedSchemeException.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Translation/Exception/UnsupportedSchemeException.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class UnsupportedSchemeException extends LogicException
1818
{
1919
private const SCHEME_TO_PACKAGE_MAP = [
2020
'loco' => [
21-
'class' => Bridge\Loco\Provider\LocoProviderFactory::class,
21+
'class' => Bridge\Loco\LocoProviderFactory::class,
2222
'package' => 'symfony/loco-translation-provider',
2323
],
2424
];

‎src/Symfony/Component/Translation/Tests/Command/TranslationProviderTestCase.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Translation/Tests/Command/TranslationProviderTestCase.php
+1-9Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,10 @@
1212
namespace Symfony\Component\Translation\Tests\Command;
1313

1414
use PHPUnit\Framework\TestCase;
15-
use Psr\Log\LoggerInterface;
1615
use Symfony\Component\Filesystem\Filesystem;
17-
use Symfony\Component\HttpClient\MockHttpClient;
18-
use Symfony\Component\HttpClient\Response\CommonResponseTrait;
19-
use Symfony\Component\Translation\Bridge\Loco\Provider\LocoProvider;
20-
use Symfony\Component\Translation\Loader\LoaderInterface;
21-
use Symfony\Component\Translation\Loader\XliffFileLoader;
2216
use Symfony\Component\Translation\Provider\FilteringProvider;
2317
use Symfony\Component\Translation\Provider\ProviderInterface;
2418
use Symfony\Component\Translation\Provider\TranslationProviderCollection;
25-
use Symfony\Component\Translation\TranslatorBag;
26-
use Symfony\Contracts\HttpClient\ResponseInterface;
2719

2820
/**
2921
* @author Mathieu Santostefano <msantostefano@protonmail.com>
@@ -61,7 +53,7 @@ protected function getProviderCollection(ProviderInterface $provider, array $loc
6153

6254
protected function createFile(array $messages = ['note' => 'NOTE'], $targetLanguage = 'en', $fileNamePattern = 'messages.%locale%.xlf', string $xlfVersion = 'xlf12'): string
6355
{
64-
if ($xlfVersion === 'xlf12') {
56+
if ('xlf12' === $xlfVersion) {
6557
$transUnits = '';
6658
foreach ($messages as $key => $value) {
6759
$transUnits .= <<<XLIFF

0 commit comments

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