Skip to content

Commit

Permalink
Fix: allow renaming of the phar release
Browse files Browse the repository at this point in the history
By using phar::mapPhar we allow the current phar to be renamed
while files can still be loaded by it's orginal name.

Fixes #3562
  • Loading branch information
jaapio committed Aug 25, 2023
1 parent a94d944 commit 6baf2f0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions box/stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@


if (class_exists('Phar')) {
Phar::mapPhar('phpdocumentor.phar');
if (is_string(getenv('ANSICON'))) {
require 'phar://' . __FILE__ . '/.box/bin/check-requirements.php';
require 'phar://phpdocumentor.phar/.box/bin/check-requirements.php';
}

require 'phar://' . __FILE__ . '/bin/phpdoc';
require 'phar://phpdocumentor.phar/bin/phpdoc';
}

__HALT_COMPILER();

0 comments on commit 6baf2f0

Please sign in to comment.