Fixes that allow PHP 5.2-fpm to run and test WordPress#46
Fixes that allow PHP 5.2-fpm to run and test WordPress#46
Conversation
The WP-CLI did not support PHP 5.2. However, in order to better automate testing, PHP 5.4 is now being used as the base for the 5.2 CLI image. This may result in some strange behavior, but a warning has been added for when the Docker container is started.
|
Hmm, looks like we won't be able to use |
pento
left a comment
There was a problem hiding this comment.
That's along the lines of what I was thinking, yes. I've added some comments on cleaning up some of the now redundant bits.
update.php
Outdated
|
|
||
| $dockerfile = str_replace( '%%MYSQL_CLIENT%%', $config['mysql_client'], $dockerfile ); | ||
| $dockerfile = str_replace( '%%DOWNLOAD_URL%%', $config['download_url'], $dockerfile ); | ||
| } else { |
There was a problem hiding this comment.
Along with removing NEW_PHP from the Dockerfile template, this entire else block can go.
There was a problem hiding this comment.
Left this for now in case we need to add 5.2 specific logic.
cli:5.2-fpm image.|
I'm a bit stuck here, and not sure there is a good way forward. Here are some findings I have and where I'm at: I've been able to successfully run the PHP 5.2 WP-CLI image and installation scripts with PHP 5.3 installed with one modification to the There's a different roadblock when running PHPUnit on PHP 5.2. The Docker files install PHPUnit using the PHAR files distributed officially by PHPUnit. In 2014, PHPUnit switched from distributing with PEAR to using PHARs, and removed the PEAR packages at the end of the year. It seems that with the passing of time, there is now no way to download and install PHPUnit 3.6.
I tried running PHPUnit with PHP 5.3/PHPUnit 3.7.38. This did not work due to fatal errors (probably from changes in PHPUnit from 3.6 -> 3.7. I can't even find documentation for, and upgrading old branches to run on 3.7.38 is 100% something I'd like to avoid. The devilbox image that is currently being used to build PHP 5.2 documents that PHPUnit is available within all containers. I was unable to confirm it is installed within the 5.2 one, though. I was able to do some archaeology on the PHPUnit GitHub repo, and found the commit that released PHPUnit 3.6. One option is to check this repo/SHA out directly and use the Git Checkout instructions. It will require some more digging in the dependency repositories for specific SHAs that need to be used, but unless I am missing something this may be the only option to get PHPUnit 3.6 running in the container. |
|
The last thing I forgot to mention is the current testing setup on Travis is working because the 5.2 image being used has PHPUnit 3.6 installed, so it just works within that environment. |
|
Stepped away for a bit and did some more searching. Found a few options to try out: |
|
I think this can be closed |
The WP-CLI did not support PHP 5.2. However, in order to better automate testing, PHP 5.4 is now being used as the base for the 5.2 CLI image. This may result in some strange behavior, but a warning has been added for when the Docker container is started.