Skip to content

Commit 4fa1169

Browse files
authored
Merge pull request #548 from asgrim/537-fix-deprecation-warnings-from-box
537: fix deprecated output when using Box
2 parents 9f845c2 + 10eb846 commit 4fa1169

2 files changed

Lines changed: 20 additions & 0 deletions

File tree

box.json.dist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"alias": "pie.phar",
33
"output": "pie.phar",
44
"git": "pie_version",
5+
"stub": "phar-stub.php",
56
"force-autodiscovery": true,
67
"directories": [
78
"resources"

phar-stub.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/usr/bin/env php
2+
<?php
3+
4+
declare(strict_types=1);
5+
6+
// echo "James says hello :)\n";
7+
8+
// Workaround for https://github.com/php/pie/issues/537 and https://github.com/box-project/box/issues/1577
9+
error_reporting(error_reporting() & ~E_DEPRECATED);
10+
11+
Phar::mapPhar('pie.phar');
12+
13+
require 'phar://pie.phar/.box/bin/check-requirements.php';
14+
15+
$_SERVER['SCRIPT_FILENAME'] = 'phar://pie.phar/bin/pie';
16+
require 'phar://pie.phar/bin/pie';
17+
18+
// phpcs:ignore Generic.Files.InlineHTML.Found
19+
__HALT_COMPILER(); ?>

0 commit comments

Comments
 (0)