-
Notifications
You must be signed in to change notification settings - Fork 311
Add more instructions to the README (Round Two) #190
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
Conversation
#154 redux
README.md
Outdated
|
|
||
| ### Direct Installation (Phar) | ||
|
|
||
| Download the PHP Archive and public key. Extract |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this sentence was supposed to be finished but wasn't?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. @_@
|
This is really great work! |
|
Thanks. Fixed the snafu. :) |
| ```php | ||
| try { | ||
| $ciphertext = \Defuse\Crypto\Crypto::encrypt("Test message", $key); | ||
| } catch (\Defuse\Crypto\Exception\CryptoTestFailedException $ex) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could throw a bunch of different types of exceptions, like CannotPerformOperationException. I have a new philosophy when it comes to exceptions: Don't catch them unless you can actually do something with the result (if nothing can do something with the result, then the process terminates and that's okay).
I think in our example code we shouldn't put try-catch but instead a comment mentioning it can throw various things (with the exception of InvalidCiphertextException).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good point. Don't enable "copy-paste programmers" to have a silent failure they didn't consciously write themselves.
|
I'm pulling this into a branch to work on documentation. |
|
Oh, it's already on a branch. I'll just commit there :) |
|
👍 |
|
Is this superceded by #226? |
|
Not yet, I'm probably still going to use a lot of it. |
|
I looked at this a lot while doing #226. I think that PR includes (at least a rewrite of) everything that was in this one. |
#154 redux