Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:115808 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 68693 invoked from network); 25 Aug 2021 10:55:10 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 25 Aug 2021 10:55:10 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 8D7051804BE for ; Wed, 25 Aug 2021 04:29:22 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS3301 81.224.0.0/12 X-Spam-Virus: No X-Envelope-From: Received: from ts201-smtpout72.ddc.teliasonera.net (ts201-smtpout72.ddc.teliasonera.net [81.236.60.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 25 Aug 2021 04:29:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telia.com; s=tssemail; t=1629890962; bh=9dusG/zYZaJNH67o34C9IWuXnZ0KFKj2KxQ0cK/qxLw=; h=Subject:To:References:From:Message-ID:Date:MIME-Version:In-Reply-To; b=EJ+0bvAa0C5Zi80JLOutIa+Pet3uEC1aecSefm9ARfaXV23FSHGzrY3RGPXoT5dCEqFxND48d64mbz/dKO6kT/ns4MKDZLIPcdOwBj0h71cT6eg28wjLqHZpUycBAIQ/M57610RX0+dKbNBoGUFhVlLTvHfH8iXCnLC4C8oogiUnltA4zRCHxsoFRr6zJO6QHyxgqsVar2AQAMOtPGHVU8TFW9+kH03U1j9dWEEb8VAs/2xer4biFEOB0QIkjs80YMieCH2lmVlCG67TbjWAwIpJAaQLpcBRv8fKN2BmsiuQnDxc/uFr4EqwJn2uYltxVKLtu+iRi3FpvKKkl67L9w== X-RG-Rigid: 60C471BF03BA017D X-Originating-IP: [84.216.97.227] X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgedvtddruddtledggedtucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuvffgnffktefuhgdpggftfghnshhusghstghrihgsvgdpqfgfvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhepuffvfhfhkffffgggjggtgfesthekredttdefjeenucfhrhhomhepuehjnphrnhgpnfgrrhhsshhonhcuoegsjhhorhhnrdigrdhlrghrshhsohhnsehtvghlihgrrdgtohhmqeenucggtffrrghtthgvrhhnpeeihfetveegheektddtudehudethfeggfekueeltdeftdefffduueevgfefieekheenucffohhmrghinhepphhhphdrnhgvthdpghhithhhuhgsrdgtohhmpddttddttddqlhgrnhhguhgrghgvqdgvvhholhhuthhiohhnrdhmugenucfkphepkeegrddvudeirdeljedrvddvjeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhephhgvlhhopegludelvddrudeikedruddrudehvdgnpdhinhgvthepkeegrddvudeirdeljedrvddvjedpmhgrihhlfhhrohhmpehukeelledtieegudejsehpnhgvrdhtvghlihgrrdgtohhmpdhrtghpthhtohepihhnthgvrhhnrghlsheslhhishhtshdrphhhphdrnhgvthdprhgtphhtthhopehnihhkihhtrgdrphhpvhesghhmrghilhdrtghomh X-RazorGate-Vade-Verdict: clean 0 X-RazorGate-Vade-Classification: clean Received: from [192.168.1.152] (84.216.97.227) by ts201-smtpout72.ddc.teliasonera.net (5.8.716) (authenticated as u89906417) id 60C471BF03BA017D; Wed, 25 Aug 2021 13:29:19 +0200 To: Nikita Popov References: Cc: PHP internals Reply-To: =?UTF-8?Q?Bj=c3=b6rn_Larsson?= Message-ID: <8b19d49a-3340-d83f-7bcc-05cf9699dc79@telia.com> Date: Wed, 25 Aug 2021 13:29:19 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 8bit Subject: Re: [RFC] Deprecate dynamic properties From: internals@lists.php.net ("Björn Larsson via internals") Den 2021-08-25 kl. 12:02, skrev Nikita Popov: > Hi internals, > > I'd like to propose the deprecation of "dynamic properties", that is > properties that have not been declared in the class (stdClass and > __get/__set excluded, of course): > > https://wiki.php.net/rfc/deprecate_dynamic_properties > > This has been discussed in various forms in the past, e.g. in > https://wiki.php.net/rfc/locked-classes as a class modifier and > https://wiki.php.net/rfc/namespace_scoped_declares / > https://github.com/nikic/php-rfcs/blob/language-evolution/rfcs/0000-language-evolution.md > as a declare directive. > > This RFC takes the more direct route of deprecating this functionality > entirely. I expect that this will have relatively little impact on modern > code (e.g. in Symfony I could fix the vast majority of deprecation warnings > with a three-line diff), but may have a big impact on legacy code that > doesn't declare properties at all. > > Regards, > Nikita > I'm in favour of the proposal as long as the stdClass is leaved as is! For declared classes I think it's a good idea. We have legacy code that is littered with dynamic properties using stdClass. It runs today on PHP 7.4.22 and we plan to migrate to PHP 8 as soon as some Open source libraries works under PHP 8. Being forced to rewrite this if this proposal changes to also disallow stdClass dynamic properties would have zero benefits for the app itself and only incur a cost. Regards //Björn L