-
Good morning! 👋 I'm a developer on Auth0's PHP SDK that makes use of this library. The work being done here is tremendous and appreciated, as always! I'm currently in the process of updating our SDK with PHP 8 support, but I'm hitting a wall as far relating to our use of this library. The 4.X branch looks great and I'd love to adopt it, but with this branch only supporting 7.4+, it conflicts with our needs. As 7.3 is still receiving security patches for another year and a large chunk of our user base is still using it, we can't justify phasing out 7.3 support yet. I noticed PRs fixing compatibility issues with the 3.X branch for PHP 8 have been declined, which is admittedly disappointing to see. I would contend this should be considered a bugfix and applied to the branch. Currently, as far as I'm able to determine, this leaves me with having to fork either the 3.X branch and patch in PHP 8 support, or the 4.X branch and dropping the minimum PHP version in the composer file. Neither route is ideal. Are there any alternatives I've overlooked here? Any suggestions on how we could handle this better? Thanks in advance |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hello 👋 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 ( 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 @driesvints), and vonage-php-sdk (maintained by @dragonmantank) Our upgrading guide should provide information on how to upgrade to the new API. Really hope this helps 🙂 |
Beta Was this translation helpful? Give feedback.
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 @…