7 Commits

Author SHA1 Message Date
Gregory Oschwald
9f0c743afd Prepare for 0.6.3 2014-05-12 10:53:20 -07:00
Gregory Oschwald
4e92cd0254 Fix for Phar path issue 2014-05-09 15:07:21 -07:00
Gregory Oschwald
d61ddda4ef Ignore phar 2014-05-08 15:30:59 -07:00
Gregory Oschwald
10ecb36d16 Prepare for 0.6.2 2014-05-08 15:30:23 -07:00
Gregory Oschwald
205483e14c Fix phar with new versions of Guzzle 2014-05-08 15:30:23 -07:00
Gregory Oschwald
6584b545ea Only run phpcs on 5.5. It is broken on 5.6 and hhvm. 2014-05-02 06:57:11 -07:00
Gregory Oschwald
ac6592b7a5 Wording tweak 2014-05-01 16:47:38 -07:00
6 changed files with 35 additions and 4 deletions

1
.gitignore vendored
View File

@@ -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?

View File

@@ -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:

View File

@@ -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)
------------------ ------------------

View File

@@ -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.

View File

@@ -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
View 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));
}
}