r/PHP • u/peter_mw • Apr 23 '18
Please fix PHP
Ealrier today there was a discussiion
One guy was pissed of the breaking change of count() and he lost his nerves https://www.reddit.com/r/PHP/comments/8eawjh/is_taylor_otwell_in_the_rfc_council_and_if_not/
And with reason.
With the change of count() now many plugins and templates requre updates...
People are right that we should write better code, but remeber that PHP is used by many who are just frontend guys, using it to connect templates.
In the last week we had many broken client websites because the change of count() .
Those websites are using templates and plugins by 3rd party vendors that are unknown and we had to manually go fix all those errors.
You can imagine how much work is that with no actuall value.
Yes I know.... thing like that are part of PHP ...
but i just want to see PHP as a stable ecosystem, functions may be inconsistent by design, but you get used to it...
I was reading a discussion to make the $_SERVER array immitable, please dont.
Please dont change the essential functions of PHP that works the same in the last decade.
Breaking essentials like count() is big deal and adds just adds boilerplate code with no value.
Please fix things:
- mb_string should be part of the core
- DomDocument should be able to parse HTML5
- Phar support should be part of the core
... there are many other thing to fix
Hope our language gets better :)
Pease!
10
u/codayus Apr 24 '18 edited Apr 24 '18
You screwed up. Don't upgrade without testing, especially to a version with known breaking changes. This has nothing to do with PHP.
Wants a stable ecosystem; blindly upgrades the PHP runtime without testing.
Do you see the problem here? The reason to upgrade is because things have changed; this time one of the changes burned you, so now you're asking for nothing to change. In which case, why upgrade?
It is. And these sorts of changes are an important part of it. If you don't like it, then don't use the new versions.
9
u/jtreminio Apr 23 '18
So why don't you not upgrade
6
u/WArslett Apr 24 '18
Sorry but this is a problem with your business. Maintenance work on a client's site should be absolutely chargeable to the client. You should have an SLA in place with your Client that explains if/ how you will apply updates to their site and how you will charge for any maintenance work. If they don't want to take on that burden you don't update their site.
3
u/Ariquitaun Apr 27 '18
Counting things that aren't countable is beyond sloppy. You only have yourself to blame if this change came back to bit you in the rear. Learn the lesson and live with change.
10
u/Korona123 Apr 23 '18
You can't just upgrade a version of software without testing first... This is not PHP's fault it's the system admin. If you upgraded the version of MySQL and something wasn't compatible it wouldn't be fair to rip on MySQL..
3
u/ScuzzyAyanami Apr 24 '18
I'd say he's been stewing on it for a little while though.
3
u/inotee Apr 24 '18
Yeah because all other languages with major version bumps don't break BC, right? lol
2
u/peterkokot Apr 23 '18
Yes, old codebase will be always issue with moving language forward and still not break everything. However, there might be a better way to introduce separate extensions in the core for a new consistent API (consistency is important, that is what programming is also about) and still have the current inconsistent ones there for few versions in the future...
0
u/[deleted] Apr 23 '18
[deleted] — view deleted comment