webfox / laravel-xero-oauth2

A Laravel integration for Xero using the Oauth 2.0 spec
MIT License
50 stars 32 forks source link

Class Webfox\Xero\OauthCredentialManager does not exist #1

Closed PetraBester closed 4 years ago

PetraBester commented 4 years ago

Hi

When I hit the route in my url I keep on getting the error: Class Webfox\Xero\OauthCredentialManager does not exist. Although the package has been installed correctly and I can see the file does actually exists.

I followed the installation step by step. Is there something I am missing?

hailwood commented 4 years ago

Hmm, only thing I can think of is that perhaps composer hasn't updated it's auto-load file correctly.

Try running composer dump-auto and try again.

PetraBester commented 4 years ago

I am using Laravel framework 5.8 and php 7.3.14

I tried running composer dump-auto, however it still did not resolve the issue. On closer inspection I saw that the class is not initialised because of the following line (line 16)

protected Repository $cache;

This line throws the following error:

"syntax error, unexpected 'Repository' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST)"

hailwood commented 4 years ago

Ah right! Yes apologies that's a php 7.4 feature.

I'll run through in the next 24 hours to remove any 7.4 specific code and publish a new version 👍

Or feel free to submit a pr!

On Wed, 12 Feb 2020, 01:33 PetraBester, notifications@github.com wrote:

I am using Laravel framework 5.8 and php 7.3.14

I tried running composer dump-auto, however it still did not resolve the issue. On closer inspection I saw that the class is not initialised because of the following line (line 16)

protected Repository $cache;

This line throws the following error:

"syntax error, unexpected 'Repository' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST)"

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/webfox/laravel-xero-oauth2/issues/1?email_source=notifications&email_token=AAFNJDPCECTXGRWZZL66AUTRCKLJFA5CNFSM4KSOMEW2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELMH4KQ#issuecomment-584613418, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFNJDNF6UNZWCBTP25F6BLRCKLJFANCNFSM4KSOMEWQ .

PetraBester commented 4 years ago

Ah ok great, glad we got it then. Thank you very much!

hailwood commented 4 years ago

v1.1.1 Released which should fix this issue for you @PetraBester