Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:125788 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 3272F1A00BD for ; Sun, 13 Oct 2024 22:24:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1728858414; bh=LekyjGyRbkvKEdxYNRRgIZHnvvJRkdWQXSxVb55lLmE=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=SMOngB1eB/crai3d+qIzIoD5HBySAyqYXHUffjIUkuFRVWPOmNCBOhPbnML45/Q2A 8jzVl0krvuwfu6pa1dYY0v45yrw0QjwAmllmVNuH1aNPSOpwZ3RmWBqKPmRI+cnb10 NdaCgdnUTl+OCIcIKZOBcHV9VfBcQpPesYQGjNg9XZ8u3eRMoSsBJUKb4lu3YqcFui haiIfjIhlIAHwMPabjY/tWVGC2XCYInHud7XKNIXSQUWAkQU0h403mPOrymfppaPQX 0xXyGD3zrvD2vTbcVDAZhtDf/Ef3F8nzgRDJLDAQV7RuRsi2/l3UCmgIr8MCMU8eMh pFKRhSipkuJwA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id E700318062D for ; Sun, 13 Oct 2024 22:26:53 +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.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, 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: No X-Envelope-From: Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54]) (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 ; Sun, 13 Oct 2024 22:26:53 +0000 (UTC) Received: by mail-pj1-f54.google.com with SMTP id 98e67ed59e1d1-2e2b9480617so2873846a91.1 for ; Sun, 13 Oct 2024 15:24:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728858273; x=1729463073; darn=lists.php.net; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=LekyjGyRbkvKEdxYNRRgIZHnvvJRkdWQXSxVb55lLmE=; b=TQlnFlj4ObJ4nKPlq/t9ff3e4pA5fgAfW1zZmMoILiorhqxzLlzEj/yX7JgoCVP5oG ppR1Zo/BdHygebBmJ6oLlTUOUHIzwEn/T3LqJok4NPD91NiB0G7V///aH4UgfBJkkO84 jUE9gjstwcCxNT0dgoib9/ya/EjavsACT8V++Tw4GzYKXdusSH1wJ9R27x5d88OSdbOr 2aB7HZHYKEOxyX8M77ELr97U6PEhmDrtqqsUSNO3/PLEDAkTIXaFFE3a+itGfm2v/xMz 1IR0DfSqfWdwMxymxkzifMLkWoFLHBP1oD8Xat9YGqewJhnIb1OFYCSwpTcwqt4BHPLA cSJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728858273; x=1729463073; 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=LekyjGyRbkvKEdxYNRRgIZHnvvJRkdWQXSxVb55lLmE=; b=YvHNjV5JrF8luFlxeAk5oZyzl7zhMMGGyi/RWJJo5g6RJA74Goy6cRgRFdPvI1lpMX 4OvwKU5rYWhdKx7ctZuCIbmOsqJtxMyRrfKjj/M7Ze3GeZKrNRfcAEzd3d7yMkz0ktl/ i/lxmK+n2V62RvpywTbfVCQIWLd4X01TGXG+LI9Ihs7T80sqh3p+QMJiC/81HWP4n0nA skbtSyo9zNw5m/JiThx4NWktxxwh8Eqo4PXeb9Sj/oum1Vx72iFyz6nZi6jubTd0h4fJ 16TxCmcwM22WBq/CzBO5/JKxPHDSBnsfdtgBmWMoYBevHD6RcBNM5PkZ9IOZKm7+6FyY Yygg== X-Gm-Message-State: AOJu0Yy3e5TiAYKZ0PHpjolT/j8u8kt4A7HpgZynUtCoOCwGlyBrF0hU g+ltPQGdB9x/6Sli1A0wOryy9aZFoPf9vptWWX0zGZeHoSY36xa3zhsNzcLOTOCoqgdw3ad97Qd N09usAcHAeiF8zhG5kzewuBbS621Hng== X-Google-Smtp-Source: AGHT+IGOjNIMhA+GRNes7zfRBs+XQODg/otBs2Dg09DesEPLQBfQTUPgwQtT44PQez5/OZ5liOMOPSJB7LmKo8jtsd0= X-Received: by 2002:a17:90a:f3c9:b0:2e2:b6ef:1611 with SMTP id 98e67ed59e1d1-2e2f0b00201mr11536465a91.18.1728858272745; Sun, 13 Oct 2024 15:24:32 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 References: <2A7CF24F-3AE3-4125-965F-C65431C42DFB@gmail.com> <30a41608-a1ea-40a9-8d2a-c53c508cd89f@jnvsor.net> In-Reply-To: Date: Sun, 13 Oct 2024 15:24:21 -0700 Message-ID: Subject: Re: [PHP-DEV] Asymmetric visibility is a BC break To: Rob Landers Cc: internals@lists.php.net Content-Type: multipart/alternative; boundary="00000000000036d25f0624632f78" From: jordan.ledoux@gmail.com (Jordan LeDoux) --00000000000036d25f0624632f78 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Oct 11, 2024 at 3:34=E2=80=AFAM Rob Landers wro= te: > On Fri, Oct 11, 2024, at 12:20, Jonathan Vollebregt wrote: > > > A "proper" implementation won't break, but there may be subtle ways tha= t > "improper" implementations will break and thus it should be considered a = BC > break. > > This thread is fallaciously equating breaks in third-party libraries > _when changing consumer code_, with breaks just by updating PHP. > > If I'm in PHP 8.1+ and I pass an object into a library and all goes > well, then I change a property to readonly and get an error, that's not > PHP making a breaking change by allowing me to use readonly. That's an > outdated library (and me) breaking my code. > > I've had my reflection code break on backwards compatible changes loads > of times, but every time it required the user to make a change to their > code first. > > Valentin's list of examples proves this point. They worked fine on 8.1 > _until_ people changed code to add readonly. That's not a BC break. Same > deal for aviz. > > > I guess what I am saying is that we probably need a proper definition of > "BC break". IMHO, adding a php version check to do something is probably = a > BC break. Serializers will need a version check, thus it is a BC break. > > =E2=80=94 Rob > Is this not something than has a really standard and consistent definition? "Code which runs correctly on the previous version of the project, if it is not updated, will also run correctly and provide the same output on the next version." Backwards compatible has never, in any work I've done through my entire career, meant something like "if you take old code and then update it to the new version incorrectly, it doesn't work"... that seems... obvious? What exactly is the claim being made here? Because it sounds like the claim is very much that second "definition". Jordan --00000000000036d25f0624632f78 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Fri, Oct 11, 2024 at 3:34=E2=80=AF= AM Rob Landers <rob@bottled.codes> wrote:
=
On Fri, Oct 11, 2024, at 12:20, Jonathan Vollebregt wrote:
> = A "proper" implementation won't break, but there may be subtl= e ways that "improper" implementations will break and thus it sho= uld be considered a BC break.

This thread is f= allaciously equating breaks in third-party libraries=C2=A0
_w= hen changing consumer code_, with breaks just by updating PHP.

If I'm in PHP 8.1+ and I pass an object into a library= and all goes=C2=A0
well, then I change a property to readonl= y and get an error, that's not=C2=A0
PHP making a breakin= g change by allowing me to use readonly. That's an=C2=A0
= outdated library (and me) breaking my code.

I&= #39;ve had my reflection code break on backwards compatible changes loads= =C2=A0
of times, but every time it required the user to make = a change to their=C2=A0
code first.

<= div>Valentin's list of examples proves this point. They worked fine on = 8.1=C2=A0
_until_ people changed code to add readonly. That&#= 39;s not a BC break. Same=C2=A0
deal for aviz.
=

I guess what I am saying is that= we probably need a proper definition of "BC break". IMHO, adding= a php version check to do something is probably a BC break. Serializers wi= ll need a version check, thus it is a BC break.

=E2=80=94 Rob
=

Is this not something than has a really st= andard and consistent definition?

"Code which= runs correctly on the previous version of the project, if it is not update= d, will also run correctly and provide the same output on the next version.= "

Backwards compatible has never, in any work= I've done through my entire career, meant something like "if you = take old code and then update it to the new version incorrectly, it doesn&#= 39;t work"... that seems... obvious?

What exa= ctly is the claim being made here? Because it sounds like the claim is very= much that second "definition".

Jordan
--00000000000036d25f0624632f78--