Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:116404 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 73848 invoked from network); 16 Nov 2021 08:21:54 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 16 Nov 2021 08:21:54 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id ACE031804AC for ; Tue, 16 Nov 2021 01:16:49 -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.3 required=5.0 tests=BAYES_40,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A, 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-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (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 ; Tue, 16 Nov 2021 01:16:49 -0800 (PST) Received: by mail-wm1-f44.google.com with SMTP id az33-20020a05600c602100b00333472fef04so1344645wmb.5 for ; Tue, 16 Nov 2021 01:16:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :references:from:in-reply-to:content-transfer-encoding; bh=Q6CIXjXu9J8EIUJsFve/BTloliQsUcSgBojgoxfy+IU=; b=fDUMEhjPz59+nO7w0aVoFrhsShwHNwAEc4sAfbhAATXyrUE+wihfDZLTngJCaag+Mx ZyoCiCoiPaRtmsCXAXPCqxiXOn0Y5UkoP6LgrkBH0ya3yi9WWla7osPW7pRCGqYUL7Cg a3qwicnfpHRlJx6g4uYNzKx6fopksy3q6VgzZLdwez6yn0Tw8hiFR08BpIUhXX7bNDGu JNfxbTAS1QGJLcklt/h1MhlTSQ+7AHS/HlaO9bjhSe3DhHwqITNS2G9HxUb0/d9Lgwsw ZzcYphT7F61qQc3b7dprzBUfYjmUz9Ifh2nGDODGdL7ymiScLeLmOjdz0nBIP1xw/x3B jiZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=Q6CIXjXu9J8EIUJsFve/BTloliQsUcSgBojgoxfy+IU=; b=22rydlD4m+T8P+jNF/gLITvxlZtlMIsMHQPh0HyETXMAAm0NZsA66O3ws/Cr9bwoEw 6NXCP3oD/2v390ZXuhouk8ebHgH7r+CObShOfsKQD4dEjCtWVQTthB7FeUJ+asxFZVUL COOaUfNIipIVQ5zQGOUzR0qc3E0oT0IgkCvvXn1N1zpzLbxg63hB24XimqE9IpnIv2RD eHaf9DIolCgqKx3HvWVlethPTPYhVg4PazvGFhM9NWLGazWcNNwLAcg+euxkoKzbFKND iquTsEKohZpPpj2BbDl9+MKhLfXal0+InFzaCViOE3q/ayjSjiL6VUt3mhdFUQzbfl1X N7Mw== X-Gm-Message-State: AOAM533JWn7DDMOWoaEn1JaI1n6J4i60kOv7anwdYJ9YQBRBB/u6+fN0 1CXG3ros6YO0S6lDS/Y2ePSfh4w1NrNRMg== X-Google-Smtp-Source: ABdhPJzJKTxGrriayXL8Qvyat9VjDWuz6/l5BmRvUL/6Fp7j/sxL7Ng5dblzGcFQruy+pRPaYnHRXg== X-Received: by 2002:a05:600c:1c07:: with SMTP id j7mr70317067wms.12.1637054207939; Tue, 16 Nov 2021 01:16:47 -0800 (PST) Received: from [192.168.0.22] (cpc104104-brig22-2-0-cust548.3-3.cable.virginm.net. [82.10.58.37]) by smtp.googlemail.com with ESMTPSA id j40sm2023234wms.19.2021.11.16.01.16.46 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 16 Nov 2021 01:16:47 -0800 (PST) Message-ID: Date: Tue, 16 Nov 2021 09:16:44 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 Content-Language: en-GB To: internals@lists.php.net References: <371ca983-2b07-ae39-3629-49cf7ff8ee64@heigl.org> <497ab532-a39d-389c-8bca-86768650c2f4@heigl.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: [RFC] Deprecate dynamic properties From: rowan.collins@gmail.com (Rowan Tommins) On 15/11/2021 17:20, Andreas Heigl wrote: > When you are testing whether writing 'X' to a property and then > reading from that property gives that 'X' back, then everything should > be good. I see, yes, code that is 100% perfectly tested can get away without the language performing any error checking at all - the behaviour is all guaranteed by the tests. I would be very surprised if even 1% of PHP applications can claim such comprehensive tests. > Yes: That rips off a completely different topic: Testing "getters" and > "setters". Unless you have zero business logic in your classes, testing getters and setters is absolutely not sufficient. Everywhere that accesses a private or protected property has the potential to mistype it and cause subtle bugs. > That is absolutely correct. The main question is: "Do we *need* to > spot this behaviour in old code"? Not "Do we *want* to spot this > behaviour in old code". Yes to both questions. A number of "uses" of this feature are not actually deliberate uses which need protecting by adding the attribute, they are mistakes that are going unnoticed in those warrens of untested, un-analysed code. Those code bases are exactly the ones that benefit from the language having the run-time checks built in. Regards, -- Rowan Tommins [IMSoP]