saloonphp / saloon

🤠 Build beautiful API integrations and SDKs with Saloon
https://docs.saloon.dev
MIT License
2.07k stars 106 forks source link

Undefined class 'HeaderAuthenticator' #356

Closed ahajicek07 closed 10 months ago

ahajicek07 commented 10 months ago

I have Saloon V3 installed.

When I try to: use Saloon\Http\Auth\HeaderAuthenticator;

It says it is undefined and doesn't exist.

I was following your documentation here: https://docs.saloon.dev/the-basics/authentication#header-auth

And when I tried to implement that code, It says the HeaderAuthenticator doesn't exist, I updated all my composer packages and it didn't help. I'm on the latest version of saloon.

Sammyjo20 commented 10 months ago

Hey @ahajicek07!

Are you on the latest minor version of Saloon? The HeaderAuthenticator was added from version 3.1. Make sure your composer.json is referencing ^3.1 and the write composer update saloonphp/saloon.

Hope that helps!

ahajicek07 commented 10 months ago

@Sammyjo20 Thank you so much. That fixed it.

My Composer.json file had to be updated.

Sorry, I'm a new developer, so while this sounded very trivial, I couldn't figure it out.

Thanks again, friend. Merry Christmas!

ahajicek07 commented 10 months ago

Problem solved.

Sammyjo20 commented 10 months ago

Not a problem at all, @ahajicek07 - Merry Christmas to you too.