Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throw exception if Phar not installed #118

Open
ghost opened this issue Dec 23, 2019 · 2 comments
Open

Throw exception if Phar not installed #118

ghost opened this issue Dec 23, 2019 · 2 comments

Comments

@ghost
Copy link

ghost commented Dec 23, 2019

With Couscous:

https://github.com/CouscousPHP/Couscous

if Phar is not installed you get this:

The "phar" extension is required to run this archive.

but with Spress you get nothing. I checked the code and here is the difference:

if (class_exists('Phar')) {
   $include = 'phar://' . __FILE__;
   Phar::mapPhar('couscous.phar');
} else {
   throw new Exception('The "phar" extension is required to run this archive.');
}
if (class_exists('Phar')) {
   Phar::mapPhar('spress.phar');
   require 'phar://' . __FILE__ . '/bin/spress';
}
@yosymfony
Copy link
Member

Yes. I'm gonna add that exception

@yosymfony
Copy link
Member

Where did you see these lines of code?

if (class_exists('Phar')) {
   Phar::mapPhar('spress.phar');
   require 'phar://' . __FILE__ . '/bin/spress';
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant