Prechádzať zdrojové kódy

Merge pull request #6632 from Deamon/issue-6627-update-doc-packages-configuration

Document how to define multiple versions in a package repository
Jordi Boggiano 7 rokov pred
rodič
commit
1a710bb1e8
1 zmenil súbory, kde vykonal 24 pridanie a 0 odobranie
  1. 24 0
      doc/05-repositories.md

+ 24 - 0
doc/05-repositories.md

@@ -518,6 +518,30 @@ Typically you would leave the source part off, as you don't really need it.
 >   reference you will have to delete the package to force an update, and will
 >   reference you will have to delete the package to force an update, and will
 >   have to deal with an unstable lock file.
 >   have to deal with an unstable lock file.
 
 
+"package" option can also get an array as value. Using this, you can define several versions of your package like this :  
+
+```json
+{
+    "repositories": [
+        {
+            "type": "package",
+            "package": [
+                {
+                    "name": "foo/bar",
+                    "version": "1.0.0",
+                    ...
+                },
+                {
+                    "name": "foo/bar",
+                    "version": "2.0.0",
+                    ...
+                }
+            ]
+        }
+    ]
+}
+```
+
 ## Hosting your own
 ## Hosting your own
 
 
 While you will probably want to put your packages on packagist most of the
 While you will probably want to put your packages on packagist most of the