-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using 2.x and 3.x in parallel #187
Comments
Is your intent here to have a version of 2.x installed alongside 3.x and picking which one to use based on which version of PHP you're using? |
The goal is to have a single code base for my project, that will auto-pick (via Composer) compatible Aura.Sql version based on the used PHP version and my project would work with either of picked Aura.Sql versions. |
Have you tried the OR (||) operator with two package versions? Composer
should pick between them.
…On August 7, 2021 at 16:33:17, Alex ***@***.***) wrote:
The goal is to have a single code base for my project, that will auto-pick
(via Composer) compatible Aura.Sql version based on the used PHP version
and my project would work with either of picked Aura.Sql versions.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#187 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABQKAODCS3L5V5JA2VFA73T3WKA3ANCNFSM4VEBLNSA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
|
Composer should definitely do that automatically for you. |
Composer is picking the correct Aura.Sql package version, however, due to BC breaks in Aura.Sql 3.x my code, that worked with Aura.Sql 2.x, no longer works on Aura.Sql 3.x. I even can't adapt my code to work with Aura.Sql 3.x due to the above (in issue description) mentioned BC breaks, that I have no idea how to overcome:
|
You're probably going to have to polyfill those things yourself. It's unreasonable to expect an author to maintain backwards compatibility at all costs. That's why they've bumped the major version number of the package. |
I understand, that I must polyfill them, but I have no idea how. Knowing why things were removed and how it's done in the Aura.Sql 3.x version would be really helpful. |
Hey Alex, I'd define an interface and then have concrete classes that proxy to the 2.x and 3.x series components, or replace them. Make sense? If you're still having trouble, your question is probably out of scope for a GitHub issue, but would fall into the "consulting/contracting" space. I'm sure @pmjones or someone like him could offer some help in this area. Most of us have our email addresses in our profiles. |
Thanks for explaining. Architectural problems aside I still have no idea how to adapt my code to work with Aura.Sql 3.x with // cc @pmjones |
@aik099 It looks like you may have to backport |
The project, where Aura.Sql is being used must work on different PHP versions, and on some only Aura.Sql 2.x is supported.
I have several issues caused by this:
ProfilerInterface
was moved to a different namespace (I've mitigated that using theclass_alias
function)ProfilerInterface
, that I have no idea how to implementAura\Sql\Iterator\AllIterator
class was removedAura\Sql\Iterator\ColIterator
class was removedThe text was updated successfully, but these errors were encountered: