Skip to content
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

Merged
merged 55 commits into from
Jul 28, 2017
Merged

Install PHP5.2/5.3 on trusty #2049

merged 55 commits into from
Jul 28, 2017

Conversation

notnownikki
Copy link
Member

@notnownikki notnownikki commented Jul 27, 2017

Fixes #2048

@ntwb ntwb added the [Status] In Progress Tracking issues with work in progress label Jul 27, 2017
.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
Copy link
Member

@nylen nylen Jul 27, 2017

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?

Copy link
Member Author

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.

Copy link
Member

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-io
Copy link

codecov-io commented Jul 27, 2017

Codecov Report

Merging #2049 into master will increase coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
editor/utils/url.js 46.15% <0%> (+1.7%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c29ea40...6541cdb. Read the comment docs.

@notnownikki
Copy link
Member Author

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.

Copy link
Member

@ntwb ntwb left a 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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

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.

Copy link
Member Author

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.

chmod +x $HOME/phpunit-bin/phpunit
export PATH=$HOME/phpunit-bin/:$PATH
else
composer global require "phpunit/phpunit=5.7.*"
Copy link
Member

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.*"

See also: https://core.trac.wordpress.org/ticket/41472

@notnownikki notnownikki added [Type] Build Tooling Issues or PRs related to build tooling and removed [Status] In Progress Tracking issues with work in progress labels Jul 28, 2017
Copy link
Member

@ntwb ntwb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, LGTM

@notnownikki notnownikki merged commit 3c34274 into master Jul 28, 2017
@ntwb ntwb deleted the try/php-5-2-on-trusty branch July 28, 2017 10:55
jtsternberg added a commit to CMB2/CMB2 that referenced this pull request Sep 18, 2017
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Build Tooling Issues or PRs related to build tooling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants