-
Notifications
You must be signed in to change notification settings - Fork 53
enable xcache tests on travis (based on #59) #65
Conversation
@marc-mabe Looks good! I'll have to get my head round travis properly sometime. |
Why PHP 7 is excluded? |
@Maks3w because the latest xcache version is not PHP-7 compatible |
@@ -434,7 +441,7 @@ protected function internalGetCapabilities() | |||
'double' => true, | |||
'string' => true, | |||
'array' => true, | |||
'object' => 'object', | |||
'object' => false, |
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.
Can you document why this change is needed? I wonder if its some kind of bc break introduced by Xcache and so on a minimum version is required
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.
mh you are right but the bc break is in xcache because as far as I know it worked with older versions and results in a fatal error now. What we could do here is to find out at which version this feature has been removed and set the supported datatypes according to it.
-> Than in my opinion we no longer have a bc break here.
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.
We "may" break the minimum version supported
I imagine this change may deail with one of these possible scenarios.
a. Minimum Xcached version is raised and older versions are not longer supported (Next major release)
b. Minimum Xcached version is raised and CLI assertion is not longer supported (Next major release)
c. Set the setting based in the installed Xcached version for keep supporting previous versions and new ones (Next bugfix release)
d. Old Xcached versions are compatible with these change and this change is OK (Next bugfix release)
e. XCache adapter was not working with any version from far ago so there is no any kind of bc break (Next bugfix release)
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.
@Maks3w I grepped the history of xcache but even in the first available commit on github from 2012 this feature was not supported by xcache - see https://github.com/lighttpd/xcache/blob/6663fcfd7a174eb972618c4c70c55b04b5b75024/mod_cacher/xc_cacher.c#L2796
-> So for me this is a bugfix
Then we should "TESTS_ZEND_CACHE_XCACHE_ENABLED=false" for PHP 7 instead add a new env var (INSTALL xcache). We already have a var for this! |
@Maks3w I prefer the set all The variables In an optimal word we should enable all adapters on travis and let the tests run with and without the required extensions installed but this would slow down travis a lot. |
@@ -63,6 +69,7 @@ before_install: | |||
|
|||
install: | |||
- travis_retry composer install --no-interaction --ignore-platform-reqs | |||
- if [[ $INSTALL_XCACHE == 'true' ]]; then git clone https://github.com/lighttpd/xcache.git && cd xcache && git checkout $(git rev-list --tags --max-count=1) && phpize && ./configure --enable-xcache && make install && cd .. && phpenv config-add .ci/xcache.ini || cd .. ; fi |
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've hear now is possible use multi-line statements https://github.com/omnia-md/conda-dev-recipes/blob/master/.travis.yml
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.
thanks for the tip - updated all as multi-line
@Maks3w It's using |
@marc-mabe It's ok for me. However I would prefer for future changes the default policy in the test matrix should be enable the tests (added as global env var) and disable for specific versions (like PHP7) |
this PR is based on #59 and addresses #58
@kynx It took my some hours to make it work in travis