From be47869f56e6eda0f96bb405f6153b992fa1e844 Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Mon, 20 Feb 2012 14:22:16 +0100 Subject: [PATCH 1/8] [docs] add repository sections for pear and package repos --- doc/05-repositories.md | 65 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/doc/05-repositories.md b/doc/05-repositories.md index 6c465cdff..4fdc680cb 100644 --- a/doc/05-repositories.md +++ b/doc/05-repositories.md @@ -148,6 +148,71 @@ The VCS driver to be used is detected automatically based on the URL. ### PEAR +It is possible to install packages from any PEAR channel by using the `pear` +repository. Composer will prefix all package names with `pear-{channelName}/` to +avoid conflicts. + +Example using `pear2.php.net`: + +```json +{ + "repositories": [ + { + "type": "pear", + "url": "http://pear2.php.net" + } + ], + "require": { + "pear-pear2/PEAR2_HTTP_Request": "*" + } +} +``` + +In this case the short name of the channel is `pear2`, so the +`PEAR2_HTTP_Request` package name becomes `pear-pear2/PEAR2_HTTP_Request`. + +> **Note:** The `pear` repository requires doing quite a few requests per +> package, so this may considerably slow down the installation process. + ### Package +If you want to use a project that does not support composer through any of the +means above, you still can define the package yourself using a `package` +repository. + +Basically, you define the same information that is included in the `composer` +repository's `packages.json`, but only for a single package. Again, the +minimally required fields are `name`, `version`, and either of `dist` or +`source`. + +Here is an example for the smarty template engine: + +```json +{ + "repositories": [ + { + "type": "package", + "package": { + "name": "smarty/smarty", + "version": "3.1.7", + "dist": { + "url": "http://www.smarty.net/files/Smarty-3.1.7.zip", + "type": "zip" + }, + "source": { + "url": "http://smarty-php.googlecode.com/svn/", + "type": "svn", + "reference": "trunk" + } + } + } + ], + "require": { + "smarty/smarty": "3.1.*" + } +} +``` + +Typically you would leave the source part off, as you don't really need it. + ## Hosting your own From 397ca5ddbf5cfc2c0693521f540e3003ec2bca54 Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Mon, 20 Feb 2012 15:32:22 +0100 Subject: [PATCH 2/8] [docs] add section to repositories about hosting your own composer repo --- doc/05-repositories.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/doc/05-repositories.md b/doc/05-repositories.md index 4fdc680cb..8b88be0ba 100644 --- a/doc/05-repositories.md +++ b/doc/05-repositories.md @@ -216,3 +216,28 @@ Here is an example for the smarty template engine: Typically you would leave the source part off, as you don't really need it. ## Hosting your own + +While you will probably want to put your packages on packagist most of the time, there are some use cases for hosting your own repository. + +* **Private company packages:** If you are part of a company that uses composer for their packages internally, you might want to keep those packages private. +* **Separate ecosystem:** If you have a project which has its own ecosystem, and the packages aren't really reusable by the greater PHP community, you might want to keep them separate to packagist. An example of this would be wordpress plugins. + +When hosting your own package repository it is recommended to use a `composer` one. This is type that is native to composer and yields the best performance. + +There are a few different tools that can help you create a `composer` repository. + +### Packagist + +The underlying application used by packagist is open source. This means that you can just install your own copy of packagist, re-brand, and use it. It's really quite straight-forward to do. + +Packagist is a Symfony2 application, and it is [available on GitHub](https://github.com/composer/packagist). It uses composer internally and acts as a proxy between VCS repositories and the composer users. It holds a list of all VCS packages, periodically re-crawls them, and exposes them as a composer repository. + +To put set your own copy, simply follow the instructions from the [packagist github repository](https://github.com/composer/packagist). + +### Satis + +Satis is a static `composer` repository generator. It is a bit like a ultra-lightweight, file-based version of packagist. + +You give it a `composer.json` containing repositories, typically VCS and package repository definitions. It will fetch all the packages from these repositories and dump a `packages.json` that is your `composer` repository. + +Check [the satis GitHub repository](https://github.com/composer/satis) for more information. From 1dc25641c04c3ae16fec26e0b1392df34d881e95 Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Mon, 20 Feb 2012 15:41:05 +0100 Subject: [PATCH 3/8] [docs] wrap newlines at 80 chars --- doc/05-repositories.md | 41 ++++++++++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 11 deletions(-) diff --git a/doc/05-repositories.md b/doc/05-repositories.md index 8b88be0ba..6b6a60f84 100644 --- a/doc/05-repositories.md +++ b/doc/05-repositories.md @@ -217,27 +217,46 @@ Typically you would leave the source part off, as you don't really need it. ## Hosting your own -While you will probably want to put your packages on packagist most of the time, there are some use cases for hosting your own repository. +While you will probably want to put your packages on packagist most of the time, +there are some use cases for hosting your own repository. -* **Private company packages:** If you are part of a company that uses composer for their packages internally, you might want to keep those packages private. -* **Separate ecosystem:** If you have a project which has its own ecosystem, and the packages aren't really reusable by the greater PHP community, you might want to keep them separate to packagist. An example of this would be wordpress plugins. +* **Private company packages:** If you are part of a company that uses composer + for their packages internally, you might want to keep those packages private. -When hosting your own package repository it is recommended to use a `composer` one. This is type that is native to composer and yields the best performance. +* **Separate ecosystem:** If you have a project which has its own ecosystem, + and the packages aren't really reusable by the greater PHP community, you + might want to keep them separate to packagist. An example of this would be + wordpress plugins. -There are a few different tools that can help you create a `composer` repository. +When hosting your own package repository it is recommended to use a `composer` +one. This is type that is native to composer and yields the best performance. + +There are a few different tools that can help you create a `composer` +repository. ### Packagist -The underlying application used by packagist is open source. This means that you can just install your own copy of packagist, re-brand, and use it. It's really quite straight-forward to do. +The underlying application used by packagist is open source. This means that you +can just install your own copy of packagist, re-brand, and use it. It's really +quite straight-forward to do. -Packagist is a Symfony2 application, and it is [available on GitHub](https://github.com/composer/packagist). It uses composer internally and acts as a proxy between VCS repositories and the composer users. It holds a list of all VCS packages, periodically re-crawls them, and exposes them as a composer repository. +Packagist is a Symfony2 application, and it is [available on +GitHub](https://github.com/composer/packagist). It uses composer internally and +acts as a proxy between VCS repositories and the composer users. It holds a list +of all VCS packages, periodically re-crawls them, and exposes them as a composer +repository. -To put set your own copy, simply follow the instructions from the [packagist github repository](https://github.com/composer/packagist). +To put set your own copy, simply follow the instructions from the [packagist +github repository](https://github.com/composer/packagist). ### Satis -Satis is a static `composer` repository generator. It is a bit like a ultra-lightweight, file-based version of packagist. +Satis is a static `composer` repository generator. It is a bit like a ultra- +lightweight, file-based version of packagist. -You give it a `composer.json` containing repositories, typically VCS and package repository definitions. It will fetch all the packages from these repositories and dump a `packages.json` that is your `composer` repository. +You give it a `composer.json` containing repositories, typically VCS and package +repository definitions. It will fetch all the packages from these repositories +and dump a `packages.json` that is your `composer` repository. -Check [the satis GitHub repository](https://github.com/composer/satis) for more information. +Check [the satis GitHub repository](https://github.com/composer/satis) for more +information. From 08af50220e8b1696237f06332b086e9b587975da Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Mon, 20 Feb 2012 15:57:19 +0100 Subject: [PATCH 4/8] [docs] add community chapter --- doc/06-community.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 doc/06-community.md diff --git a/doc/06-community.md b/doc/06-community.md new file mode 100644 index 000000000..edb546423 --- /dev/null +++ b/doc/06-community.md @@ -0,0 +1,37 @@ +# Community + +We have a lot of people using composer, and also many contributors to the +project. + +## Contributing + +If you would like to contribute to composer, please read the +[README](https://github.com/composer/composer). + +The most important guidelines are described as follows: + +> All code contributions - including those of people having commit access - must +> go through a pull request and approved by a core developer before being +> merged. This is to ensure proper review of all the code. +> +> Fork the project, create a feature branch, and send us a pull request. + +## IRC / mailing list + +The developer mailing list is on [google groups](http://groups.google.com/group +/composer-dev) IRC channels are available for discussion as well, on +irc.freenode.org [#composer](irc://irc.freenode.org/composer) for users and +[#composer-dev](irc://irc.freenode.org/composer-dev) for development. + +## Resources + +### Blog posts + +* [Composer: Part 1 – What & Why](http://nelm.io/blog/2011/12/composer-part-1-what-why/) +* [Composer: Part 2 – Impact](http://nelm.io/blog/2011/12/composer-part-2-impact/) +* [An Update On Composer](http://nelm.io/blog/2012/02/an-update-on-composer/) + +### Slides + +* [Dependency Management with Composer - Jordi Boggiano](http://slides.seld.be/?file=2012-02-14+Dependency+Management+with+Composer.html) +* [Composer - Nils Adermann](http://www.slideshare.net/naderman/composer-php-usergroup-karlsruhe) From 1f6ac63d8559c795ab1f7d379284bee0f0c21323 Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Mon, 20 Feb 2012 16:05:18 +0100 Subject: [PATCH 5/8] [docs] remove resources from community --- doc/06-community.md | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/doc/06-community.md b/doc/06-community.md index edb546423..72a257589 100644 --- a/doc/06-community.md +++ b/doc/06-community.md @@ -22,16 +22,3 @@ The developer mailing list is on [google groups](http://groups.google.com/group /composer-dev) IRC channels are available for discussion as well, on irc.freenode.org [#composer](irc://irc.freenode.org/composer) for users and [#composer-dev](irc://irc.freenode.org/composer-dev) for development. - -## Resources - -### Blog posts - -* [Composer: Part 1 – What & Why](http://nelm.io/blog/2011/12/composer-part-1-what-why/) -* [Composer: Part 2 – Impact](http://nelm.io/blog/2011/12/composer-part-2-impact/) -* [An Update On Composer](http://nelm.io/blog/2012/02/an-update-on-composer/) - -### Slides - -* [Dependency Management with Composer - Jordi Boggiano](http://slides.seld.be/?file=2012-02-14+Dependency+Management+with+Composer.html) -* [Composer - Nils Adermann](http://www.slideshare.net/naderman/composer-php-usergroup-karlsruhe) From b71db7607d95705f2c099f767e22914507eb9b1d Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Mon, 20 Feb 2012 16:06:28 +0100 Subject: [PATCH 6/8] [docs] fix smarty source reference --- doc/04-schema.md | 2 +- doc/05-repositories.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/04-schema.md b/doc/04-schema.md index 2c9383ee3..9660584ba 100644 --- a/doc/04-schema.md +++ b/doc/04-schema.md @@ -288,7 +288,7 @@ Example: "source": { "url": "http://smarty-php.googlecode.com/svn/", "type": "svn", - "reference": "trunk" + "reference": "tags/Smarty_3_1_7/distribution/" } } } diff --git a/doc/05-repositories.md b/doc/05-repositories.md index 6b6a60f84..cd577dbf7 100644 --- a/doc/05-repositories.md +++ b/doc/05-repositories.md @@ -202,7 +202,7 @@ Here is an example for the smarty template engine: "source": { "url": "http://smarty-php.googlecode.com/svn/", "type": "svn", - "reference": "trunk" + "reference": "tags/Smarty_3_1_7/distribution/" } } } From 9cc02a7596bf82bb37f611170e4cac9dee6cdaff Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Mon, 20 Feb 2012 16:10:38 +0100 Subject: [PATCH 7/8] [docs] minor fixes --- doc/05-repositories.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/05-repositories.md b/doc/05-repositories.md index cd577dbf7..4cdcf866a 100644 --- a/doc/05-repositories.md +++ b/doc/05-repositories.md @@ -246,7 +246,7 @@ acts as a proxy between VCS repositories and the composer users. It holds a list of all VCS packages, periodically re-crawls them, and exposes them as a composer repository. -To put set your own copy, simply follow the instructions from the [packagist +To set your own copy, simply follow the instructions from the [packagist github repository](https://github.com/composer/packagist). ### Satis @@ -255,8 +255,9 @@ Satis is a static `composer` repository generator. It is a bit like a ultra- lightweight, file-based version of packagist. You give it a `composer.json` containing repositories, typically VCS and package -repository definitions. It will fetch all the packages from these repositories -and dump a `packages.json` that is your `composer` repository. +repository definitions. It will fetch all the packages that are `require`d from +these repositories and dump a `packages.json` that is your `composer` +repository. Check [the satis GitHub repository](https://github.com/composer/satis) for more information. From e4143f98c5a40fab19ebddf3cb5789b1b35d7806 Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Mon, 20 Feb 2012 16:25:11 +0100 Subject: [PATCH 8/8] [docs] mention coding standards --- README.md | 4 ++++ doc/06-community.md | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/README.md b/README.md index 9dae242e9..d0ca984a1 100644 --- a/README.md +++ b/README.md @@ -97,6 +97,10 @@ merged. This is to ensure proper review of all the code. Fork the project, create a feature branch, and send us a pull request. +To ensure a consistent code base, you should make sure the code follows +the [Coding Standards](http://symfony.com/doc/2.0/contributing/code/standards.html) +which we borrowed from Symfony. + If you would like to help take a look at the [list of issues](http://github.com/composer/composer/issues). Community diff --git a/doc/06-community.md b/doc/06-community.md index 72a257589..35a92092a 100644 --- a/doc/06-community.md +++ b/doc/06-community.md @@ -15,6 +15,10 @@ The most important guidelines are described as follows: > merged. This is to ensure proper review of all the code. > > Fork the project, create a feature branch, and send us a pull request. +> +> To ensure a consistent code base, you should make sure the code follows +> the [Coding Standards](http://symfony.com/doc/2.0/contributing/code/standards.html) +> which we borrowed from Symfony. ## IRC / mailing list