Skip to content

Commit 30c9632

Browse files
committed
Merge branch '2.4' into 2.5
* 2.4: (39 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 [Validator] The ratio of the ImageValidator is rounded to two decimals now [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. ... Conflicts: .travis.yml src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php src/Symfony/Component/HttpKernel/Kernel.php src/Symfony/Component/Process/PhpExecutableFinder.php
2 parents 748beed + 7182e91 commit 30c9632

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
@@ -521,11 +521,11 @@ public function getProcessedHelp()
521521

522522
$placeholders = array(
523523
'%command.name%',
524-
'%command.full_name%'
524+
'%command.full_name%',
525525
);
526526
$replacements = array(
527527
$name,
528-
$_SERVER['PHP_SELF'].' '.$name
528+
$_SERVER['PHP_SELF'].' '.$name,
529529
);
530530

531531
return str_replace($placeholders, $replacements, $this->getHelp());
@@ -534,7 +534,7 @@ public function getProcessedHelp()
534534
/**
535535
* Sets the aliases for the command.
536536
*
537-
* @param array $aliases An array of aliases for the command
537+
* @param string[] $aliases An array of aliases for the command
538538
*
539539
* @return Command The current instance
540540
*
@@ -544,6 +544,10 @@ public function getProcessedHelp()
544544
*/
545545
public function setAliases($aliases)
546546
{
547+
if (!is_array($aliases) && !$aliases instanceof \Traversable) {
548+
throw new \InvalidArgumentException('$aliases must be an array or an instance of \Traversable');
549+
}
550+
547551
foreach ($aliases as $alias) {
548552
$this->validateName($alias);
549553
}

0 commit comments

Comments
 (0)