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 7a6e3c0

Browse filesBrowse files
committed
Merge branch '3.4' into 4.4
* 3.4: fix unix root dir issue sync validator translation files with master fix anchor fix links to releases page (formerly known as "roadmap") [Console] Don't load same-namespace alternatives on exact match found
2 parents 1a7e4ea + f6f6a60 commit 7a6e3c0
Copy full SHA for 7a6e3c0

File tree

Expand file treeCollapse file tree

10 files changed

+69
-6
lines changed
Filter options
Expand file treeCollapse file tree

10 files changed

+69
-6
lines changed

‎.github/PULL_REQUEST_TEMPLATE.md

Copy file name to clipboardExpand all lines: .github/PULL_REQUEST_TEMPLATE.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
Replace this notice by a short README for your feature/bugfix. This will help people
1212
understand your PR and can be used as a start for the documentation.
1313
14-
Additionally (see https://symfony.com/roadmap):
14+
Additionally (see https://symfony.com/releases):
1515
- Always add tests and ensure they pass.
1616
- Never break backward compatibility (see https://symfony.com/bc).
1717
- Bug fixes must be submitted against the lowest maintained branch where they apply

‎src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@
153153
<td class="font-normal">{{ collector.symfonyeom }}</td>
154154
<td class="font-normal">{{ collector.symfonyeol }}</td>
155155
<td class="font-normal">
156-
<a href="https://symfony.com/roadmap?version={{ collector.symfonyminorversion }}#checker">View roadmap</a>
156+
<a href="https://symfony.com/releases/{{ collector.symfonyminorversion }}#release-checker">View roadmap</a>
157157
</td>
158158
</tr>
159159
</tbody>

‎src/Symfony/Component/Console/Application.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Application.php
+17-3Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,15 @@ public function find($name)
672672
// filter out aliases for commands which are already on the list
673673
if (\count($commands) > 1) {
674674
$commandList = $this->commandLoader ? array_merge(array_flip($this->commandLoader->getNames()), $this->commands) : $this->commands;
675-
$commands = array_unique(array_filter($commands, function ($nameOrAlias) use (&$commandList, $commands, &$aliases) {
675+
676+
if (isset($commandList[$name])) {
677+
return $this->get($name);
678+
}
679+
680+
foreach ($commands as $k => $nameOrAlias) {
681+
if ($nameOrAlias === $name) {
682+
return $this->get($nameOrAlias);
683+
}
676684
if (!$commandList[$nameOrAlias] instanceof Command) {
677685
$commandList[$nameOrAlias] = $this->commandLoader->get($nameOrAlias);
678686
}
@@ -681,8 +689,14 @@ public function find($name)
681689

682690
$aliases[$nameOrAlias] = $commandName;
683691

684-
return $commandName === $nameOrAlias || !\in_array($commandName, $commands);
685-
}));
692+
if ($commandName === $nameOrAlias || !\in_array($commandName, $commands)) {
693+
continue;
694+
}
695+
696+
unset($commands[$k]);
697+
}
698+
699+
$commands = array_unique($commands);
686700
}
687701

688702
if (\count($commands) > 1) {

‎src/Symfony/Component/Console/Tests/ApplicationTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Tests/ApplicationTest.php
+25Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1706,6 +1706,31 @@ public function testAllExcludesDisabledLazyCommand()
17061706
$this->assertArrayNotHasKey('disabled', $application->all());
17071707
}
17081708

1709+
public function testFindAlternativesDoesNotLoadSameNamespaceCommandsOnExactMatch()
1710+
{
1711+
$application = new Application();
1712+
$application->setAutoExit(false);
1713+
1714+
$loaded = [];
1715+
1716+
$application->setCommandLoader(new FactoryCommandLoader([
1717+
'foo:bar' => function () use (&$loaded) {
1718+
$loaded['foo:bar'] = true;
1719+
1720+
return (new Command('foo:bar'))->setCode(function () {});
1721+
},
1722+
'foo' => function () use (&$loaded) {
1723+
$loaded['foo'] = true;
1724+
1725+
return (new Command('foo'))->setCode(function () {});
1726+
},
1727+
]));
1728+
1729+
$application->run(new ArrayInput(['command' => 'foo']), new NullOutput());
1730+
1731+
$this->assertSame(['foo' => true], $loaded);
1732+
}
1733+
17091734
protected function getDispatcher($skipCommand = false)
17101735
{
17111736
$dispatcher = new EventDispatcher();

‎src/Symfony/Component/Finder/Finder.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Finder/Finder.php
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -797,6 +797,10 @@ private function searchInDirectory(string $dir): \Iterator
797797
*/
798798
private function normalizeDir(string $dir): string
799799
{
800+
if ('/' === $dir) {
801+
return $dir;
802+
}
803+
800804
$dir = rtrim($dir, '/'.\DIRECTORY_SEPARATOR);
801805

802806
if (preg_match('#^(ssh2\.)?s?ftp://#', $dir)) {

‎src/Symfony/Component/Finder/Iterator/RecursiveDirectoryIterator.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Finder/Iterator/RecursiveDirectoryIterator.php
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,11 @@ public function current()
7070
}
7171
$subPathname .= $this->getFilename();
7272

73-
return new SplFileInfo($this->rootPath.$this->directorySeparator.$subPathname, $this->subPath, $subPathname);
73+
if ('/' !== $basePath = $this->rootPath) {
74+
$basePath .= $this->directorySeparator;
75+
}
76+
77+
return new SplFileInfo($basePath.$subPathname, $this->subPath, $subPathname);
7478
}
7579

7680
/**

‎src/Symfony/Component/Validator/Resources/translations/validators.de.xlf

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Resources/translations/validators.de.xlf
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,10 @@
366366
<source>This value should be between {{ min }} and {{ max }}.</source>
367367
<target>Dieser Wert sollte zwischen {{ min }} und {{ max }} sein.</target>
368368
</trans-unit>
369+
<trans-unit id="95">
370+
<source>This value is not a valid hostname.</source>
371+
<target>Dieser Wert ist kein gültiger Hostname.</target>
372+
</trans-unit>
369373
</body>
370374
</file>
371375
</xliff>

‎src/Symfony/Component/Validator/Resources/translations/validators.en.xlf

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Resources/translations/validators.en.xlf
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,10 @@
366366
<source>This value should be between {{ min }} and {{ max }}.</source>
367367
<target>This value should be between {{ min }} and {{ max }}.</target>
368368
</trans-unit>
369+
<trans-unit id="95">
370+
<source>This value is not a valid hostname.</source>
371+
<target>This value is not a valid hostname.</target>
372+
</trans-unit>
369373
</body>
370374
</file>
371375
</xliff>

‎src/Symfony/Component/Validator/Resources/translations/validators.fr.xlf

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Resources/translations/validators.fr.xlf
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,10 @@
366366
<source>This value should be between {{ min }} and {{ max }}.</source>
367367
<target>Cette valeur doit être comprise entre {{ min }} et {{ max }}.</target>
368368
</trans-unit>
369+
<trans-unit id="95">
370+
<source>This value is not a valid hostname.</source>
371+
<target>Cette valeur n'est pas un nom d'hôte valide.</target>
372+
</trans-unit>
369373
</body>
370374
</file>
371375
</xliff>

‎src/Symfony/Component/Validator/Resources/translations/validators.ru.xlf

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Resources/translations/validators.ru.xlf
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,10 @@
366366
<source>This value should be between {{ min }} and {{ max }}.</source>
367367
<target>Значение должно быть между {{ min }} и {{ max }}.</target>
368368
</trans-unit>
369+
<trans-unit id="95">
370+
<source>This value is not a valid hostname.</source>
371+
<target>Значение не является корректным именем хоста.</target>
372+
</trans-unit>
369373
</body>
370374
</file>
371375
</xliff>

0 commit comments

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