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

Error in instructions? #104

Closed
jackfruh opened this issue Nov 11, 2017 · 7 comments
Closed

Error in instructions? #104

jackfruh opened this issue Nov 11, 2017 · 7 comments

Comments

@jackfruh
Copy link

Hi, the instructions say to require '/vendor/autoload.php';

This assumes your project is on the root of a drive and returns an error if not:
Fatal error: require(): Failed opening required '/vendor/autoload.php'

@jumbojett
Copy link
Owner

@jackfruh you'll need to install composer. https://getcomposer.org/doc/01-basic-usage.md
composer init in the base root of your project.

@jackfruh
Copy link
Author

I used composer to install the package, so I think composer is ok?

See
-Folder structure (top left)
-Code (top right)
-Error (bottom)
2017-11-11_11-25-34

If I remove the leading slash, the error goes away:
2017-11-11_11-34-35

I feel like even with this, I must be doing something wrong as the next step in the instructions is to add this line of code
use Jumbojett\OpenIDConnectClient;
but PHPStorm is flagging the namespace as invalid, and the OpenIDConnectClient class isn't found:
2017-11-11_11-40-33

If this is something you'd have time to interactively troubleshoot, I'd gladly pay you for your time.

@jumbojett
Copy link
Owner

jumbojett commented Nov 13, 2017

@jackfruh Have you tried require __DIR__ . '/vendor/autoload.php'; ? It could be a path issue.

@jackfruh
Copy link
Author

I did try that and it got past the path issue, but still couldn't find the class.

@jumbojett
Copy link
Owner

@jackfruh you might be using an old package. Try this:

# Tell composer to use the github repo for this lib
composer config repositories.repo-name vcs https://github.com/jumbojett/OpenID-Connect-PHP.git
# Get the latest from github
composer require jumbojett/openid-connect-php:dev-master

I hope this solves the issue!

@jackfruh
Copy link
Author

Thanks! use Jumbojett\OpenIDConnectClient; is no longer flagging as an error in PHPStorm, so things are looking up!

@jumbojett
Copy link
Owner

@jackfruh Glad to hear! I encourage you submit a PR with changes to the README if you think anything needs clarification.

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

2 participants