8000 [CS] Replace easy occurences of ?: with ?? by fancyweb · Pull Request #40727 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[CS] Replace easy occurences of ?: with ?? #40727

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

Merged
merged 1 commit into from
Apr 7, 2021

Conversation

fancyweb
Copy link
Contributor
@fancyweb fancyweb commented Apr 7, 2021
Q A
Branch? 4.4
Bug fix? no
New feature? no
Deprecations? no
Tickets -
License MIT
Doc PR -

Since we don't support PHP 5 anymore, we can easily replace ?: with ?? when dealing with "nullable" objects. It seems more modern to me (make the code evolve with the new language features). Once we do not support < PHP 7.4, we can replace with ??=.

@derrabus
Copy link
Member
derrabus commented Apr 7, 2021

Thank you @fancyweb.

@derrabus derrabus merged commit b946077 into symfony:4.4 Apr 7, 2021
@fancyweb fancyweb deleted the minor/null-coalescing-44 branch April 7, 2021 16:08
@derrabus
Copy link
Member
derrabus commented Apr 7, 2021

@fancyweb I've merged 4.4 into 5.2/5.x and resolved the conflicts. In case you want to continue there. 🙃

@fancyweb
Copy link
Contributor Author
fancyweb commented Apr 7, 2021

Thanks for the quick merge, I'm going to check upper branches.

derrabus added a commit that referenced this pull request Apr 7, 2021
…web)

This PR was merged into the 5.2 branch.

Discussion
----------

[CS] [5.2] Replace easy occurrences of ?: with ??

| Q             | A
| ------------- | ---
| Branch?       | 5.2
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

#40727 on 5.2

Commits
-------

3f28f2a [CS] [5.2] Replace easy occurrences of ?: with ??
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0