Skip to content

Commit 32b125e

Browse files
committed
Added a changelog;
Chnaged the PHAR stub to not fail when reading the hash fails.
1 parent 24c44f5 commit 32b125e

File tree

2 files changed

+23
-6
lines changed

2 files changed

+23
-6
lines changed

RELEASE-0.1.2

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
* SHM::isMeetingRequirements() is now not abstract, and always returns TRUE.
2+
* Fixed loading order of adapters.
3+
* Chnaged the PHAR stub to not fail when reading the hash fails.
4+
* Doc and CS fixes.

stub.php

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,27 @@
2424
}
2525

2626
if (extension_loaded('phar')) {
27-
$phar = new Phar(__FILE__);
28-
$sig = $phar->getSignature();
29-
echo "{$sig['hash_type']} hash: {$sig['hash']}\n\n";
27+
try {
28+
$phar = new Phar(__FILE__);
29+
$sig = $phar->getSignature();
30+
echo "{$sig['hash_type']} hash: {$sig['hash']}\n\n";
31+
} catch(Exception $e) {
32+
echo <<<HEREDOC
33+
The PHAR extension is available, but was unable to read this PHAR file's hash.
34+
Regardless, you should not be having any trouble using the package by directly
35+
including the archive.
36+
37+
Exception details:
38+
HEREDOC
39+
. $e . "\n\n";
40+
}
3041
} else {
3142
echo <<<HEREDOC
32-
If you wish to use this package from this archive, you need to install and
33-
enable the PHAR extension. Otherwise, you must extract this archive, and include
34-
the autoloader instead.
43+
If you wish to use this package directly from this archive, you need to install
44+
and enable the PHAR extension. Otherwise, you must instead extract this archive,
45+
and include the autoloader.
46+
47+
3548
HEREDOC;
3649
}
3750

0 commit comments

Comments
 (0)