-
Notifications
You must be signed in to change notification settings - Fork 17
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
What if GitHub is down? #24
Labels
documentation
Documentation issues
Comments
Alternatively, assuming you have a mirror somewhere else: <?php
use ParagonIE\Certainty\RemoteFetch;
use GuzzleHttp\Exception\TransferException;
try {
$fetch = new RemoteFetch('/path/to/certainty/data');
$latestCACertBundle = $fetch->getLatestBundle();
} catch (TransferException $ex) {
$fetch = new RemoteFetch(
'/path/to/certainty/data',
'https://example.com/certainty/data'
);
$latestCACertBundle = $fetch->getLatestBundle();
} |
Ultimately, falling back to the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
If I understand the source code correctly, if GitHub is down or there is some kind of network availability issue,
RemoteFetch::remoteFetchBundles()
is going to throw aTransferException
from Guzzle. Do I have this right? In other words, to properly use this class, we should wrap calls togetLatestBundle()
in try/catch and fall back to theFetch
class?The text was updated successfully, but these errors were encountered: