Skip to content

Commit 49acca4

Browse files
authored
Merge pull request #373 from asgrim/only-suppress-deprecations-in-phar
Only suppress deprecations when running as Phar
2 parents 869d97b + ebb9d22 commit 49acca4

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

bin/pie

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ use Symfony\Component\Console\Input\InputInterface;
2424
use Symfony\Component\Console\Output\OutputInterface;
2525
use Symfony\Component\EventDispatcher\EventDispatcher;
2626

27-
error_reporting(error_reporting() & ~E_DEPRECATED);
27+
require_once __DIR__ . '/../src/Util/PieVersion.php';
28+
if (PieVersion::isPharBuild()) {
29+
error_reporting(error_reporting() & ~E_DEPRECATED);
30+
}
2831

2932
/** @psalm-suppress UnresolvableInclude */
3033
include $_composer_autoload_path ?? __DIR__ . '/../vendor/autoload.php';

0 commit comments

Comments
 (0)