Browse Source

Rename to "scripts-descriptions"

Mathias Brodala 7 years ago
parent
commit
8424235fac
3 changed files with 5 additions and 5 deletions
  1. 1 1
      doc/articles/scripts.md
  2. 1 1
      res/composer-schema.json
  3. 3 3
      src/Composer/Console/Application.php

+ 1 - 1
doc/articles/scripts.md

@@ -282,7 +282,7 @@ You can set custom script descriptions with the following in your `composer.json
 
 ```json
 {
-    "scripts-description": {
+    "scripts-descriptions": {
         "test": "Run all tests!"
     }
 }

+ 1 - 1
res/composer-schema.json

@@ -447,7 +447,7 @@
                 }
             }
         },
-        "scripts-description": {
+        "scripts-descriptions": {
             "type": ["object"],
             "description": "Descriptions for scripts listeners, shown in console help.",
             "additionalProperties": {

+ 3 - 3
src/Composer/Console/Application.php

@@ -230,10 +230,10 @@ class Application extends BaseApplication
                             } else {
                                 $description = null;
 
-                                if (isset($composer['scripts-description'][$script])) {
-                                    $description = $composer['scripts-description'][$script];
+                                if (isset($composer['scripts-descriptions'][$script])) {
+                                    $description = $composer['scripts-descriptions'][$script];
                                 } elseif (isset($composer['extra']['scripts-description'][$script])) {
-                                    $io->writeError('<warning>You are using "scripts-description" in "extra" which is deprecated. Move "scripts-description" to the topmost level next to "scripts" instead.</warning>');
+                                    $io->writeError('<warning>You are using "scripts-description" in "extra" which is deprecated. Use "scripts-descriptions" on the topmost level next to "scripts" instead.</warning>');
                                     $description = $composer['extra']['scripts-description'][$script];
                                 }