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

Update phpstan to 0.10.8 #110

Merged
merged 1 commit into from
Jan 9, 2019
Merged

Update phpstan to 0.10.8 #110

merged 1 commit into from
Jan 9, 2019

Conversation

akondas
Copy link
Contributor

@akondas akondas commented Oct 16, 2018

Also changed level to max in configuration.

@jwage jwage force-pushed the phpstan branch 2 times, most recently from 44bc8c8 to 7945112 Compare January 9, 2019 21:33
@jwage jwage added this to the v2.0.0 milestone Jan 9, 2019
@jwage jwage changed the title Update phpstan to 0.10.3 Update phpstan to 0.10.8 Jan 9, 2019
@jwage jwage merged commit 0b116d3 into doctrine:master Jan 9, 2019
@@ -37,7 +37,7 @@ public function __construct(WordInflector $singularizer, WordInflector $pluraliz
*/
public function tableize(string $word) : string
{
return mb_strtolower(preg_replace('~(?<=\\w)([A-Z])~u', '_$1', $word));
return mb_strtolower((string) preg_replace('~(?<=\\w)([A-Z])~u', '_$1', $word));
Copy link
Contributor

Choose a reason for hiding this comment

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

These changes are not valid, it hides the error instead of reacting on it.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

I started to throw exceptions when preg_replace returns null but it got so complicated so quick in some areas where we chain multiple preg_replace calls together. I'll work on it in #115

Copy link
Member

Choose a reason for hiding this comment

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

Also, do you know in what scenarios preg_replace would return null?

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

@akondas akondas Jan 10, 2019

Choose a reason for hiding this comment

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

There is also https://github.com/thecodingmachine/safe not related, bad thought

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

4 participants