Skip to content

Commit

Permalink
Added reminders around phar.readonly
Browse files Browse the repository at this point in the history
  • Loading branch information
Clay Loveless committed Feb 22, 2012
1 parent 663431c commit 5da530e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -5,7 +5,7 @@ Packages PHPUnit into a phar archive.
## Usage

$ ./vendors.sh
$ php make-phar.php
$ php -d phar.readonly=0 make-phar.php
$ # move newly created phpunit.phar where you want to
$ php phpunit.phar

Expand Down
4 changes: 4 additions & 0 deletions make-phar.php
Expand Up @@ -8,6 +8,10 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
$readonly = ini_get('phar.readonly');
if ($readonly == '1' || $readonly === true) {
die(".phar creation disabled in php.ini!\nRe-run with 'php -d phar.readonly=0 make-phar.php'\n");
}

require __DIR__.'/symfony/src/Symfony/Component/ClassLoader/UniversalClassLoader.php';
$loader = new Symfony\Component\ClassLoader\UniversalClassLoader;
Expand Down

0 comments on commit 5da530e

Please sign in to comment.