-
-
Notifications
You must be signed in to change notification settings - Fork 59
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
Can we also have old PHP behavior? #38
Comments
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... |
Did you speak at Longhorn PHP a few years back btw? I've attended every Longhorn PHP since they started them! |
Good point. Perhaps a simpler approach could be a runtime check using And yes, I spoke in Austin a couple of years ago. You can DM me on social media if you want to reminisce :) |
I try to accommodate niche needs lol.
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! |
Yes, that's what I meant. Not sure why I said |
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! |
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! |
So to target a specific version you'd do 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. |
1.0.16 and 2.0.5 have been released that implement this feature! Thanks! |
Amazing! Sorry for the late reply. I was away for over a week. I sent you a one-time donation. |
Got it - much appreciated - thank you! 😊 |
I know it's a long shot, but doesn't hurt to ask. Can we have multiple versions of this package so that we can have PHP 5 behavior?
For example, in PHP 5, one could pass an incorrect key size to mcrypt_encrypt and it triggered a warning. In PHP 7, it triggered an error, which is what this package does too. This makes patching legacy a much bigger project than it needs to be. Thanks!
And before anyone schools me, yes, I do want to refactor the code to not do dumb things like that. However, the codebase is huge and it's urgent to get it off PHP 5.3 as a first step.
P.S.: This package rocks and saved me headaches on quite a few legacy upgrades.
The text was updated successfully, but these errors were encountered: