Skip to content
This repository has been archived by the owner on Dec 9, 2019. It is now read-only.

Commit

Permalink
Add a check for phar in stream wrappers
Browse files Browse the repository at this point in the history
  • Loading branch information
Jack Barton authored and ondrejmirtes committed Mar 28, 2019
1 parent d096622 commit d6754dd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bootstrap.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<?php

if (!in_array('phar', stream_get_wrappers(), true)) {
throw new \Exception('Phar wrapper is not registered. Please review your php.ini settings.');
}

if (extension_loaded('phar') && !defined('__PHPSTAN_RUNNING__')) {
require_once 'phar://' . __DIR__ . '/phpstan.phar/vendor/autoload.php';
}

0 comments on commit d6754dd

Please sign in to comment.