Skip to content
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

5.0.0-rc1 on PHP 7.4 #8743

Closed
ADmad opened this issue Nov 23, 2022 · 5 comments · Fixed by #8751
Closed

5.0.0-rc1 on PHP 7.4 #8743

ADmad opened this issue Nov 23, 2022 · 5 comments · Fixed by #8751

Comments

@ADmad
Copy link
Contributor

ADmad commented Nov 23, 2022

The composer config has constraints "php": "^7.4 || ~8.0.0 || ~8.1.0" but the code using functions like str_starts_with() which are not available on PHP 7.4.

So is v5 meant to support PHP 7.4?

@psalm-github-bot
Copy link

Hey @ADmad, can you reproduce the issue on https://psalm.dev ?

@ADmad
Copy link
Contributor Author

ADmad commented Nov 23, 2022

I see that the symfony/polyfill-php80 package is required but running on PHP 7.4 I still get the error

Uncaught Error: Call to undefined function str_starts_with() in phar:///some/path/psalm.phar/src/Psalm/Internal/Type/TypeParser.php:790

@orklah
Copy link
Collaborator

orklah commented Nov 23, 2022

Thanks for the report!

That could be a phar issue. All things equal, I'd prefer avoid using polyfills when possible.

I'll see if I can fix that tomorrow

@orklah orklah mentioned this issue Nov 24, 2022
@orklah
Copy link
Collaborator

orklah commented Nov 24, 2022

@ADmad
Copy link
Contributor Author

ADmad commented Nov 25, 2022

Thanks, runs fine now on PHP 7.4.

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 a pull request may close this issue.

2 participants