personal / tool / archived
buildstep-php-mcrypt-fix
A small buildpack shim that fixes the PHP mcrypt extension on PHP 7 in Heroku-style builds.
- BPM
- 167
- GRADE
- B
- LEVEL
- 6
- RELEASES
- 0
- YEARS
- 2015–2015
Mcrypt Versus PHP Seven
PHP 7 came out and mcrypt didn't come along cleanly. If you were building PHP apps through a Heroku-style buildstep pipeline in November 2015, the build would succeed and the app would boot, and then anything that needed mcrypt just didn't work. The extension was on its way out, but a lot of PHP 5 code still expected it.
So I wrote a shim: a couple of shell scripts that made mcrypt available inside a buildpack-driven PHP 7 build. It took two days.
It went up the same day as dockerphish. That week I was moving my PHP apps onto containers and PHP 7 at the same time, and this was the piece that didn't want to move.