Skip to content

Commit 79141db

Browse files
authored
Merge pull request #175 from maxmind/greg/fix-phar
Allow Phar to work outside of CLI applications. Closes #174.
2 parents 7644582 + 56f2037 commit 79141db

File tree

5 files changed

+14
-6
lines changed

5 files changed

+14
-6
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
CHANGELOG
22
=========
33

4+
2.12.1
5+
-------------------
6+
7+
* The `geoip2.phar` included in 2.12.0 would only work in CLI applications.
8+
This was due to a change in Box 3.x. The Phar should now work in all
9+
applications. This release only affects users of the Phar file.
10+
411
2.12.0 (2021-11-18)
512
-------------------
613

README.dev.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Steps for releasing:
55
2. Bump copyright year in `README.md`, if necessary.
66
3. Review `CHANGELOG.md` for completeness and correctness. Update its release
77
date.
8-
4. Install or update [hub](https://github.com/github/hub) as it used by the
8+
4. Install or update [gh](https://github.com/cli/cli) as it used by the
99
release script.
1010
5. Run `./dev-bin/release.sh`. This will build the phar, generate the docs,
1111
tag the release, push it to origin, and update the GH releases with the

box.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"alias": "geoip2.phar",
3-
"main": "phar-stub.php",
2+
"stub": "phar-stub.php",
3+
"main": false,
44
"output": "geoip2.phar",
55
"compactors": [
66
"KevinGH\\Box\\Compactor\\Php",
@@ -36,6 +36,5 @@
3636
"in": "src"
3737
}
3838
],
39-
"git-version": "git-version",
40-
"shebang": false
39+
"git-version": "git-version"
4140
}

dev-bin/release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,6 @@ message="$version
142142
143143
$notes"
144144

145-
hub release create -a "$phar" -m "$message" "$tag"
145+
gh release create --target "$(git branch --show-current)" -n "$message" "$tag" "$phar"
146146

147147
git push --tags

phar-stub.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
<?php
22

33
require_once 'phar://geoip2.phar/vendor/autoload.php';
4+
5+
__HALT_COMPILER();

0 commit comments

Comments
 (0)