Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Conversation

marc-mabe
Copy link
Member

this PR is based on #59 and addresses #58

@kynx It took my some hours to make it work in travis

kynx added 2 commits January 9, 2016 22:08
- XCache adapter now checks version > 3.1.0 when running under CLI
- fixed broken internalSetItem() with empty namespace
@marc-mabe marc-mabe changed the title enable xcache tests on travis enable xcache tests on travis (based on #59) Jan 14, 2016
@kynx
Copy link
Contributor

kynx commented Jan 16, 2016

@marc-mabe Looks good! I'll have to get my head round travis properly sometime.

@kynx kynx mentioned this pull request Jan 16, 2016
@Maks3w
Copy link
Member

Maks3w commented Jan 16, 2016

Why PHP 7 is excluded?

@marc-mabe
Copy link
Member Author

@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,
Copy link
Member

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

Copy link
Member Author

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.

Copy link
Member

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)

Copy link
Member Author

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

@Maks3w
Copy link
Member

Maks3w commented Jan 16, 2016

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!

@marc-mabe
Copy link
Member Author

@Maks3w I prefer the set all TESTS_ZEND_CACHE_*_ENABLED variables to true in travis as this enables testing that the right exception will be thrown an no fatal error happens if an extension is missing.

The variables TESTS_ZEND_CACHE_*_ENABLED only exists because it writes test data into a storage and we don't know if we break someones applications or overwrite something as we don't know in which environments the tests are running.

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.

@marc-mabe marc-mabe added the bug label Jan 16, 2016
@@ -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
Copy link
Member

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

Copy link
Member Author

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

@marc-mabe
Copy link
Member Author

@Maks3w It's using pwd=$(pwd) now as with pushd and popd it's nearly the same complicated as before. (It needs to make sure if one of the commands failed in the chain that it can go back the the original directory) I hope it's simpler to understand / read now

@Maks3w
Copy link
Member

Maks3w commented Jan 17, 2016

@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)

@marc-mabe marc-mabe merged commit 196c176 into zendframework:master Feb 12, 2016
@marc-mabe marc-mabe added this to the 2.6.2 milestone Feb 12, 2016
@marc-mabe marc-mabe modified the milestones: 2.7.0, 2.6.2 Apr 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants