Open ymc-dabe opened 8 years ago
i reproduced it, skips are because of missing memcached (not memcache), and mongo, ... i have 2 failing tests
PHPUnit 5.2.10 by Sebastian Bergmann and contributors.
Runtime: PHP 7.0.5-dev
Configuration: /home/baloghsz/src/pecl-memcache/test2/symfony/phpunit.xml.dist
............................................................... 63 / 809 ( 7%)
............................................................... 126 / 809 ( 15%)
...................................................S........... 189 / 809 ( 23%)
............................................................... 252 / 809 ( 31%)
............................................................... 315 / 809 ( 38%)
..............................................SS............... 378 / 809 ( 46%)
S.............................................................. 441 / 809 ( 54%)
............................................................... 504 / 809 ( 62%)
............................................................... 567 / 809 ( 70%)
............................................................... 630 / 809 ( 77%)
........................................................E...... 693 / 809 ( 85%)
..SSSSSSSSSSSSSSSSSSSSSS.....E................................. 756 / 809 ( 93%)
..................................................... 809 / 809 (100%)
Time: 5.73 seconds, Memory: 14.00Mb
There were 2 errors:
1) Symfony\Component\HttpFoundation\Tests\Session\Storage\Handler\MemcacheSessionHandlerTest::testReadSession
Missing argument 2 for Mock_Memcache_75ed4e5a::get(), called in /home/baloghsz/src/pecl-memcache/test2/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcacheSessionHandler.php on line 82 and defined
/home/baloghsz/src/pecl-memcache/test2/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcacheSessionHandler.php:82
/home/baloghsz/src/pecl-memcache/test2/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MemcacheSessionHandlerTest.php:72
2) Symfony\Component\HttpFoundation\Tests\Session\Storage\Handler\NativeFileSessionHandlerTest::testConstructDefault
is_dir(): Unable to find the wrapper "tcp" - did you forget to enable it when you configured PHP?
/home/baloghsz/src/pecl-memcache/test2/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeFileSessionHandler.php:51
/home/baloghsz/src/pecl-memcache/test2/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NativeFileSessionHandlerTest.php:72
mock. It is about function get, implemented as PHP_FUNCTION(memcache_get). in input parameters there is no change, so what i changed: This function uses zend_parse_parameters, and is returning flags to a reference from function parameters. There was a change in references, so if i would to do it in php7, i needed to define it in https://github.com/websupport-sk/pecl-memcache/blob/NON_BLOCKING_IO_php7/php7/memcache.c#L96, so there was added definition https://github.com/websupport-sk/pecl-memcache/blob/NON_BLOCKING_IO_php7/php7/memcache.c#L48, which there wasn't before.
So parameters as seen in zend_parse_parameters were not changed, but there is added a definition, so now mock can discover about parameters. Can I overcome this in this module, or should be fixed elsewhere?
Not sure about #2. I have to check.
for #1, arg_info is missing for many APIs, we should definitively complete them at some points :) That looks like what is used by phpunit to valid the mock interface.
@pierrejoye I am noticing this also on our current build. Do you have an ETA For #1 (or even a work around?).
Using websupport-sk/pecl-memcache (branch php7 / commit 88750b4203914bc3c40b485cfa139e3094e0fd04) with PHP 7 a test in Symfony's HttpFoundation (v3.0.2) component is failing with the following error:
This does does not happen with the PHP5 version of websupport-sk/pecl-memcache (branch NON_BLOCKING_IO_php7 / commit fdbd46bbc6f53ed6e024521895e142cbfc9b3340):
How to reproduce
# git clone https://github.com/symfony/symfony.git && cd symfony
# git reset --hard v3.0.2
# composer install
# phpunit src/Symfony/Component/HttpFoundation
Further information
The mocked object generated by phpunit is different for the php7 and the php5 version:
Thus I suspect to the php7 version exposes something different through the reflection API, than the php5 version does.