9 Commits

Author SHA1 Message Date
Gregory Oschwald
cb9c024699 Prepare for 0.6.1 2014-05-01 07:20:30 -07:00
Gregory Oschwald
e014aadf8d Merge pull request #13 from Seldaek/patch-1
Target compat autoload rules more narrowly
2014-04-25 05:50:18 -07:00
Jordi Boggiano
a043336cae Target compat autoload rules more narrowly 2014-04-25 14:13:31 +02:00
Gregory Oschwald
0c9b774015 Updated submodule 2014-04-14 07:15:31 -07:00
Gregory Oschwald
38bacff692 Clean up box.json 2014-04-11 17:21:33 -07:00
Gregory Oschwald
5cfe1353bb Added doc about using phar 2014-04-11 16:18:14 -07:00
Gregory Oschwald
6715f848bb Add box.json for creating phar 2014-04-11 16:13:20 -07:00
Gregory Oschwald
56407eff17 Test HHVM and 5.6 2014-04-03 10:59:16 -07:00
Gregory Oschwald
9b2fa1bcd1 Added note about creating composer.json 2014-03-06 13:23:20 -08:00
6 changed files with 71 additions and 11 deletions

View File

@@ -4,16 +4,18 @@ php:
- 5.3
- 5.4
- 5.5
- 5.6
- hhvm
before_install:
- composer self-update
- composer install --dev -n --prefer-source
- pyrus install pear/PHP_CodeSniffer
- if [ "hhvm" != "$(phpenv version-name)" ]; then pyrus install pear/PHP_CodeSniffer; fi
- phpenv rehash
script:
- mkdir -p build/logs
- phpcs --standard=PSR2 src/
- if [ "hhvm" != "$(phpenv version-name)" ]; then phpcs --standard=PSR2 src/; fi
- phpunit -c phpunit.xml.dist
after_script:

View File

@@ -1,6 +1,15 @@
CHANGELOG
=========
0.6.1 (2014-05-01)
------------------
* This API now officially supports HHVM.
* The `maxmind-db/reader` dependency was updated to a version that does not
require BC Math.
* The Composer compatibility autoload rules are now targeted more narrowly.
* A `box.json` file is included to build a Phar package.
0.6.0 (2014-02-19)
------------------

View File

@@ -7,12 +7,13 @@ This package provides an API for the GeoIP2 [web services]
(http://dev.maxmind.com/geoip/geoip2/downloadable). The API also works with
the free [GeoLite2 databases](http://dev.maxmind.com/geoip/geoip2/geolite2/).
## Installation ##
## 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.
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
{
@@ -45,7 +46,20 @@ You can autoload all dependencies by adding this to your code:
require 'vendor/autoload.php';
```
### Optional C Extension ###
## Installing via Phar ##
Although we strongly recommend using Composer, we also provide a
[phar archive](http://php.net/manual/en/book.phar.php) containing all of the
dependencies for GeoIP2. Our latest phar archive is available on
[our releases page](https://github.com/maxmind/GeoIP2-php/releases).
To use the archive, just require it from your script:
```php
require 'geoip2.phar';
```
## Optional C Extension ##
The [MaxMind DB API](https://github.com/maxmind/MaxMind-DB-Reader-php)
includes an optional C extension that you may install to dramatically increase
@@ -220,6 +234,8 @@ to the client API, please see
This code requires PHP 5.3 or greater. Older versions of PHP are not
supported.
This library works and is tested with HHVM.
This library also relies on the [Guzzle HTTP client](http://guzzlephp.org/)
and the [MaxMind DB Reader](https://github.com/maxmind/MaxMind-DB-Reader-php).
@@ -234,7 +250,7 @@ The GeoIP2 PHP API uses [Semantic Versioning](http://semver.org/).
## Copyright and License ##
This software is Copyright (c) 2013 by MaxMind, Inc.
This software is Copyright (c) 2014 by MaxMind, Inc.
This is free software, licensed under the Apache License, Version 2.0.

33
box.json Normal file
View File

@@ -0,0 +1,33 @@
{
"main": "vendor/autoload.php",
"output": "geoip2.phar",
"compactors": [
"Herrera\\Box\\Compactor\\Composer",
"Herrera\\Box\\Compactor\\Json",
"Herrera\\Box\\Compactor\\Php"
],
"files": [
"LICENSE"
],
"finder": [
{
"name": [
"*.php",
"*.pem",
"*.pem.md5"
],
"exclude": [
"phpunit",
"satooshi",
"Tests",
"tests",
"yaml"
],
"in": "vendor"
}
],
"directories": ["compat", "src/"],
"git-version": "git-version",
"stub": true
}

View File

@@ -1,7 +1,7 @@
{
"name": "geoip2/geoip2",
"description": "MaxMind GeoIP2 PHP API",
"keywords": [ "geoip", "geolocation", "maxmind" ],
"keywords": ["geoip", "geoip2", "geolocation", "ip", "maxmind"],
"homepage": "https://github.com/maxmind/GeoIP2-php",
"type": "library",
"license": "Apache-2.0",
@@ -14,7 +14,7 @@
],
"require": {
"guzzle/guzzle": "3.*",
"maxmind-db/reader": "0.3.*",
"maxmind-db/reader": "~0.3.1",
"php": ">=5.3.1"
},
"require-dev": {
@@ -24,7 +24,7 @@
"autoload": {
"psr-0": {
"GeoIp2": "src/",
"" : "compat/"
"JsonSerializable": "compat/"
}
}
}