浏览代码

Merge pull request #1375 from igorw/missing-docs

Document batch notification API and cli command options
Jordi Boggiano 12 年之前
父节点
当前提交
dfb5516af6
共有 2 个文件被更改,包括 37 次插入11 次删除
  1. 22 0
      doc/03-cli.md
  2. 15 11
      doc/05-repositories.md

+ 22 - 0
doc/03-cli.md

@@ -41,6 +41,7 @@ while using some smart defaults.
 * **--require:** Package to require with a version constraint. Should be
 * **--require:** Package to require with a version constraint. Should be
   in format `foo/bar:1.0.0`.
   in format `foo/bar:1.0.0`.
 * **--require-dev:** Development requirements, see **--require**.
 * **--require-dev:** Development requirements, see **--require**.
+* **--stability (-s):** Value for the `minimum-stability` field.
 
 
 ## install
 ## install
 
 
@@ -139,6 +140,10 @@ terms you want to search for.
 
 
 You can also search for more than one term by passing multiple arguments.
 You can also search for more than one term by passing multiple arguments.
 
 
+### Options
+
+* **--only-name (-N):** Search only in name.
+
 ## show
 ## show
 
 
 To list all of the available packages, you can use the `show` command.
 To list all of the available packages, you can use the `show` command.
@@ -204,6 +209,22 @@ You should always run the `validate` command before you commit your
 
 
     $ php composer.phar validate
     $ php composer.phar validate
 
 
+## status
+
+If you often need to modify the code of your dependencies and they are
+installed from source, the `status` command allows you to check if you have
+local changes in any of them.
+
+    $ php composer.phar status
+
+With the `--verbose` option you get some more information about what was
+changed:
+
+    $ php composer.phar status -v
+    You have changes in the following dependencies:
+    vendor/seld/jsonlint:
+        M README.mdown
+
 ## self-update
 ## self-update
 
 
 To update composer itself to the latest version, just run the `self-update`
 To update composer itself to the latest version, just run the `self-update`
@@ -283,6 +304,7 @@ By default the command checks for the packages on packagist.org.
 * **--repository-url:** Provide a custom repository to search for the package,
 * **--repository-url:** Provide a custom repository to search for the package,
   which will be used instead of packagist. Can be either an HTTP URL pointing
   which will be used instead of packagist. Can be either an HTTP URL pointing
   to a `composer` repository, or a path to a local `packages.json` file.
   to a `composer` repository, or a path to a local `packages.json` file.
+* **--stability (-s):** Minimum stability of package. Defaults to `stable`.
 * **--prefer-source:** Install packages from `source` when available.
 * **--prefer-source:** Install packages from `source` when available.
 * **--prefer-dist:** Install packages from `dist` when available.
 * **--prefer-dist:** Install packages from `dist` when available.
 * **--dev:** Install packages listed in `require-dev`.
 * **--dev:** Install packages listed in `require-dev`.

+ 15 - 11
doc/05-repositories.md

@@ -97,26 +97,30 @@ Here is a minimal package definition:
 
 
 It may include any of the other fields specified in the [schema](04-schema.md).
 It may include any of the other fields specified in the [schema](04-schema.md).
 
 
-#### notify
+#### notify_batch
 
 
-The `notify` field allows you to specify an URL template for a URL that will
-be called every time a user installs a package. The URL can be either an
-absolute path (that will use the same domain as the repository) or a fully
-qualified URL.
+The `notify_batch` field allows you to specify an URL that will be called
+every time a user installs a package. The URL can be either an absolute path
+(that will use the same domain as the repository) or a fully qualified URL.
 
 
 An example value:
 An example value:
 
 
     {
     {
-        "notify": "/downloads/%package%"
+        "notify_batch": "/downloads/"
     }
     }
 
 
 For `example.org/packages.json` containing a `monolog/monolog` package, this
 For `example.org/packages.json` containing a `monolog/monolog` package, this
-would send a `POST` request to `example.org/downloads/monolog/monolog` with
-following parameters:
+would send a `POST` request to `example.org/downloads/` with following
+JSON request body:
 
 
-* **version:** The version of the package.
-* **version_normalized:** The normalized internal representation of the
-  version.
+    {
+        "downloads": [
+            {"name": "monolog/monolog", "version": "1.2.1.0"},
+        ]
+    }
+
+The version field will contain the normalized representation of the version
+number.
 
 
 This field is optional.
 This field is optional.