From a1a9760f5bf873bff05368a35f79e6a237990f8c Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Wed, 7 Nov 2012 13:04:10 +0100 Subject: [PATCH] Document platform packages, closes #618 --- doc/02-libraries.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/doc/02-libraries.md b/doc/02-libraries.md index 6a765eb02..169222e08 100644 --- a/doc/02-libraries.md +++ b/doc/02-libraries.md @@ -26,6 +26,27 @@ vendor name. Supplying a vendor name is mandatory. username is usually a good bet. While package names are case insensitive, the convention is all lowercase and dashes for word separation. +## Platform packages + +Composer has platform packages, which are virtual packages for things that are +installed on the system but are not actually installable by composer. This +includes PHP itself, PHP extensions and some system libraries. + +* `php` represents the PHP version of the user, allowing you to apply + constraints, e.g. `>=5.4.0`. + +* `ext-` allows you to require PHP extensions (includes core + extensions). Versioning can be quite inconsistent here, so it's often + a good idea to just set the constraint to `*`. An example of an extension + package name is `ext-gd`. + +* `lib-` allows constraints to be made on versions of libraries used by + PHP. The following are available: `curl`, `iconv`, `libxml`, `openssl`, + `pcre`, `uuid`, `xsl`. + +You can use `composer show --platform` to get a list of your locally available +platform packages. + ## Specifying the version You need to specify the package's version some way. When you publish your