On Mon, 10 Apr 2023 at 21:30, Deleu <deleu...@gmail.com> wrote: > On Mon, Apr 10, 2023, 1:17 PM Pierre Joye <pierre....@gmail.com> wrote: > > > hello, > > > > > > On Sun, Apr 9, 2023, 1:37 AM Stephan Soller <stephan.sol...@helionweb.de > > > > wrote: > > > > > Hello, > > > > > > I'm sorry if this isn't the correct mailing list for that discussion > but > > I > > > couldn't find a more appropriate one where people actually know how the > > > wind is > > > blowing. > > > > > > A few days ago I migrated a project from PHP 7.1 to 8.2 and the amount > of > > > deprecations and fatal errors spooked me a bit (details below if you're > > > interested). That got me wondering about the long-term stability of PHP > > > (as in > > > language and API breaks) and I looked at the RFCs. I got the impression > > > that > > > static typing has a lot of traction now and I have no idea of what the > > > fallout > > > might be of changing a dynamically typed language into a statically > > > typed one. > > > > > > I keep reading this in multiple languages, pr even more frameworks. > > > > I understand agency work, managers pushing new features instead of a > > cleaning some legacy. > > > > however years of ignoring deprecation notices (very few were introduced > > right before 8.0). > > > > Most of them could have been fixed within a couple of hours in any code > > base, if they had tests. > > > > I would suggest, very very nicely, to review and rethink the development > > flows of these projects instead of asking php to freeze. > > > > best, > > Pierre > > > > I resent the sentiment of "if your code or development process was exactly > like mine you wouldn't be here complaining" and I believe nobody is asking > PHP to freeze. Not everyone has the ability to fix every deprecation within > a couple of hours and not everyone has tests. Yes, we get it, it's common > knowledge nowadays that code without test is unmanageable, but if you > inherited a 15 year old codebase developed by multiple developers in a > start-up mentality producing code faster than they could actually plan for > and with no tests, its going to take some time to clean that up and if I > take longer than you would, does it mean I matter less as a PHP user? > > PHP 8 is pretty great to work with and a lot better than previous versions, > but there was no opt-in aspect to a lot of PHP breakages. All that we're > asking here is for a bit more forgiveness to existing code that was > developed 2 decades ago by a complete different generation and still need > to run today while we clean it up. > > > >
Hello Deleu, I want to highlight your response specifically, because you blame the wrong people here. This is the failure of the business owner to plan accordingly and ignore all the warnings for years and decades. That is if any developer raised any concerns lately, which I also have seen quite a bit when "yes man" just shove code into the meatgrinder for a year or two and then just move to the next job: "It's not my problem, the next guy will deal with this". And that feeds the vicious cycle, and the owner is either oblivious or does not understand the implications because "well, it works, it generates money" at the moment right until that plane hits the ground and things blow up. I've handled a big legacy project, did major updates to it, seen how an effort of 1 month of my time to drag it into the modern day paid off over the next 6 months by picking up development speed by 3x with the same team of 5 people + me. In 1 year we started to literally take away clients from our competitors who could not keep up with us and we had a literal line of clients to onboard, we had to scale our sales team 3x and had a backlog of 6 months still. All stemmed from a single decision "I will tackle this, we need it to update to newer PHP". Business owners were really stoked that they actually listened to developers. You cannot expect to run code that was written 2 decades ago without major updates on modern language versions. It's not possible for almost any language that is being actively developed. Think laterally - instead of hand-fixing every null check out there, introduce a library that can handle data structures and handle the nulls for you en mass. Isolate the internals and just pass already sanitized values into it. Suddenly you cut off like 90% of the needed fixes that prevent you from running your code. It's still needs fixing, but at least you give it good data to start with, so it does not error out. -- Arvīds Godjuks +371 26 851 664 arvids.godj...@gmail.com Telegram: @psihius https://t.me/psihius