alexeymezenin / laravel-best-practices

Laravel best practices
11.43k stars 2.38k forks source link

Shorter optional() in php8 #103

Closed olsza closed 3 years ago

olsza commented 3 years ago

Since the Nullsafe operator appeared in PHP8, you can further shorten the optional() method to ?-> :)

pietrushek commented 3 years ago

@alexeymezenin I suggest reject this PR because PHP in 8 version for now is still low popular and common Also @olsza made changes in 2 files (pl and en)...

olsza commented 3 years ago

hay @pietrushek i don't mind rejecting my PR but...

pietrushek commented 3 years ago

I've started many projects in my job since php 8 was released but every in ver 7.x

olsza commented 3 years ago

ok, I start with the latest versions, but only if the hosting companies also support, and in this case PHP8 is already supported by most... It's only a proposal, so I reckon that PR may not be accepted ;) that's what it is like in open projects.

olsza commented 3 years ago

@alexeymezenin I suggest reject this PR because PHP in 8 version for now is still low popular and common Also @olsza made changes in 2 files (pl and en)...

according to the survey on TT (https://twitter.com/brendt_gd/status/1430020088594370564?s=20) you can see that a lot of people use PHP8 (almost 50%) So @pietrushek was wrong that PHP8 was not very popular

ps. the survey was conducted by @brendt on a sample of over 900 people

pietrushek commented 3 years ago

On packagist blog: https://blog.packagist.com/php-versions-stats-2021-1-edition So, are you sure?

olsza commented 3 years ago

Ok, I'm not going to discuss it, but in general your link is for all PHP based packages in general. I gave a survey where most users use #Laravel, this is what the PR "Good Practices" is about As for me, the topic and PR can be closed, for me it does not matter whether it will merge or not. I only made a suggestion, not to discuss.

alexeymezenin commented 3 years ago

Thank you for the PR. I've removed the link to your profile, sorry. I can't add it because it will be unfair to the person who originally translated the whole document to Polish. Hope for your understanding.

olsza commented 3 years ago

Thank you for the PR. I've removed the link to your profile, sorry. I can't add it because it will be unfair to the person who originally translated the whole document to Polish. Hope for your understanding.

Of course I understand. That's why I gave the link as a separate commit, so that it would be easy to undo it or not commit it.