10000 Merge branch '2.7' into 2.8 · Gladhon/symfony@ec1808f · GitHub
[go: up one dir, main page]

Skip to content

Commit ec1808f

Browse files
committed
Merge branch '2.7' into 2.8
* 2.7: Minor fixes [Console] Overcomplete argument exception message tweak.
2 parents 6404e8e + 2075d31 commit ec1808f

File tree

25 files changed

+32
-42
lines changed

25 files changed

+32
-42
lines changed

src/Symfony/Bridge/Twig/Tests/Extension/ExpressionExtensionTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace Symfony\Bridge\Twig\Tests\Extension;
1313

1414
use Symfony\Bridge\Twig\Extension\ExpressionExtension;
15-
use Symfony\Component\ExpressionLanguage\Expression;
1615

1716
class ExpressionExtensionTest extends \PHPUnit_Framework_TestCase
1817
{

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
use Symfony\Component\Finder\Finder;
2424
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
2525
use Symfony\Component\Config\FileLocator;
26-
use Symfony\Component\Validator\Validation;
2726

2827
/**
2928
* FrameworkExtension.

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
use Symfony\Component\DependencyInjection\Loader\ClosureLoader;
1919
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
2020
use Symfony\Component\DependencyInjection\Reference;
21-
use Symfony\Component\Validator\Validation;
2221

2322
abstract class FrameworkExtensionTest extends TestCase
2423
{

src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/SessionController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function welcomeAction(Request $request, $name = null)
4242

4343
public function logoutAction(Request $request)
4444
{
45-
$request->getSession('session')->invalidate();
45+
$request->getSession()->invalidate();
4646

4747
return new Response('Session cleared.');
4848
}

src/Symfony/Bundle/SecurityBundle/Command/UserPasswordEncoderCommand.php

Lines changed: 1 addition & 1 d 10000 eletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
105105

106106
return 1;
107107
}
108-
$passwordQuestion = $this->createPasswordQuestion($input, $output);
108+
$passwordQuestion = $this->createPasswordQuestion();
109109
$password = $io->askQuestion($passwordQuestion);
110110
}
111111

src/Symfony/Component/Console/Input/ArgvInput.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,12 @@ private function parseArgument($token)
176176

177177
// unexpected argument
178178
} else {
179-
throw new RuntimeException('Too many arguments.');
179+
$all = $this->definition->getArguments();
180+
if (count($all)) {
181+
throw new RuntimeException(sprintf('Too many arguments, expected arguments "%s".', implode('" "', array_keys($all))));
182+
}
183+
184+
throw new RuntimeException(sprintf('No arguments expected, got "%s".', $token));
180185
}
181186
}
182187

src/Symfony/Component/Console/Tests/Helper/LegacyDialogHelperTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -249,11 +249,6 @@ protected function getConsoleOutput($stderr)
249249
return $output;
250250
}
251251

252-
private function hasStderrSupport()
253-
{
254-
return false === $this->isRunningOS400();
255-
}
256-
257252
private function hasSttyAvailable()
258253
{
259254
exec('stty 2>&1', $output, $exitcode);

src/Symfony/Component/Console/Tests/Input/ArgvInputTest.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,17 @@ public function provideInvalidInput()
183183
array(
184184
array('cli.php', 'foo', 'bar'),
185185
new InputDefinition(),
186-
'Too many arguments.',
186+
'No arguments expected, got "foo".',
187+
),
188+
array(
189+
array('cli.php', 'foo', 'bar'),
190+
new InputDefinition(array(new InputArgument('number'))),
191+
'Too many arguments, expected arguments "number".',
192+
),
193+
array(
194+
array('cli.php', 'foo', 'bar', 'zzz'),
195+
new InputDefinition(array(new InputArgument('number'), new InputArgument('county'))),
196+
'Too many arguments, expected arguments "number" "county".',
187197
),
188198
array(
189199
array('cli.php', '--foo'),

src/Symfony/Component/Debug/Tests/DebugClassLoaderTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
use Symfony\Component\Debug\DebugClassLoader;
1515
use Symfony\Component\Debug\ErrorHandler;
16-
use Symfony\Component\Debug\Exception\ContextErrorException;
1716

1817
class DebugClassLoaderTest extends \PHPUnit_Framework_TestCase
1918
{

src/Symfony/Component/DependencyInjection/Compiler/ResolveReferencesToAliasesPass.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace Symfony\Component\DependencyInjection\Compiler;
1313

1414
use Symfony\Component\DependencyInjection\Alias;
15-
use Symfony\Component\DependencyInjection\Definition;
1615
use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException;
1716
use Symfony\Component\DependencyInjection\Reference;
1817
use Symfony\Component\DependencyInjection\ContainerBuilder;

0 commit comments

Comments
 (0)
0