Skip to content

Commit 7182e91

Browse files
committed
Merge branch '2.3' into 2.4
* 2.3: (35 commits) [Form] Fix PHPDoc for builder setData methods The underlying data variable is typed as mixed whereas the methods paramers where typed as array. fixed CS [Intl] Improved bundle reader implementations [Console] guarded against invalid aliases switch before_script to before_install and script to install fixed typo [HttpFoundation] Request - URI - comment improvements [Security] Added more tests remove `service` parameter type from XSD [Intl] Added exception handler to command line scripts [Intl] Fixed a few bugs in TextBundleWriter [Intl] Updated icu.ini up to ICU 53 [Intl] Removed non-working $fallback argument from ArrayAccessibleResourceBundle Use separated function to resolve command and related arguments [SwiftmailerBridge] Bump allowed versions of swiftmailer [FrameworkBundle] Remove invalid markup [Intl] Added "internal" tag to all classes under Symfony\Component\Intl\ResourceBundle Remove routes for removed WebProfiler actions [Security] Fix usage of unexistent method in DoctrineAclCache. backport more error information from 2.6 to 2.3 ... Conflicts: .travis.yml src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php src/Symfony/Component/HttpKernel/Kernel.php src/Symfony/Component/Process/PhpExecutableFinder.php
2 parents 6cdbe19 + 60873e7 commit 7182e91

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

Command/Command.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -491,11 +491,11 @@ public function getProcessedHelp()
491491

492492
$placeholders = array(
493493
'%command.name%',
494-
'%command.full_name%'
494+
'%command.full_name%',
495495
);
496496
$replacements = array(
497497
$name,
498-
$_SERVER['PHP_SELF'].' '.$name
498+
$_SERVER['PHP_SELF'].' '.$name,
499499
);
500500

501501
return str_replace($placeholders, $replacements, $this->getHelp());
@@ -504,7 +504,7 @@ public function getProcessedHelp()
504504
/**
505505
* Sets the aliases for the command.
506506
*
507-
* @param array $aliases An array of aliases for the command
507+
* @param string[] $aliases An array of aliases for the command
508508
*
509509
* @return Command The current instance
510510
*
@@ -514,6 +514,10 @@ public function getProcessedHelp()
514514
*/
515515
public function setAliases($aliases)
516516
{
517+
if (!is_array($aliases) && !$aliases instanceof \Traversable) {
518+
throw new \InvalidArgumentException('$aliases must be an array or an instance of \Traversable');
519+
}
520+
517521
foreach ($aliases as $alias) {
518522
$this->validateName($alias);
519523
}

0 commit comments

Comments
 (0)