specialtactics / l5-api

Laravel API Dependecy Package - Used by the Laravel API Boilerplate
https://github.com/specialtactics/laravel5-api-boilerplate
MIT License
33 stars 20 forks source link

Possible to make tymon/jwt-auth a suggestion instead of required? #15

Closed Azuka closed 5 years ago

Azuka commented 5 years ago

It looks like tymon/jwt-auth is only being used in tests. Is it possible to move it to require-dev and add it as a suggested package?

Rationale: I currently have this working with Passport, and don't need the dependency. I can open a pull request if you'd like me to.

specialtactics commented 5 years ago

It is actually the main auth package used in the project. If you look at the l5-api-boilerplate repo, it's set up to be using it by default, so it's not really possible to not require it (because this repo is tightly coupled with that one).

Is there any specific problem you are having by it being in the required list ?

Azuka commented 5 years ago

Not really. I was able to get it to work by setting the version to 1.0.0-rc.4.1, because composer refused to resolve ^1.0 based on my minimum stability settings.

I'm actually using Passport for auth based on https://github.com/dingo/api/issues/1236. It seems the boilerplate should be the one with the hard dependency on tymon/jwt-auth, shouldn't it?

specialtactics commented 5 years ago

That's an interesting point @Azuka . Integrating with auth0 and/or laravel passport is definitely on the cards, so I will note this down. Put it on the roadmap here: https://github.com/specialtactics/laravel5-api-boilerplate/wiki/Roadmap

Unfortunately I can't shift the requirements from one package to the other without needing to increment the major version, as it would break current installs on composer update.

However if it doesn't break anything, I think it shouldn't be a problem to keep it for the current version, I hope.

Azuka commented 5 years ago

Yes, that sounds good. Thanks @specialtactics