1
0
mirror of https://github.com/php/pie.git synced 2026-03-23 23:12:17 +01:00

537: fix deprecated output when using Box

- PIE issue: https://github.com/php/pie/issues/537
 - Upstream box issue: https://github.com/box-project/box/issues/1577

Can probably be reverted once the Box issue is fixed & released :)
This commit is contained in:
James Titcumb
2026-03-17 07:49:52 +00:00
parent 9f845c2222
commit 10eb8469f4
2 changed files with 20 additions and 0 deletions

View File

@@ -2,6 +2,7 @@
"alias": "pie.phar",
"output": "pie.phar",
"git": "pie_version",
"stub": "phar-stub.php",
"force-autodiscovery": true,
"directories": [
"resources"

19
phar-stub.php Normal file
View File

@@ -0,0 +1,19 @@
#!/usr/bin/env php
<?php
declare(strict_types=1);
// echo "James says hello :)\n";
// Workaround for https://github.com/php/pie/issues/537 and https://github.com/box-project/box/issues/1577
error_reporting(error_reporting() & ~E_DEPRECATED);
Phar::mapPhar('pie.phar');
require 'phar://pie.phar/.box/bin/check-requirements.php';
$_SERVER['SCRIPT_FILENAME'] = 'phar://pie.phar/bin/pie';
require 'phar://pie.phar/bin/pie';
// phpcs:ignore Generic.Files.InlineHTML.Found
__HALT_COMPILER(); ?>