Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:126411 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id 0C7EF1A00BC for ; Fri, 14 Feb 2025 14:01:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1739541512; bh=mdOc4iu6u+xlctXTUU+qhpHjwLxfVC7zikS5xeGbjZU=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=I0tygkcowScAC+Drr/35xUVf2VPlWrBKEEMQLVCALB1DJJ4Tdc2sT8shbtcqkSRq/ wOLb4wio9hc5YVD3TRGgSQvw6euSvcStPv9Dbnd/jfT2tM3svQBe3BflrQJBcDbXpz thAZddfulQmqPM7/b7N0EbeAm+JmpLmK0dDf3//srhrf7l5MRfVNOJsvZRrrMVo6DB qUfzmzmxV8MRdEFfsl56Wl9K5tnqr+ptFEmFNbQWrYR+b1tDUBOjIu7s3+d5giQh29 mwYDbI8InIjsOkgGkptSx2Rl75WWKU7tkcDzz+2+QjQmIZPDjnI4HhuHUi7aKf/j9l SvNtFhNgT/2kg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id A6EC818055E for ; Fri, 14 Feb 2025 13:58:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_40,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,HTML_MESSAGE, RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from smtp-out3.simply.com (smtp-out3.simply.com [94.231.106.210]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 14 Feb 2025 13:58:29 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp.simply.com (Simply.com) with ESMTP id 4YvYcP5zs4z1FXZv for ; Fri, 14 Feb 2025 15:01:09 +0100 (CET) Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by smtp.simply.com (Simply.com) with ESMTPSA id 4YvYcP2xFWz1FXSg for ; Fri, 14 Feb 2025 15:01:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=givoni.dk; s=unoeuro; t=1739541669; bh=mdOc4iu6u+xlctXTUU+qhpHjwLxfVC7zikS5xeGbjZU=; h=References:In-Reply-To:From:Date:Subject:To:Cc; b=qSX51pax1XgKsJAa3hSOh/zdSK6xHX2d5+62MG8uCQYig/aVEydn51c18zdh+f0iQ DTaV6rkIX3slonyiDFOCCLKsYXhXv+gnSUER1+0+Fk6GcKkkt+9PF/kjVhp7pg2yWq 3v/Bnspx40sxTw0WCPzdTnltKfMRiEi5eomCvk9Q= Received: by mail-pj1-f54.google.com with SMTP id 98e67ed59e1d1-2fbfc9ff0b9so3339840a91.2 for ; Fri, 14 Feb 2025 06:01:09 -0800 (PST) X-Gm-Message-State: AOJu0YyVYpiv7XSyqdKeUTGNyTTLfP/4I4YO+/12sv+4swHBFdjpg8Yi vzIhOQjyVGr/dp2w1phUuPkAjU1FfOlt7eXs+Pzn0IqMITW+Pnq/mtxryJA3Am0Wr3//G7ZTZwW MHy3EmY0VYYEatInuQS+beAhfdV4= X-Google-Smtp-Source: AGHT+IGeMPbDEEB601SDF1BYMMEF/KP/a88FQ1ugmCqXn8ksxEfNF2CEtdmITH0egYXa0GnDSx8s9OVtGNZVKefCylQ= X-Received: by 2002:a17:90b:2686:b0:2ee:db8a:29f0 with SMTP id 98e67ed59e1d1-2fc0f09f3afmr10851333a91.27.1739541667720; Fri, 14 Feb 2025 06:01:07 -0800 (PST) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 References: <5c142df3-94f8-45ba-b5c6-af3b4f7caa8b@varteg.nz> <8f0f99bf-70c3-c150-71b5-6b4760b72709@php.net> <897bd92a-69b4-47e0-a19d-a4da01f38182@alec.pl> In-Reply-To: <897bd92a-69b4-47e0-a19d-a4da01f38182@alec.pl> Date: Fri, 14 Feb 2025 15:00:55 +0100 X-Gmail-Original-Message-ID: X-Gm-Features: AWEUYZn_eGlQKxw8X0IOSQKNrcjEh1inGo_QG7n2ZDLcK0KoWjPCNPlIFazzlH0 Message-ID: Subject: Re: [PHP-DEV] Re: RFC: Marking return values as important (#[\NoDiscard]) To: Aleksander Machniak Cc: internals@lists.php.net Content-Type: multipart/alternative; boundary="0000000000002d4cd0062e1a9bd1" From: jakob@givoni.dk (Jakob Givoni) --0000000000002d4cd0062e1a9bd1 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Feb 14, 2025 at 1:10=E2=80=AFPM Aleksander Machniak = wrote: > On 14.02.2025 12:57, Derick Rethans wrote: > > None of the current attributes (ReturnTypeWillChange, > > AllowDynamicProperties, SensitiveParameter, Override, and Deprecated) > > change the behaviour of how a program runs. They only add warnings. wit= h > > the exception of AllowDynamicProperties to be an actual 'feature' in PH= P > > 9.0 (now it's only a deprecation warning silencer). > > For clarity, it's not AllowDynamicProperties attribute throwing an > exception in PHP9, it's use of a "dynamic" property on an object not > marked with this attribute. So, I'm not sure it's a valid exception to > the rule. > > You're absolutely right that it's not the use of the property that causes exceptions to be thrown, *but it's still a valid exception* to the rule, since the use of the property changes how a program runs (which was the point that was being made). Best, Jakob --0000000000002d4cd0062e1a9bd1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

On Fri, Feb 14, 202= 5 at 1:10=E2=80=AFPM Aleksander Machniak <alec@alec.pl> wrote:
On 14.02.2025 12:57, Derick Rethans wrote:
> None of the current attributes (ReturnTypeWillChange,
> AllowDynamicProperties, SensitiveParameter, Override, and Deprecated)<= br> > change the behaviour of how a program runs. They only add warnings. wi= th
> the exception of AllowDynamicProperties to be an actual 'feature&#= 39; in PHP
> 9.0 (now it's only a deprecation warning silencer).

For clarity, it's not AllowDynamicProperties attribute throwing an
exception in PHP9, it's use of a "dynamic" property on an obj= ect not
marked with this attribute. So, I'm not sure it's a valid exception= to
the rule.


You're absolutely right that it= 9;s not the use of the property that causes exceptions
to be thro= wn, but it's still a valid exception to the rule, since the use = of the property
changes how a program runs (which was the point t= hat was being made).

Best,
Jakob

=C2=A0
--0000000000002d4cd0062e1a9bd1--