From 6baf2f001a825dee1be3e2bd29182ef9132a8d61 Mon Sep 17 00:00:00 2001 From: Jaapio Date: Fri, 25 Aug 2023 08:38:08 +0200 Subject: [PATCH] Fix: allow renaming of the phar release 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 --- box/stub.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/box/stub.php b/box/stub.php index b4257a434..262f25124 100644 --- a/box/stub.php +++ b/box/stub.php @@ -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();