Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:116338 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 95952 invoked from network); 13 Nov 2021 07:32:36 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 13 Nov 2021 07:32:36 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 1B0E9180087 for ; Sat, 13 Nov 2021 00:26:46 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-io1-f50.google.com (mail-io1-f50.google.com [209.85.166.50]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sat, 13 Nov 2021 00:26:42 -0800 (PST) Received: by mail-io1-f50.google.com with SMTP id v23so14162625iom.12 for ; Sat, 13 Nov 2021 00:26:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=33isq/tKz0+bOR/8VHMkOvsoKCfakmmgtT8yyIT0Obs=; b=BcXG7oItUuIIAbWTQesziuobDe61JrvW9Hcde4JbWwEbpqwSGF1FpGQKioZ7nS3yKX bGfm2HPXVvaOsj6jQIPRt8dVFB2YqiArS1Y2/9vPkiZmuHQn9sGCtzVRDQyEOki7RrbY O4cCjl90me70atuJbFH0/2H6Lq7pV/8QFzQRqruf+bFmvu7tlYoFOjLDGCu0lznMeb3e XSci1nPaxA/ryWhx887+oCNZP1mrgN0LyZTRYkPbZgSnW+0/q1LsFUVAp5KIImydg37M ugw/bZMA/DEjYmDrkrSDPHcpCvb42soOTJ3VNfMqOXB7mG3iUJGRfcTdMYBAM+DTbeTB 4PYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=33isq/tKz0+bOR/8VHMkOvsoKCfakmmgtT8yyIT0Obs=; b=owm77KgvLU7uQ2Jvh5qmj3HkUecc/k5sAKvsAGmkgrtc0TR9cFtrVnZTU8F5by3hyA +So44qNUUOJpHGO2lWd9Vlf/aHt6V0VlAO/FivQquD5gpTUKkbuKaoTo2InKV9IjAsBN sD5K+n173FJPe0txzkPxOl9fWupIN1wsXfiAUlTvyOAtK9+gCsplncfW4Tsu7BrZvMO8 hYoApKpNG+oCc85IppqDPzjcLdmqQscK0tiIS/yq4Z4zRtuh9VkOnfACUu27UYduIWWJ /cxlVXKJ+ANMjkh+7owcJm9DJJw6T00UAIXIxWEJgUXe8kJGflf5mxE70z/9m2SCi9dh ah4Q== X-Gm-Message-State: AOAM532r0Ub8TxHTd8jZwaZs02DNOLYOJ4EA+K4U5cX3NYEVyl77WLof UTo8fyr3+3PO+ar3qYuGOD27ezicuPE= X-Google-Smtp-Source: ABdhPJzOND4rZKiof25DYD79X67Hhm4jqWrYv8Ka0QosQB3xyNUd2wPadMpUdetv+XgmkqQEeYxJcA== X-Received: by 2002:a05:6638:1346:: with SMTP id u6mr16931794jad.126.1636792001759; Sat, 13 Nov 2021 00:26:41 -0800 (PST) Received: from mail-io1-f53.google.com (mail-io1-f53.google.com. [209.85.166.53]) by smtp.gmail.com with ESMTPSA id y3sm5451076ilv.5.2021.11.13.00.26.40 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 13 Nov 2021 00:26:41 -0800 (PST) Received: by mail-io1-f53.google.com with SMTP id v65so14202007ioe.5 for ; Sat, 13 Nov 2021 00:26:40 -0800 (PST) X-Received: by 2002:a02:9a14:: with SMTP id b20mr16639622jal.52.1636792000721; Sat, 13 Nov 2021 00:26:40 -0800 (PST) MIME-Version: 1.0 References: <6e2d3e92-b53a-8264-85c6-d2d0062ee449@gmx.de> In-Reply-To: <6e2d3e92-b53a-8264-85c6-d2d0062ee449@gmx.de> Date: Sat, 13 Nov 2021 08:26:31 +0000 X-Gmail-Original-Message-ID: Message-ID: To: "Christoph M. Becker" Cc: "Matthew Weier O'Phinney" , Larry Garfield , php internals Content-Type: multipart/alternative; boundary="000000000000c64aaf05d0a75589" Subject: Re: [PHP-DEV] [VOTE] Deprecate dynamic properties From: phpmailinglists@gmail.com (Peter Bowyer) --000000000000c64aaf05d0a75589 Content-Type: text/plain; charset="UTF-8" On Sat, 13 Nov 2021, 00:14 Christoph M. Becker, wrote: > Offering an > opt-out of dynamic properties or some switch to disable the deprecation > would not help in that regard. > Given this is a big change to the way PHP has behaved for decades I did wonder why the RFC didn't propose an opt-out of dynamic properties rather than opt-in, preserving the long-term language behaviour. So thanks for covering that. I think you and the PHP internals community will be surprised by how widely used dynamic properties are. I read through a handful of WordPress plugins we have installed and found a few. And in my own where I'm using a named class instead of an array. I work with modern framework based code most of the time and I find it easy to forget what is out there as quintessential or traditional PHP code. Whether we have #[AllowDynamicProperties] or #[DenyDynamicProperties] one set of PHP users is going to be doing a find & replace across their codebase. From a DX perspective I'd rather have #[DenyDynamicProperties] as it's like declaring strict_mode and opt-in. Either way are the planned engine changes feasible, as the feature of dynamic properties stays in the language but toggled off/on per class? Peter > --000000000000c64aaf05d0a75589--