On Tue, Dec 13, 2022, at 9:55 AM, Thomas Hruska wrote:
> On 12/13/2022 7:15 AM, Derick Rethans wrote:
>> On Mon, 12 Dec 2022, Thomas Hruska wrote:
>> 
>>> On 12/12/2022 3:52 PM, Derick Rethans wrote:
>>>> On 12 December 2022 22:20:27 GMT, Dan Liebner <dlieb...@gmail.com> wrote:
>>>>
>>>>> It has been proposed to make the error level of "Undefined index"
>>>>> configurable so that teams and individual developers can decide
>>>>> for themselves how they want this situation to be handled. Given
>>>>> that:
>>>>>
>>>>>     - PHP has been treating this as an E_NOTICE for over 20 years
>>>>
>>>> But not in the last three years.
>>>
>> <snip>
>> 
>>> The type of post that the OP sent to internals is likely to become
>>> more common in the next few months as PHP 8.x starts rolling out
>>> globally.
>> 
>> PHP 8 has been rolling out for two years "globally" already.
>> 
>> cheers,
>> Derick
>
> Not for those of us that run the package managed version of PHP in 
> Ubuntu Server LTS it hasn't.
>
> https://wiki.ubuntu.com/Releases
>
> PHP 8.x is brand new as of *next year* from the perspective of those who 
> patiently wait for certain OS level updates because overall system 
> stability is important for critical production servers.  The x.x.2 for 
> the Ubuntu LTS series tends to be sufficiently stable for most 
> environments but 22.04.2 hasn't been released yet.  Hence my earlier 
> comment.

Lagging behind on distro LTS releases for production is one thing.  But if the 
dev team and/or their managers aren't even *looking* at PHP 8 for 2 years, and 
then getting shocked at *deprecations* or known-bad-practices like undefined 
vars becoming a louder message, that's entirely on them.

Developing under E_ALL has been the recommendation for... 15 years?  20 years?  
If someone has been doing that at any point since George W. Bush's first term, 
the undefined vars error messages would have long-since been fixed and 8.0 
would be a cakewalk.

Anyone surprised by any of the changes in recent versions that boil down to 
"know your types and know if you actually have a variable" has been living 
under a rock for the last 20 years.  None of this has been a secret.  The 
language has been providing more and more tools to know-your-types for years.

And yes, I used to work on a system that didn't do that properly.  (TYPO3, 
~800,000 LOC)  It took me a few weeks, but we still managed to fix all of these 
issues in mostly one-person-month, mostly with dropping "?? null" around in 
various places.  It's not the world-destroyer people make it out to be.

--Larry Garfield

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to