GithubHelp home page GithubHelp logo

Using 2.x and 3.x in parallel about aura.sql HOT 10 CLOSED

aik099 avatar aik099 commented on August 15, 2024
Using 2.x and 3.x in parallel

from aura.sql.

Comments (10)

brandonsavage avatar brandonsavage commented on August 15, 2024

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?

from aura.sql.

aik099 avatar aik099 commented on August 15, 2024

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.

from aura.sql.

brandonsavage avatar brandonsavage commented on August 15, 2024

from aura.sql.

djmattyg007 avatar djmattyg007 commented on August 15, 2024

Composer should definitely do that automatically for you.

from aura.sql.

aik099 avatar aik099 commented on August 15, 2024

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:

  • new ProfilerInterface methods with no implementation examples;
  • removed iterator classes, which I've found very useful.

from aura.sql.

djmattyg007 avatar djmattyg007 commented on August 15, 2024

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.

from aura.sql.

aik099 avatar aik099 commented on August 15, 2024

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.

from aura.sql.

brandonsavage avatar brandonsavage commented on August 15, 2024

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.

from aura.sql.

aik099 avatar aik099 commented on August 15, 2024

Thanks for explaining. Architectural problems aside I still have no idea how to adapt my code to work with Aura.Sql 3.x with ProfilerInterface change and iterator removal.

// cc @pmjones

from aura.sql.

brandonsavage avatar brandonsavage commented on August 15, 2024

@aik099 It looks like you may have to backport ProfilerInterface yourself, or copy the component from the older version. At this point I'm going to close the issue because there's not too much we can specifically do to assist, but I hope you're able to get what you need working.

from aura.sql.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.