Closed fabacab closed 5 years ago
<?php
+require_once dirname(FILE).'/../vendor/autoload.php';
Can you leave the leading blank line, and make the autoload file optional for people not using composer?
Thanks for the readme file, looks great!
Can you leave the leading blank line, and make the autoload file optional for people not using composer?
Sure! In 76a644a40a15595f3fe621a8f1fa32849ad5d0ad I changed require_once
to include_once
so the examples will warn rather than error without Composer's autoload.php
. If this isn't sufficient I can also guard with an explicit file readability check.
Thanks for the readme file, looks great!
Sure! Thanks for the amazing library. :)
As you know, I have been using this in my WP PGP Encrypted Emails plugin for WordPress for several years and it has been very useful. I'm now returning to work on that plugin by intgrating OpenPGP.js, and so I'm trying to make sure that the keys generated by OpenPGP.js work with this library and vice versa. I am not an OpenPGP expert so I am running into some problems, but before I ask you for any help I want to double-check my own understanding of what's happening, hence my looking much more closely at the examples today.
In 76a644a40a15595f3fe621a8f1fa32849ad5d0ad I changed
require_once
toinclude_once
so the examples will warn rather than error without Composer'sautoload.php
. If this isn't sufficient I can also guard with an explicit file readability check.
Just throwing an @
on the front of the include directive to suppress any warning is probably sufficient, yeah?
Just throwing an
@
on the front of the include directive to suppress any warning is probably sufficient, yeah?
Yeah, okay. :) Consider it done.
I've also squash-merged these various commits and updated the commit message to reflect all the changes so there is only one, not four, different commits for you to merge.
This commit adds an
example/README.md
file with a litle bit of guidance for running the examples themselves. This is helpful because the examples all rely on the presence of aphpseclib
installation available to the PHP interpreter, and while there is acomposer.json
file to this effect, none of the examples included the Composerautoload.php
file.This commit makes no modifications to the example code itself, but does
require_once()
the Composer autoload script so thatphpseclib
loads and avoids causing a fatal error when a new user attempts to run the examples to learn how to use the library.