Closed X-Coder264 closed 5 years ago
This would not really make it to core. The plan is already to go with PSR-7, there is just no implementation right now.
@danopz The plan to go with PSR-7 is great, but it's been 3 years since any development was done in order to achieve that goal. So it's obvious that the plan is either dead or at the very least it isn't gonna be achieved anytime soon. Meanwhile this is the only blocker that we have on our projects in order to update them to use the latest version of Laravel or Symfony (and obviously we are not the only ones). So I'd say that this is worth merging and tagging as a new (major) version. Because the only other option is to basically refactor/rewrite the entire OAuth part of our projects to use another package which isn't a small task (or we should forever stay on an outdated framework version just because of this which just isn't an option).
+1 For @X-Coder264 argument. This should be fixed.
Question - why is this a blocker for those projects? These interfaces are forwards-compatible with the latest versions of PHP.
I understand now, the interfaces were updates as part of the symfony package.
We may need to do some sneaky autoloading to get around this issue while maintaining BC with previous versions of PHP. Any ideas?
IMHO I don't think there is any need to do any "sneaky" stuff just to preserve BC with ancient PHP versions. As of today even PHP 7.0 reached EOL and PHP 5.6 extended support period ends at the end of the month.
@X-Coder264 unfortunately, in practice, those other versions of PHP are heavily used and I don't want to drop support for them just yet.
Well, we could still go with the route of tagging a new major version with this PR and then backporting all important bug fixes etc. to the 1.x branch for the foreseeable future. That seems like a better way to approach this problem that to be doing some hacky stuff just so that it can work with all PHP versions.
Added https://github.com/bshaffer/oauth2-server-httpfoundation-bridge/pull/34, which will fix this issue without changing interfaces or requiring autoload hacks ;)
This is a breaking change as the interface is now type-hinted which means that the min PHP version had to be bumped (so this should be tagged as the next major version).
Fixes https://github.com/bshaffer/oauth2-server-httpfoundation-bridge/issues/31