Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9f0c743afd | ||
|
|
4e92cd0254 | ||
|
|
d61ddda4ef | ||
|
|
10ecb36d16 | ||
|
|
205483e14c | ||
|
|
6584b545ea | ||
|
|
ac6592b7a5 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -4,6 +4,7 @@ _site
|
|||||||
composer.lock
|
composer.lock
|
||||||
composer.phar
|
composer.phar
|
||||||
phpunit.xml
|
phpunit.xml
|
||||||
|
geoip2.phar
|
||||||
geoip2-php.sublime-*
|
geoip2-php.sublime-*
|
||||||
vendor/
|
vendor/
|
||||||
*.sw?
|
*.sw?
|
||||||
|
|||||||
@@ -10,12 +10,12 @@ php:
|
|||||||
before_install:
|
before_install:
|
||||||
- composer self-update
|
- composer self-update
|
||||||
- composer install --dev -n --prefer-source
|
- composer install --dev -n --prefer-source
|
||||||
- if [ "hhvm" != "$(phpenv version-name)" ]; then pyrus install pear/PHP_CodeSniffer; fi
|
- if [ "5.5" == $TRAVIS_PHP_VERSION ]; then pyrus install pear/PHP_CodeSniffer; fi
|
||||||
- phpenv rehash
|
- phpenv rehash
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- mkdir -p build/logs
|
- mkdir -p build/logs
|
||||||
- if [ "hhvm" != "$(phpenv version-name)" ]; then phpcs --standard=PSR2 src/; fi
|
- if [ "5.5" == $TRAVIS_PHP_VERSION ]; then phpcs --standard=PSR2 src/; fi
|
||||||
- phpunit -c phpunit.xml.dist
|
- phpunit -c phpunit.xml.dist
|
||||||
|
|
||||||
after_script:
|
after_script:
|
||||||
|
|||||||
12
CHANGELOG.md
12
CHANGELOG.md
@@ -1,6 +1,18 @@
|
|||||||
CHANGELOG
|
CHANGELOG
|
||||||
=========
|
=========
|
||||||
|
|
||||||
|
0.6.3 (2014-05-12)
|
||||||
|
------------------
|
||||||
|
|
||||||
|
* With the previous Phar builds, some users received `phar error: invalid url
|
||||||
|
or non-existent phar` errors. The correct alias is now used for the Phar,
|
||||||
|
and this should no longer be an issue.
|
||||||
|
|
||||||
|
0.6.2 (2014-05-08)
|
||||||
|
------------------
|
||||||
|
|
||||||
|
* The Phar build was broken with Guzzle 3.9.0+. This has been fixed.
|
||||||
|
|
||||||
0.6.1 (2014-05-01)
|
0.6.1 (2014-05-01)
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ classes for the different parts of the data such as the city in which the
|
|||||||
IP address is located.
|
IP address is located.
|
||||||
|
|
||||||
If the record is not found, a `\GeoIp2\Exception\AddressNotFoundException`
|
If the record is not found, a `\GeoIp2\Exception\AddressNotFoundException`
|
||||||
is returned. If the database is invalid or corrupt, a
|
is thrown. If the database is invalid or corrupt, a
|
||||||
`\MaxMind\Db\InvalidDatabaseException` will be thrown.
|
`\MaxMind\Db\InvalidDatabaseException` will be thrown.
|
||||||
|
|
||||||
See the API documentation for more details.
|
See the API documentation for more details.
|
||||||
|
|||||||
3
box.json
3
box.json
@@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"main": "vendor/autoload.php",
|
"alias": "geoip2.phar",
|
||||||
|
"main": "phar-stub.php",
|
||||||
"output": "geoip2.phar",
|
"output": "geoip2.phar",
|
||||||
"compactors": [
|
"compactors": [
|
||||||
"Herrera\\Box\\Compactor\\Composer",
|
"Herrera\\Box\\Compactor\\Composer",
|
||||||
|
|||||||
17
phar-stub.php
Normal file
17
phar-stub.php
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
require_once 'phar://geoip2.phar/vendor/autoload.php';
|
||||||
|
|
||||||
|
// The following was taken from Guzzle (MIT license)
|
||||||
|
|
||||||
|
// Copy the cacert.pem file from the phar if it is not in the temp folder.
|
||||||
|
$from = 'phar://geoip2.phar/vendor/guzzle/guzzle/src/Guzzle/Http/Resources/cacert.pem';
|
||||||
|
$certFile = sys_get_temp_dir() . '/guzzle-cacert.pem';
|
||||||
|
|
||||||
|
// Only copy when the file size is different
|
||||||
|
if (!file_exists($certFile) || filesize($certFile) != filesize($from)) {
|
||||||
|
if (!copy($from, $certFile)) {
|
||||||
|
throw new RuntimeException("Could not copy {$from} to {$certFile}: "
|
||||||
|
. var_export(error_get_last(), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user