Code Monkey home page Code Monkey logo

Comments (11)

terrafrost avatar terrafrost commented on August 14, 2024 1

Added you to BACKERS.md! I'll try to have this feature done in the next few days and will do a release when that's done.

Thanks!

from mcrypt_compat.

terrafrost avatar terrafrost commented on August 14, 2024

In principal I'm perfectly okay with doing that but I'm not really sure how the versioning would work.

mcrypt_compat 1.0 requires phpseclib 2.0, mcrypt_compat 2.0 requires phpseclib 3.0. Having mcrypt_compat 3.0 require phpseclib 3.0 but emulating PHP 5 vs PHP 7 would be kinda weird.

In theory maybe something like 2.0-PHP5 and 2.0-PHP7 could be done but idk of another composer package that does stuff like that. If there is one that'd be news to me. Like I'd kinda like there to be precedent for my doing something like that...

from mcrypt_compat.

terrafrost avatar terrafrost commented on August 14, 2024

Did you speak at Longhorn PHP a few years back btw?

I've attended every Longhorn PHP since they started them!

from mcrypt_compat.

afilina avatar afilina commented on August 14, 2024

Good point. Perhaps a simpler approach could be a runtime check using version_compare() to switch to older behavior. Then the same branch could service multiple PHP versions. I'm not sure whether phpseclib would significantly affect the outcome. I know that mine is a niche need.

And yes, I spoke in Austin a couple of years ago. You can DM me on social media if you want to reminisce :)

from mcrypt_compat.

terrafrost avatar terrafrost commented on August 14, 2024

I try to accommodate niche needs lol.

version_compare() is a good idea altho I could also envision scenarios wherein you're running PHP 8 and want to emulate mcrypt for PHP 5 vs mcrypt for PHP 7. What if I made it so that if you wanted to emulate a specific version of mcrypt you could do define('PHPSECLIB_MCRYPT_TARGET_VERSION', '5.5')? If I did that then what 5.x versions would you prefer I do? If you'd like multiple ones which ones would you prioritize?

I may hit you up on DM if you're on FB at some point (that's the only social network I'm on lol)! Also, thanks for the patreon sponsorship! I'll try add you to BACKERS.md this evening after I get home from work, time permitting!

from mcrypt_compat.

afilina avatar afilina commented on August 14, 2024

Yes, that's what I meant. Not sure why I said version_compare. Defining a constant with a target version is a very good idea. I prepend a bootstrap file to all scripts, so I can specify it there. My current legacy project is on PHP 5.3.

from mcrypt_compat.

terrafrost avatar terrafrost commented on August 14, 2024

See terrafrost@86d851b

I'm now working on switching mcrypt_compat from using Travis CI to using GitHub Actions. Once I do that I'll add some unit tests and then I'll push those changes to phpseclib/mcrypt_compat vs terrafrost/mcrypt_compat and then I'll do a release!

from mcrypt_compat.

terrafrost avatar terrafrost commented on August 14, 2024

So to target a specific version you'd do define('PHPSECLIB_MCRYPT_TARGET_VERSION', '5.3.0'); before including vendor/autoload.php.

I got the PHP versions that things changed from the PHP changelogs. I did not look at the PHP 4 changelogs and I did not make it so that targeting versions where functions were deprecated issues actual deprecated warnings.

from mcrypt_compat.

terrafrost avatar terrafrost commented on August 14, 2024

1.0.16 and 2.0.5 have been released that implement this feature!

Thanks!

from mcrypt_compat.

afilina avatar afilina commented on August 14, 2024

Amazing! Sorry for the late reply. I was away for over a week. I sent you a one-time donation.

from mcrypt_compat.

terrafrost avatar terrafrost commented on August 14, 2024

I sent you a one-time donation.

Got it - much appreciated - thank you! 😊

from mcrypt_compat.

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.