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

Travis-CI not working with PHP 5.5/5.6 #24

Open
McNetic opened this issue Jul 22, 2015 · 15 comments
Open

Travis-CI not working with PHP 5.5/5.6 #24

McNetic opened this issue Jul 22, 2015 · 15 comments
Labels

Comments

@McNetic
Copy link
Owner

McNetic commented Jul 22, 2015

Unit tests in Travis-CI are not working for PHP 5.5/5.6, although the tests can be run manually without problems. See https://travis-ci.org/McNetic/PHPZipStreamer/builds/72121020 for the output.
@szepeviktor

@szepeviktor
Copy link
Contributor

I've seen a solution somewhere else:
Open a PR that produces debug output to Travis build log.
That seems to be the fastest solution.

@McNetic
Copy link
Owner Author

McNetic commented Jul 22, 2015

Uhm, I don't understand what you mean.

@szepeviktor
Copy link
Contributor

If you open a PR and modify the test's code to output debug data,
you can watch Travis' output.
Then you close the PR at the end.

@remicollet
Copy link

It seems this error is caused by missing propro and raphf extensions (dependencies of pecl_http)

@McNetic
Copy link
Owner Author

McNetic commented Jan 29, 2016

The propro and raphf extensions are installed by the travis script in the test directory. Otherwise, it would not work for the other version combinations, also.

@McNetic
Copy link
Owner Author

McNetic commented Jan 29, 2016

Interestingly, this happens only with php 5.5 and 5.6, but not with earlier nor with later versions (I just implemented the travis tests for php 7). I could also never reproduce the issues on my systems, only on travis.

@szepeviktor
Copy link
Contributor

Try using the more modern Travis instance https://docs.travis-ci.com/user/trusty-ci-environment/

@szepeviktor
Copy link
Contributor

The problem on PHP 7 is simply extension double-loading.

@McNetic
Copy link
Owner Author

McNetic commented Jan 29, 2016

The trusty instances seem to lack some packages required for building the php extensions, and contain phpunit version no longer working with php < 5.6. There is a bit work necessary to make that work.

@szepeviktor
Copy link
Contributor

@McNetic After taking a look at https://pecl.php.net/package/raphf
pecl install raphf-1.1.2 will do for PHP < 7

and some ideas for test/travis/php-modules-install.sh:
szepeviktor@96f931f

@McNetic
Copy link
Owner Author

McNetic commented Jan 30, 2016

Actually, PHP7 tests are working as of current master (see https://travis-ci.org/McNetic/PHPZipStreamer/builds/105642618). It's only the 5.5 and 5.6 tests that fail.
Additionally, I don't see any functional changes in your commit aside from the raphf-1.1.2 change. It's hard to see with your changing the code style nearly everywhere. Or are these changes your purpose?

@szepeviktor
Copy link
Contributor

This is the relevant part for this issue

if [ "${PECL_HTTP_VERSION%%.*}" -ge 7 ]; then
   yes | pecl_module_install raphf raphf.so
   yes | pecl_module_install propro propro.so
elif [ "${PECL_HTTP_VERSION%%.*}" -gt 1 ]; then
  yes | pecl_module_install raphf-1.1.2 raphf.so
  yes | pecl_module_install propro-1.0.2 propro.so
fi

All other modifications are making the test safer.

@szepeviktor
Copy link
Contributor

The point is that latest raphf works only on PHP 7, 1.1.2 has to be installed for 5.*

@McNetic
Copy link
Owner Author

McNetic commented Feb 1, 2016

Well, that's nice. With these raphf/propro versions, it works at least for pecl_http 3 (unfortunately, still not with pecl_http 2.5.0).
Regarding your various style changes: I can not see any real improvement in these. `` vs. $() is mostly a style decision (I adopted this to be consistent). There is no additional safety in quoting constructs like ${...} or $(...), or direct variable assignments like ...=$1. The variable substitution in the above snippet is nice though.
Thank you very much for your improvements!

@szepeviktor
Copy link
Contributor

You're welcome.

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

No branches or pull requests

3 participants