Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:127337 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 lists.php.net (Postfix) with ESMTPS id 54E5B1A00BC for ; Tue, 13 May 2025 10:13:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1747131080; bh=Qo6On4hmUeb/h1V8/xLR1Zw0XsYKBvf9g5WlDC2u0Yk=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=hI3pOxABsM5XP78NrQt/FLxX41KUej3uvzu4lgHStzLzrdSBbQsK5VAoVelFtBJSe g2qpQW4THsXbVUqUGgDRiW7ud4GiivOahcOTsanJRkLrSe5vaA0tsr2/dnsLeDCiGt llOjuSt0A7ldliVpYePKmHGsbyq4YvJyF1lkqiP9eMkv/ePslH89Fq5oknYb7I1EsH DUq9c/d/6dXSfs5MY4N8d8imX3JK/K6RyUr07xYW6oEdIgy5VaYVMZ1XttmRln3c09 7Ka0jGNNx2h7zbjgYHdl3q7/mKaZFWbwpfjjx1RXMim/AM5tMkcVjWpVNtYSMe6mTr uqJ+oA31pYHDg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id D1B15180081 for ; Tue, 13 May 2025 10:11:19 +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,DMARC_NONE, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from mail-ot1-f41.google.com (mail-ot1-f41.google.com [209.85.210.41]) (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 ; Tue, 13 May 2025 10:11:19 +0000 (UTC) Received: by mail-ot1-f41.google.com with SMTP id 46e09a7af769-72ec4634414so3729764a34.1 for ; Tue, 13 May 2025 03:13:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747131210; x=1747736010; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=O2IoJqQnkNfJha9z/VPPPb6/02aRRpRYqeuu0slsfe4=; b=UwZKnRIIc459/tlHvK0TSFmoQW0iT/VwZZ4ZOa09iRO3DeNFonh6c2JAZ5r6Dp/hCV hr+jzHUrMgjL+R9o5A9RZZzO7sVGZBu+SsatFahJo4/po/Tnq7JOI0AV0RoC6bH0HR0P y5nCvNMGtuLUGP5i0qL7fG3znIYiyeHtOet7BUW+UYVoioRflk9lQwaCucVelxuyrOgW GsuhLhPHZrU+4dcIHq3QZELaVb9fsEQJsSu52bfUMsgT9BVsh+TffrM2Hr+sE2XHKcmK D7gIbakibYY638js/t1lAhj8IXrCt1tsbvC9XeymA2zJ03DANr0sNSTHRY6mxWolUAsv kvnA== X-Gm-Message-State: AOJu0YwaH5okDteBdVgNJLekgknov1qQUsF1aqTzdkTkG8oRXNTEBlN6 HaTJoN+zJ6wOLxTQ2Mx4orKukSpXjHoysufX9Q5tY/pFOMres6kuG68TSLmKKbjUPdz1NvOsfv2 KrFspNtTOTbwXYBd+QdUq+9fmHoytPckL X-Gm-Gg: ASbGncttXymU+ve5/FpabUQK2WKxsoZZn/Ko+RBSxe7UmZ3vbAmrwiIXVZ01PJqD0yb JXkXOoZUpPitqq1Z8R5HRTY2sC/gOj9cK7iYpkpM6DkA1tS2QkDiBD7waLrm8HavOcZJ5p4CVj6 ykos5wrYDHqkmKdC/eJCYDH8cXUGUxKf/n X-Google-Smtp-Source: AGHT+IEIzVLrECAQVG6R+2XYCkuM/ael3QCXcMHpKnlnZwsEKwozRoh6p0XlTiJOWenSPl133QNKwpgVHX9qfWWOXVI= X-Received: by 2002:a05:6808:2213:b0:3fe:af08:65b5 with SMTP id 5614622812f47-4037fed980emr11177564b6e.37.1747131210468; Tue, 13 May 2025 03:13:30 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 References: <08df054856f9076039b5835c0625ee6f@bastelstu.be> In-Reply-To: <08df054856f9076039b5835c0625ee6f@bastelstu.be> Date: Tue, 13 May 2025 12:13:19 +0200 X-Gm-Features: AX0GCFtFG28wxqlK0nqg7fCwCyBznXqIZ4JxmHRg9eOB1bDzMyDkT0vqVasb2A0 Message-ID: Subject: Re: [PHP-DEV] [RFC][Discussion] Policy release process update To: =?UTF-8?Q?Tim_D=C3=BCsterhus?= Cc: PHP internals list Content-Type: multipart/alternative; boundary="0000000000002d137c063501af06" From: bukka@php.net (Jakub Zelenka) --0000000000002d137c063501af06 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, On Sun, May 11, 2025 at 10:14=E2=80=AFPM Tim D=C3=BCsterhus wrote: > Hi > > I gave this some additional thoughts. > > Am 2025-05-09 13:36, schrieb Jakub Zelenka: > >> - A minor version MUST NOT break syntax compatibility (i.e. every PHP > >> program that compiles must continue to compile). > >> > > > > Added this one > > Thinking about this more, I am not sure if having this as a MUST rule > matches what we did in the past and I'm also not sure if it is useful to > have. This rule prevents the addition of new keywords, since they might > conflict with function names. Adding new symbols and adding a new > keyword is functionally equivalent, both changes would result in a > compile time error. Singling out the syntax change does not appear to be > a useful distinction. > > Yeah this make sense. I changed it to SHOULD in the latest version with some other updates. > -------------------------- > > From my experience in maintaining an old PHP application and upgrading > it to support the latest and greatest PHP every year, I think the > following points would be a good starting point to discuss: > > - For backwards compatibility breaks introduced in minor versions there > MUST be a simple (for some appropriate definition of simple) way to > adjust the code to be compatible with both the current PHP version and > the upcoming version. Ideally the change would be compatible with a > wider range of past PHP versions (past 3 or so?). It must be a change > that is simple to perform even with basic tooling (i.e. not requiring an > IDE or static analyzers). > If I understand it correctly, this sounds really more like completely new rule that we don't currently have so I would rather not add it. We don't have this relation differences between X.Y and X.(Y+2) to do some extra breaks so it's more for a separate RFC. I'm also not a big fan of such change to be honest. > - Backwards compatibility breaks in minor versions MUST NOT result in > silent behavioral differences. Instead any breaking change must be > "obvious" when executing the program, even when having a > less-than-stellar test suite. > > I think this makes sense and added this paragraph (with exception of that less-than-stellar test suite) to the policy. > Adding new symbols results in a compile time error (immediately obvious) > and is simple to fix (rename or remove your own implementation). > Similarly throwing a ValueError for invalid inputs is reasonably easy to > detect by executing the affected code path (you can't miss an Exception) > and also simple to fix (don't do that). Changing operator precedence is > not easy to detect, thus it is unacceptable. Throwing an error when > single-letter variables (e.g. $i) would be easy to detect, but break > almost every program, thus would be unacceptable. This makes sense but might be a bit too specific. Did you mean to also include it in this policy? Kind regards Jakub --0000000000002d137c063501af06 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

On Sun, May 11, 2025 at 10:1= 4=E2=80=AFPM Tim D=C3=BCsterhus <tim= @bastelstu.be> wrote:
Hi

I gave this some additional thoughts.

Am 2025-05-09 13:36, schrieb Jakub Zelenka:
>> - A minor version MUST NOT break syntax compatibility (i.e. every = PHP
>> program that compiles must continue to compile).
>>
>
> Added this one

Thinking about this more, I am not sure if having this as a MUST rule
matches what we did in the past and I'm also not sure if it is useful t= o
have. This rule prevents the addition of new keywords, since they might conflict with function names. Adding new symbols and adding a new
keyword is functionally equivalent, both changes would result in a
compile time error. Singling out the syntax change does not appear to be a useful distinction.


Yeah this make sense. I changed it to = SHOULD in the latest version with some other updates.
=C2=A0
--------------------------

=C2=A0From my experience in maintaining an old PHP application and upgradin= g
it to support the latest and greatest PHP every year, I think the
following points would be a good starting point to discuss:

- For backwards compatibility breaks introduced in minor versions there MUST be a simple (for some appropriate definition of simple) way to
adjust the code to be compatible with both the current PHP version and
the upcoming version. Ideally the change would be compatible with a
wider range of past PHP versions (past 3 or so?). It must be a change
that is simple to perform even with basic tooling (i.e. not requiring an IDE or static analyzers).

If I understa= nd it correctly, this sounds really more like completely new rule that we d= on't currently have so I would rather not add it. We don't have thi= s relation differences between X.Y and X.(Y+2) to do some extra breaks so i= t's more for a separate RFC. I'm also not a big fan of such change = to be honest.
=C2=A0
- Backwards compatibility breaks in minor versions MUST NOT result in
silent behavioral differences. Instead any breaking change must be
"obvious" when executing the program, even when having a
less-than-stellar test suite.


I think this makes sense and added thi= s paragraph (with exception of that less-than-stellar test suite) to the po= licy.
=C2=A0
Adding new symbols results in a compile time error (immediately obvious) and is simple to fix (rename or remove your own implementation).
Similarly throwing a ValueError for invalid inputs is reasonably easy to detect by executing the affected code path (you can't miss an Exception= )
and also simple to fix (don't do that). Changing operator precedence is=
not easy to detect, thus it is unacceptable. Throwing an error when
single-letter variables (e.g. $i) would be easy to detect, but break
almost every program, thus would be unacceptable.

This makes sense but might be a bit too specific. Did you mean to al= so include it in this policy?

Kind regards

Jakub=C2=A0
--0000000000002d137c063501af06--