You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (!isset(BasePackage::$stabilities[$stability])) {
388
-
thrownew \InvalidArgumentException('Invalid stability provided ('.$stability.'), must be one of: '.implode(', ', array_keys(BasePackage::$stabilities)));
387
+
if (!isset(BasePackage::STABILITIES[$stability])) {
388
+
thrownew \InvalidArgumentException('Invalid stability provided ('.$stability.'), must be one of: '.implode(', ', array_keys(BasePackage::STABILITIES)));
Copy file name to clipboardExpand all lines: src/Composer/Command/InitCommand.php
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -61,7 +61,7 @@ protected function configure()
61
61
newInputOption('homepage', null, InputOption::VALUE_REQUIRED, 'Homepage of package'),
62
62
newInputOption('require', null, InputOption::VALUE_IS_ARRAY | InputOption::VALUE_REQUIRED, 'Package to require with a version constraint, e.g. foo/bar:1.0.0 or foo/bar=1.0.0 or "foo/bar 1.0.0"', null, $this->suggestAvailablePackageInclPlatform()),
63
63
newInputOption('require-dev', null, InputOption::VALUE_IS_ARRAY | InputOption::VALUE_REQUIRED, 'Package to require for development with a version constraint, e.g. foo/bar:1.0.0 or foo/bar=1.0.0 or "foo/bar 1.0.0"', null, $this->suggestAvailablePackageInclPlatform()),
64
-
newInputOption('stability', 's', InputOption::VALUE_REQUIRED, 'Minimum stability (empty or one of: '.implode(', ', array_keys(BasePackage::$stabilities)).')'),
64
+
newInputOption('stability', 's', InputOption::VALUE_REQUIRED, 'Minimum stability (empty or one of: '.implode(', ', array_keys(BasePackage::STABILITIES)).')'),
65
65
newInputOption('license', 'l', InputOption::VALUE_REQUIRED, 'License of package'),
66
66
newInputOption('repository', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Add custom repositories, either by URL or using JSON arrays'),
67
67
newInputOption('autoload', 'a', InputOption::VALUE_REQUIRED, 'Add PSR-4 autoload mapping. Maps your package\'s namespace to the provided directory. (Expects a relative path, e.g. src/)'),
@@ -364,10 +364,10 @@ static function ($value) use ($minimumStability) {
364
364
return$minimumStability;
365
365
}
366
366
367
-
if (!isset(BasePackage::$stabilities[$value])) {
367
+
if (!isset(BasePackage::STABILITIES[$value])) {
368
368
thrownew \InvalidArgumentException(
369
369
'Invalid minimum stability "'.$value.'". Must be empty or one of: '.
0 commit comments