Skip to content

build with php 7.2 #174

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 1 commit into from
Nov 12, 2017
Merged

build with php 7.2 #174

merged 1 commit into from
Nov 12, 2017

Conversation

dbu
Copy link
Member

@dbu dbu commented Sep 27, 2017

No description provided.

@dbu dbu force-pushed the php-72 branch 2 times, most recently from 2906d6f to b0f69ae Compare September 27, 2017 08:38
@dbu
Copy link
Member Author

dbu commented Sep 28, 2017

this is quite puzzling. whats more, it looks like the test assumption was expecting a wrong behaviour and php 7.2 magically fixes this. the code in question is https://3v4l.org/IOvBR - and it makes no sense to me why the result is different on 7.2.

@fbourigault
Copy link

The 7.2 test use PHPUnit 5.7 which is probably not compatible with PHP 7.2.

@fbourigault
Copy link

After searching what could be wrong, I can conclude the that unset has a different behavior. I replaced the unset call with an array_filter and I get the same output in any PHP version. https://3v4l.org/gG7BG

@fbourigault
Copy link

I've sent a bug report to PHP: https://bugs.php.net/bug.php?id=75433.

@dbu
Copy link
Member Author

dbu commented Oct 25, 2017

thanks! and we already got an answer on this. so its an optimization about array_values - we seem to have (ab)used the method to reset the counter. a stack overflow search proposes other things like array_merge($array) to get the same effect, but if they can fix array_values, that would be best. lets see. if we are not compatible with some RC versions, i don't care, as long as 7.2.0 is fine.

@fbourigault
Copy link

fbourigault commented Nov 9, 2017

I ran the tests against PHP 7.2RC6 and it's now working. You could trigger a build if 7.2RC6 is available on travis-ci.

@dbu
Copy link
Member Author

dbu commented Nov 9, 2017

@dbu
Copy link
Member Author

dbu commented Nov 12, 2017

thanks a lot @fbourigault for your help in tracking this one down! looks like you even found a relevant regression in PHP 7.2 during the process :-)

@dbu dbu merged commit 39e2639 into master Nov 12, 2017
@dbu dbu deleted the php-72 branch November 12, 2017 21:15
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.

2 participants