Skip to content

Fix tests for PHP 7.1 #297

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

Merged
merged 4 commits into from
Jan 20, 2017
Merged

Fix tests for PHP 7.1 #297

merged 4 commits into from
Jan 20, 2017

Conversation

arjenschol
Copy link
Contributor

invoke_callback_2 fails because of ArgumentCountException (init_cb_arg gets only 2 args).
Check number of passed arguments with func_num_args() insteadof checking $args is null

session_lock fails because of second warning in 7.1
Skip session_lock.phpt for php < 7.1 and create new testcase for >= 7.1 which tests both warnings.

invoke_callback_2 fails because of ArgumentCountException (init_cb_arg gets only 2 args).
Check number of passed arguments with func_num_args() insteadof checking $args is null

session_lock fails because of second warning in 7.1
Skip session_lock.phpt for php < 7.1 and create new testcase for >= 7.1 which tests both warnings.
Fix expected warning
- fix whitespace. Now configured TAB for phpt files too...
Copy link

@SjonHortensius SjonHortensius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 871b772

@@ -18,9 +18,9 @@ function init_cb_fail($m, $id) {
echo "configured, should not be called.\n";
}

function init_cb_arg($m, $id, $arg) {
function init_cb_arg($m, $id) {
var_dump(func_num_args());

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use tabs for indenting

update .travis.yml, don't allow failures for 7.1 anymore.
@sodabrew
Copy link
Collaborator

Nice work!

@sodabrew sodabrew merged commit 172d1ff into php-memcached-dev:master Jan 20, 2017
@arjenschol arjenschol deleted the fixtestcasephp71 branch January 23, 2017 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants