From e441dbb64e97c648bc23ec270b3d211da0532917 Mon Sep 17 00:00:00 2001 From: Gregory Oschwald Date: Mon, 14 Jul 2014 12:22:43 -0700 Subject: [PATCH] Simplify Composer instructions --- README.md | 36 ++++++++++++++++-------------------- maxmind-db | 2 +- 2 files changed, 17 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index c558801..2cb90b9 100644 --- a/README.md +++ b/README.md @@ -9,40 +9,36 @@ the free [GeoLite2 databases](http://dev.maxmind.com/geoip/geoip2/geolite2/). ## Install via Composer ## -### Define Your Dependencies ### - We recommend installing this package with [Composer](http://getcomposer.org/). -To do this, add `geoip2/geoip2` to your `composer.json` file. If you don't -have a `composer.json` file, create one in the root directory of your project. -```json -{ - "require": { - "geoip2/geoip2": "0.6.*" - } -} +### Downloading Composer ### + +To download Composer, run in the root directory of your project: + +```bash +curl -sS https://getcomposer.org/installer | php ``` -### Install Composer ### - -Run in your project root: - -``` -curl -s http://getcomposer.org/installer | php -``` +You should now have the file `composer.phar` in your project directory. ### Install Dependencies ### Run in your project root: ``` -php composer.phar install +php composer.phar require geoip2/geoip2:~0.6.3 ``` +You should now have the files `composer.json` and `composer.lock` as well as +the directory `vendor` in your project directory. If you use a version control +system, `composer.json` should be added to it. + ### Require Autoloader ### -You can autoload all dependencies by adding this to your code: -``` +After installing the dependencies, you need to require the Composer autoloader +from your code: + +```php require 'vendor/autoload.php'; ``` diff --git a/maxmind-db b/maxmind-db index f538654..c57c2cc 160000 --- a/maxmind-db +++ b/maxmind-db @@ -1 +1 @@ -Subproject commit f53865477d361101969853f8d418458fd58cdc74 +Subproject commit c57c2ccf4a0c7b000cd6cd9a4a4463e7b54d7d2c