Skip to content

Conversation

TRowbotham
Copy link
Contributor

No description provided.

@TRowbotham
Copy link
Contributor Author

What is the best way to fix the failing test in PHP 7.1 since the integer range depends on the PHP version? I could add a third test file, but that seems overkill.

@staabm
Copy link
Contributor

staabm commented Aug 2, 2021

I could add a third test file, but that seems overkill.

kind of agree.

maybe run the data/mb_substitute_character.php only on php 7.2+ and leave php 7.1 alone?

another alternative could be dropping the single assertion \PHPStan\Testing\assertType('\'entity\'|\'long\'|\'none\'|int<0, 1114111>', mb_substitute_character()); for the php 7.x test

@TRowbotham
Copy link
Contributor Author

I went with skipping the test on PHP 7.1. I tried using an if statement in the test file, but that didn't seem to work.

@TRowbotham TRowbotham force-pushed the mb_substitute_character_dynamic_return branch from 87e9f1d to a11e33a Compare August 14, 2021 18:45
@ondrejmirtes ondrejmirtes force-pushed the mb_substitute_character_dynamic_return branch from e80990c to fcaff2e Compare August 15, 2021 14:29
@ondrejmirtes ondrejmirtes merged commit cee6f68 into phpstan:master Aug 15, 2021
@ondrejmirtes
Copy link
Member

Perfect, thank you!

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