Skip to content

Guidance: Supporting both PHP 7.3 and PHP 8 #612

Answered by lcobucci
evansims asked this question in Q&A
Discussion options

You must be logged in to vote

Hello 👋
Glad to hear your appreciation for the new API.

So, PHP 8.0 support won't be offered on v3.x to avoid having to maintain compatibility with 3 major PHP versions and their quirks.

v3.4 provides a forward compatibility layer for v4.x. That has been done exactly to allow downstream libraries to be able to offer support for PHP 5.6+.

To achieve that you should require both versions (^3.4 || ^4.0) and use the components provided by v4.0 (configuration object, new token methods, and new validation API).

That approach has been used by several other libraries (like PHPUnit) and worked quite well for a few packages - such as oauth2-server (maintained by @Sephster), passport (maintained by @…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@evansims
Comment options

Answer selected by evansims
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants