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

PHPUnit requires PHP 5.6 #5206

Closed
BanzaiMan opened this issue Dec 4, 2015 · 13 comments
Closed

PHPUnit requires PHP 5.6 #5206

BanzaiMan opened this issue Dec 4, 2015 · 13 comments
Assignees

Comments

@BanzaiMan
Copy link
Contributor

As originally reported by @jadatkins in #5204 (comment)

the pre-installed version of PHPUnit requires PHP 5.6, but we've requested 5.5 in our .travis.yml. Our production server is running PHP 5.5, so it would be better if we could stick with 5.5 really.

phpunit -c tutorfair/tests/phpunit.xml --colors tutorfair/tests/apps
This version of PHPUnit requires PHP 5.6; using the latest version of PHP is highly recommended.
make: *** [tests] Error 1
The command "make tests" exited with 2.
@jadatkins
Copy link

I'm confused. Do I have to send a support email now or not?

@BanzaiMan
Copy link
Contributor Author

@jadatkins If this is the only issue remaining, it is up to you. We will investigate it and keep you in the loop.

@jadatkins
Copy link

Well, I don't really mind which channel it is. I've sent an email now as well. Do I need to request that our builds stay on the previous architecture until this is fixed or something?

I suppose I add

    dist: precise
    group: stable

to my .travis.yml? Only that won't work, because we're already using group: dev for MySQL 5.6.

@BanzaiMan
Copy link
Contributor Author

@jadatkins This is a packaging issue, as it turns out. Until we can fix the 5.5 package, do this in your before_install:

before_install:
  - curl -s -o $HOME/.phpenv/versions/5.5/bin/phpunit https://phar.phpunit.de/phpunit-old.phar
  - chmod +x $HOME/.phpenv/versions/5.5/bin/phpunit

This will install an older version of PHPUnit that 5.5 can use.

@BanzaiMan
Copy link
Contributor Author

Re-packaging 5.5.30 is possible, but it would be without PEAR. I wonder if that's feasible now.

@jadatkins
Copy link

Ok. We actually need PHPUnit 4.8, ideally, so I've added the following.

before_install:
  - curl -s -o $HOME/.phpenv/versions/5.5/bin/phpunit https://phar.phpunit.de/phpunit-4.8.9.phar
  - chmod +x $HOME/.phpenv/versions/5.5/bin/phpunit

... and that seems to have worked. Great! Thanks.

@BanzaiMan
Copy link
Contributor Author

@jadatkins Great to hear. I'm going to keep this open while we work out the packaging issue.

@BanzaiMan BanzaiMan self-assigned this Dec 4, 2015
ddeboer added a commit to FriendsOfSymfony/FOSHttpCache that referenced this issue Dec 5, 2015
ddeboer added a commit to FriendsOfSymfony/FOSHttpCache that referenced this issue Dec 5, 2015
Mark-H added a commit to Mark-H/revolution that referenced this issue Dec 5, 2015
Mark-H added a commit to Mark-H/revolution that referenced this issue Dec 5, 2015
Based on fix in http://andreas.heigl.org/2015/11/12/testing-code-with-phpunit-on-travis-ci-for-php-5-5-and-php7/ and travis-ci/travis-ci#5206, this adjustment makes sure that on PHP 5.5, phpunit 4.x is loaded rather than 5.x which is not compatible with PHP 5.5, but required for PHP7.
@meatballhat meatballhat changed the title [GCE-Precise] PHPUnit requires PHP 5.6 PHPUnit requires PHP 5.6 Dec 5, 2015
@dregad
Copy link

dregad commented Dec 7, 2015

For the record, we're facing the same issue here https://travis-ci.org/mantisbt/mantisbt/jobs/95206430.

I will try the proposed workaround. Any ETA on a fix for this ?

ddeboer added a commit to FriendsOfSymfony/FOSHttpCache that referenced this issue Dec 12, 2015
Find out which PHPUnit versions are available

Work around Travis installing incompatible PHPUnit version

travis-ci/travis-ci#5206

Try to install Apache for PHP 5.3

Allow hhvm build to fail

Re-enable libapache2-mod-fastcgi

Debug APT sources

Add multiverse

Debug Apache

Allow hhvm build failures
@fagundes
Copy link

Some progress to fix this?

@BanzaiMan
Copy link
Contributor Author

The PHP 5.5 package should be fixed now. https://travis-ci.org/BanzaiMan/travis_production_test/builds/96659602#L130

@dregad
Copy link

dregad commented Dec 14, 2015

Thanks !

@jadatkins
Copy link

@BanzaiMan Does that mean I should remove my before_install section now?

@BanzaiMan
Copy link
Contributor Author

@jadatkins Your build should work without it now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants