Re: Alias stdClass to DynamicObject?

From: Date: Mon, 06 Sep 2021 17:50:04 +0000
Subject: Re: Alias stdClass to DynamicObject?
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-115974@lists.php.net to get a copy of this message
Den 2021-09-06 kl. 18:22, skrev Christian Schneider:
Am 06.09.2021 um 18:08 schrieb Benjamin Morel <benjamin.morel@gmail.com>:
Yes, please! A future where dynamic properties are only allowed on DynamicObject is bright.
I have nothing against a DynamicObject alias for people who like to be more explicit in their code...
Totally agree here!
I would even deprecate the stdClass alias straight away, so that the whole thing can be gone in PHP 9.
... but I'd prefer retaining a backward compatible version for library code, at least for a while and preferably without warnings :-) - Chris Couldn't agree more on the statement "without warnings"!
I mean if one have code that is in production, is running perfect and one wants to upgrade to the newest and fanciest PHP version and the logs are flooded with warnings for a deprecation with zero impact on functionality. What do one do? Maybe just turn of the warnings for that code section / library ;-) r//Björn L

« previous php.internals (#115974) next »