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

Use codingmachine/safe #745

Merged
merged 1 commit into from
Jul 14, 2019
Merged

Conversation

BackEndTea
Copy link
Member

This PR:

I can't fix everything at this moment, for example preg_replace has different return types bases on its parameters, and PHPStan can't understand that from the safe function. So i've opted to keep those as is right now.

Copy link

@tests-checker tests-checker bot left a comment

Choose a reason for hiding this comment

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

Thank you for contributing to Infection. We noticed you didn't add any tests. Could you please add them to make sure everything works as expected?

Copy link
Member

@maks-rafalko maks-rafalko left a comment

Choose a reason for hiding this comment

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

Cool

what about adding phpstan rule to force using these functions?

We, and especially new contributors, will 100% forget to import safe's functions.

@BackEndTea
Copy link
Member Author

We can't add PHPStan plugins, because we use the phar, and the plugins require to use a composer dependency. (Due to scoping of the phar etc)

@maks-rafalko
Copy link
Member

Understood. Thank you @BackEndTea

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.

None yet

2 participants