Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:118515 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 12633 invoked from network); 26 Aug 2022 16:28:24 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 26 Aug 2022 16:28:24 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 17C2D1804AA for ; Fri, 26 Aug 2022 09:28:23 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: * X-Spam-Status: No, score=1.3 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_SOFTFAIL,T_SCC_BODY_TEXT_LINE 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-yw1-f175.google.com (mail-yw1-f175.google.com [209.85.128.175]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 26 Aug 2022 09:28:22 -0700 (PDT) Received: by mail-yw1-f175.google.com with SMTP id 00721157ae682-31f445bd486so48325077b3.13 for ; Fri, 26 Aug 2022 09:28:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=XqPcu/gW8WDjfYNWzoSJl91U8nilb5bH4+iSpDjuxHk=; b=NP+KJFECpvsb/mwYmwlTiQnBvejCc3H0ogujnPpiEspdGXbAzhU1pqy65x5o7faL8N xPTAzXpB6pIvUJWBOoZF3SMThu1AA9uu0QdlZHb8t1uiJ36svN2AIRG/fS5Ip/7QaGjm /FCz+N3j2OwehNC8xTjBkMObmYfwTE6+NVcEIjI//iYYTuu3ARrqRhBteVSFoc9X6zMq /xOc6zKaSkMItUR42BdvsEXkVgzgIYKJg/d+jANobNCg12naxnE/IsOCIcui5FxjX6et A49sdfu2GevcY3fg/gDH4aqZnam4UHyq3EzvpN8EJClYhQ77fH0Woa3raf1RBKhCGxi5 xp5w== X-Gm-Message-State: ACgBeo1LnMosfMzQHItMRanjsi7bR1HhX0gt6nHmeeXM2y6iCzGVhZjR 4oeodeE2Cgro3xxdFzU4HK6Gi8LgLwGHhHI8Gj1oCg== X-Google-Smtp-Source: AA6agR59/9VtzTEuB1wF7x+OCLg6gX/fyiqKnQ4n3htjnidAwD3Nvv7Z21O8AHc0EwxUO+dprpjYBijAkQwvlt1XQ1c= X-Received: by 2002:a25:558:0:b0:696:4e84:6367 with SMTP id 85-20020a250558000000b006964e846367mr439747ybf.412.1661531302188; Fri, 26 Aug 2022 09:28:22 -0700 (PDT) MIME-Version: 1.0 References: <355260c3-880f-a497-698f-c12175192485@gmx.de> In-Reply-To: <355260c3-880f-a497-698f-c12175192485@gmx.de> Date: Fri, 26 Aug 2022 11:28:11 -0500 Message-ID: To: "Christoph M. Becker" , Ben Ramsey , Patrick ALLAERT Cc: Go Kudo , PHP internals , Gabriel Caruso Content-Type: multipart/alternative; boundary="0000000000000cea9605e727672b" Subject: Re: ksort breaking change From: pollita@php.net (Sara Golemon) --0000000000000cea9605e727672b Content-Type: text/plain; charset="UTF-8" On Fri, Aug 26, 2022 at 7:19 AM Christoph M. Becker wrote: > > On 26.08.2022 at 05:15, Go Kudo wrote: > > > In the actively supported version of PHP, `ksort()` has been modified to > > include BC Break. > > > > https://github.com/php/php-src/issues/9296 > > > > This may seem like an appropriate bug fix, but it is a clear BC Break. I > > think this change should only be introduced in PHP 8.2 and later. > > In this case, the functions didn't behave as documented, namely to > conform to the general conversion rules, which had a relevant change in > PHP 8.0. Apparently, this case has been overlooked when the change had > been implemented, and only been noticed recently (what still surprises > me). Anyway, fixing the issue now is not really introducing a BC break, > since code relying on the previous behavior did not conform to the > documentation. > What I can see is two noble, but conflicting ideals: 1/ sort() and ksort() should be consistent about their sorting algorithms. I think we can all agree about that in the ideal case, at least. 2/ Behavior within a minor release should be self-consistent and predictable. Knowing the discrepancy exists in current releases of 8.0.x and 8.1.x, we're currently in a position where ideal #2 is satisfied, but ideal #1 is failing in a small, and subtle way. The potential consequence of this is sites out there where the inconsistency shows through to end users (though I wouldn't actually expect any breakages as a result, just clowniness). With the recently applied patch, we would resolve ideal #1, but we would do so at the cost of ideal #2. It's doubtful this will actually break any code either, but potentially user-facing affects could be visible, especially in a mixed-version environment (such as during a rolling upgrade). Given the above, my initial inclination is to err on the side of conservatism for 8.0.x at the least (we're nearly at the end of our primary bug-fix cycle anyway) by reverting the fix on our branch. For 8.1, I think we have a more difficult decision to make with over a year of bug-fix releases to go, and I might be swayed to keep the fix around there. > > Fortunately, there is not yet a release in each version that incorporates > > this change. I think it is possible to revert now. > > Well, the fix is part of the currents RCs; that doesn't make it > impossible to revert, but RMs should have a say in that. Thus I'm > adding Sara and Gabriel as recepients. > Don't forget Ben and Patrick as well, this impacts 8.1 equally. -Sara --0000000000000cea9605e727672b--