Comments (11)
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.
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.
Did you speak at Longhorn PHP a few years back btw?
I've attended every Longhorn PHP since they started them!
from mcrypt_compat.
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.
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.
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.
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.
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.
1.0.16 and 2.0.5 have been released that implement this feature!
Thanks!
from mcrypt_compat.
Amazing! Sorry for the late reply. I was away for over a week. I sent you a one-time donation.
from mcrypt_compat.
I sent you a one-time donation.
Got it - much appreciated - thank you! 😊
from mcrypt_compat.
Related Issues (20)
- create_function deprecated in PHP 7.2 HOT 6
- Enhance project description HOT 1
- Serpent Support HOT 1
- stream_filter_append output is different than original mcrypt when writing HOT 4
- phpseclib_mcrypt_module_open CFB mapping missing from 1.0 branch HOT 2
- test-related questions, understand whether you need to change the test in the testMcryptGenericMode HOT 1
- Fatal Error in Version 1.07 HOT 2
- Module initialization failed... PHP7.2.1
- Buffer bug in filter function HOT 5
- RC2 max key size incompatibility
- Uncaught Error: Class 'phpseclib3\Crypt\Blowfish' not found in lib/mcryptcompat/mcrypt.php:307 HOT 2
- THANKYOU!!!!!! HOT 1
- php 8.1 compatibility issues HOT 4
- OFB mode - Uncaught TypeError: Argument 1 passed to mcrypt_enc_get_iv_size() must be an instance of phpseclib3\Crypt\Common\SymmetricKey, bool given HOT 9
- PHP 8.1 deprecation warnings HOT 4
- Thank you thank you thank you
- Php 8.1 deprecation warning HOT 4
- Dependency on phpseclib/phpseclib:dev-master? HOT 5
- Could be nice if we can install in windows with $ winget install HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mcrypt_compat.