-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Install PHP5.2/5.3 on trusty #2049
Conversation
.travis.yml
Outdated
libltdl7 openssl gettext libgettextpo0 libmhash2 libmcrypt4 mysql-client | ||
|
||
if [[ ${SWITCH_TO_PHP:0:3} == "5.2" ]]; then | ||
PHPBREW_BUILT_CHECK=$HOME/.phpbrew/php/php-5.2.17/bin/php |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to cache everything here, or would just bin/
(edit: and lib/php/
for phpunit) be sufficient?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there are includes, phpunit libs, config files etc. in the other dirs. The only one we could get rid of safely is the headers in include/ would save a couple of Mb.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, probably not worth the trouble then 👍
Codecov Report
@@ Coverage Diff @@
## master #2049 +/- ##
=========================================
+ Coverage 18.87% 18.9% +0.02%
=========================================
Files 130 130
Lines 4207 4211 +4
Branches 718 718
=========================================
+ Hits 794 796 +2
- Misses 2873 2875 +2
Partials 540 540
Continue to review full report at Codecov.
|
It works! Rejoice! Dance in the streets! Set alight an effigy of PHP5.2's configure file! Yes, this needs to be squashed when it merges. There have been a few commits. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love it ❤️
Should we add a README.md to the bin/patches/
folder to document what the 2 files node.patch
and openssl.patch
are used for?
@@ -12,6 +12,7 @@ cache: | |||
directories: | |||
- vendor | |||
- $HOME/.composer/cache | |||
- $HOME/.phpbrew |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should $HOME/php-utils-bin
also be added to the cache?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't feel too strongly about this, but because there are already phpunit shims injected by Travis, I'd rather only have this around when we actually need it, so that anyone who needs to debug this in the future has a slightly easier time figuring out what phpunit is actually getting run.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I'm simplifying this so it works as before, with a phpunit-bin directory and a single phpunit
executable file in there. Makes things much easier to follow, and we don't need our shim.
bin/install-php-phpunit.sh
Outdated
chmod +x $HOME/phpunit-bin/phpunit | ||
export PATH=$HOME/phpunit-bin/:$PATH | ||
else | ||
composer global require "phpunit/phpunit=5.7.*" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be composer global require "phpunit/phpunit=6.*"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, LGTM
Stolen from WordPress/gutenberg#2049. Intended to compensate for Travis removing support for PHP 5.2/5.3. Uses the SWITCH_TO_PHP environment variable to request older versions of PHP. PHP5.3 and PHP5.2 are installed for the user, using phpbrew. The correct version of PHPUnit is also installed. ~/.phpbrew contains the built PHP versions, and this is cached.
Fixes #2048