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

Introduce rule requiring Null Coalesce Equal Operator #171

Merged
merged 1 commit into from
Apr 4, 2020

Conversation

carusogabriel
Copy link
Contributor

This is a new rule that will only affect PHP 7.4+ codebases :)

@carusogabriel carusogabriel added this to the 8.0.0 milestone Apr 4, 2020
@carusogabriel carusogabriel requested a review from a team as a code owner April 4, 2020 14:03
greg0ire
greg0ire previously approved these changes Apr 4, 2020
morozov
morozov previously approved these changes Apr 4, 2020
Copy link
Member

@morozov morozov left a comment

Choose a reason for hiding this comment

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

AFAIK, the DisallowedShortTernaryRule rule in PHPStan strict rules does about the same regardless of the PHP version. Why is it only for PHP 7.4+ in the coding standard?

lib/Doctrine/ruleset.xml Outdated Show resolved Hide resolved
@kukulich
Copy link
Contributor

kukulich commented Apr 4, 2020

@morozov because ??= exists only in PHP 7.4+

The PHPStan disallows ?:, this sniff requires ??=

@carusogabriel carusogabriel dismissed stale reviews from morozov and greg0ire via f7b4676 April 4, 2020 16:30
@carusogabriel carusogabriel force-pushed the new-rule/null-coalesce-equal-operator branch from 373c093 to f7b4676 Compare April 4, 2020 16:30
@greg0ire greg0ire merged commit 8f841c2 into master Apr 4, 2020
@greg0ire greg0ire deleted the new-rule/null-coalesce-equal-operator branch April 4, 2020 18:12
@greg0ire greg0ire self-assigned this Apr 4, 2020
@greg0ire
Copy link
Member

greg0ire commented Apr 4, 2020

Thanks @carusogabriel !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants