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 0102e1e

Browse filesBrowse files
Merge branch '7.0' into 7.1
* 7.0: [Console] Allow false as a $shortcut in InputOption [MonologBridge] Support symfony/security-core 5.4 again Fix plurial of word ending by pus
2 parents ae9ebad + b81d970 commit 0102e1e
Copy full SHA for 0102e1e

File tree

4 files changed

+11
-1
lines changed
Filter options

4 files changed

+11
-1
lines changed

‎src/Symfony/Component/Console/Input/InputOption.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Input/InputOption.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public function __construct(
7979
throw new InvalidArgumentException('An option name cannot be empty.');
8080
}
8181

82-
if ('' === $shortcut || [] === $shortcut) {
82+
if ('' === $shortcut || [] === $shortcut || false === $shortcut) {
8383
$shortcut = null;
8484
}
8585

‎src/Symfony/Component/Console/Tests/Input/InputOptionTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Tests/Input/InputOptionTest.php
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ public function testShortcut()
7373
$this->assertEquals('0|z', $option->getShortcut(), '-0 is an acceptable shortcut value when embedded in an array');
7474
$option = new InputOption('foo', '0|z');
7575
$this->assertEquals('0|z', $option->getShortcut(), '-0 is an acceptable shortcut value when embedded in a string-list');
76+
$option = new InputOption('foo', false);
77+
$this->assertNull($option->getShortcut(), '__construct() makes the shortcut null when given a false as value');
7678
}
7779

7880
public function testModes()

‎src/Symfony/Component/String/Inflector/EnglishInflector.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/String/Inflector/EnglishInflector.php
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,12 @@ final class EnglishInflector implements InflectorInterface
291291
// circuses (circus)
292292
['suc', 3, true, true, 'cuses'],
293293

294+
// hippocampi (hippocampus)
295+
['supmacoppih', 11, false, false, 'hippocampi'],
296+
297+
// campuses (campus)
298+
['sup', 3, true, true, 'puses'],
299+
294300
// status (status)
295301
['sutats', 6, true, true, ['status', 'statuses']],
296302

‎src/Symfony/Component/String/Tests/Inflector/EnglishInflectorTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/String/Tests/Inflector/EnglishInflectorTest.php
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,8 @@ public static function pluralizeProvider()
298298
['waltz', 'waltzes'],
299299
['wife', 'wives'],
300300
['icon', 'icons'],
301+
['hippocampus', 'hippocampi'],
302+
['campus', 'campuses'],
301303

302304
// test casing: if the first letter was uppercase, it should remain so
303305
['Man', 'Men'],

0 commit comments

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