Skip to content

Enhance FILTER_VALIDATE_INT option in filter_var#1499

Merged
ondrejmirtes merged 6 commits intophpstan:1.8.xfrom
takeokunn:feature/apply-filter-var-null-option
Jul 10, 2022
Merged

Enhance FILTER_VALIDATE_INT option in filter_var#1499
ondrejmirtes merged 6 commits intophpstan:1.8.xfrom
takeokunn:feature/apply-filter-var-null-option

Conversation

@takeokunn
Copy link
Copy Markdown
Contributor

@takeokunn
Copy link
Copy Markdown
Contributor Author

@ondrejmirtes I don't know how to fix failure github actions job.
Could you mind help me?

@herndlm
Copy link
Copy Markdown
Contributor

herndlm commented Jul 9, 2022

@takeokunn it looks like the problem is that e.g. octdec returns only int before PHP 8. At least that's the type phpstan currently resolves. Such cases might be impossible to fix and have to go to a PHP version specific baseline most likely. There should be some existing already. Sorry, I'm typing from my half-broken phone :)

@zonuexe
Copy link
Copy Markdown
Contributor

zonuexe commented Jul 9, 2022

@herndlm
Thanks for your help! (I was working on pair programming with @takeokunn today)
Maybe the problem will be resolved after cherry-pick or rebase #1500.

@herndlm
Copy link
Copy Markdown
Contributor

herndlm commented Jul 9, 2022

@zonuexe most likely it will, maybe double-check hexdec too. Sorry, still on my phone, otherwise I could have checked already

@zonuexe
Copy link
Copy Markdown
Contributor

zonuexe commented Jul 10, 2022

@herndlm
Of course, hexdec() is typed correctly

'hexdec' => ['int|float', 'hexadecimal_number'=>'string'],

@ondrejmirtes ondrejmirtes merged commit 73626c2 into phpstan:1.8.x Jul 10, 2022
@ondrejmirtes
Copy link
Copy Markdown
Member

Thank you!

@takeokunn takeokunn deleted the feature/apply-filter-var-null-option branch July 11, 2022 03:34
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.

Enhance FILTER_VALIDATE_INT option in filter_var

4 participants