I need to implement T-Regx library - https://github.com/T-Regx/T-Regx - in a project that might be running in PHP 5.6 or PHP 7.1+, depending on which version the server has installed.
So, on PHP 5.6, I need to run package #1 and on PHP 7.1+ package #2. However, whenever I install the package it creates the directory /vendor/rawr/t-regx/ - I need to have something like /vendor/rawr/t-regx-5.6/ and /vendor/rawr/t-regx-7-1-plus/ and composer should trigger the needed one based on the PHP version. I need this because plenty of people still use PHP 5.6 and I can't just tell them to upgrade (it's not that simple). If I use a PHP 5.6 package and the user has PHP 8 installed, there will be errors shown that would annoy the user.
Any suggestions? I'm sure other users are having this issue.