Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:125793 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 E8EE91A00BD for ; Mon, 14 Oct 2024 02:01:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1728871442; bh=+6w2Kf7YCL/Jw1CyVACpfW5dfOKT7Tar6FEAZ8TLIx0=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=BNUkvQVLc2WmcjqJ03N5rrVrC2ZAKS29IklAyYjInSxCZJqBnMR2bZxX6881RGk9e QebgipdattlTQi/kTevv8O5MYDjlCJ/6mwJFLgKGemiV6l7sHLTHCnzR/r8L1AF2jV aiMgASNffjAYxOdghj2EITjQx30ipM54+t2RZkOAAyAD6W7KVJwkg0eneNlJdpmO/w uWbkM0syHtGxrUpU7FLnNr1YVgIrql0sMUc1N7dC1mb0TAEKMroThmXGlR8+JTuMOS a3OtmZFRXw42KKzeFv5DRQtfWyF/L3EHeKcaSpdVr3W7mpIYuaqfRReMsgyOmhyjx0 b/v1gHyQIwywg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id B7D0218004D for ; Mon, 14 Oct 2024 02:04:01 +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-f46.google.com (mail-pj1-f46.google.com [209.85.216.46]) (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 ; Mon, 14 Oct 2024 02:04:01 +0000 (UTC) Received: by mail-pj1-f46.google.com with SMTP id 98e67ed59e1d1-2e2a999b287so2918862a91.0 for ; Sun, 13 Oct 2024 19:01:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728871301; x=1729476101; 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=+6w2Kf7YCL/Jw1CyVACpfW5dfOKT7Tar6FEAZ8TLIx0=; b=Xs5kp9qN4HIm7EPwCTdxrXHAdpk4ehWXxCaogh0aS+vwG5sniwWcHYXHbcajVW4LX2 WU6rkvbWjkVe+SwwRSVPvIvbZXgMnsoDCNez+Rl7wL+A3BgGPymmp4so4VA71b+kj2NZ GikaIBWzDglB/zfDA7xkafdxv4yHKOXc6BjCAT6i0/H2qoYPJOA45IjaBpHDuMwMiWi9 9ZOpnSTnaQbPH75S4luFh6qmZ883VZgffxyMFurxK28keSlTmvo1Fno9G3zv8Pgfjb15 3yziNyWd5M/B1wHjZxawPoi4QGs9XQb9KGP4tLSa7NKBsg5UYk/yKIueoFXtM9sZoqsP xc2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728871301; x=1729476101; 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=+6w2Kf7YCL/Jw1CyVACpfW5dfOKT7Tar6FEAZ8TLIx0=; b=BQhrsq8KwCDB53pbnzlS1wl2aUt0nnd7uEGTSnOR/q+Ud23i/FcnSCegFZ8W2vuNch /NSKW1qJcHpy62KXuIRfNZMYM/1O0OXolbEgXDodwaaC4VxL/dgwJSD7M/CFsmTsO3es yxgzin3ViiW9Giq+a32oV9iyM/qdFmUcMpdhlfdebFTQn0LIOGvb9Sc40hatALGaG2xN 8Zeu3MDFM3LbtYDx6nTznmKBTe6onzGvM84QtSh7mRlFQHKmt9Se0kq8VWWeUcFm2deN vSkvwkBQzXQcuCiSv6ftEeBOsNec1GEygJj1TrE55f5QOxSTKqJyhKIIyJ5gx6lbFhOq nF+g== X-Forwarded-Encrypted: i=1; AJvYcCXE07YB660JKaIsRPIR9xyRl2nkTHEdzXmpMrpFp4DWG+eTS9FsxPh+N4CJhrBPYJGVOnURKna2D4s=@lists.php.net X-Gm-Message-State: AOJu0YyELMSz04Xy6scIK/Hek4ww4pSI8VLLLVg45civ631SL5yrnVpq 1TBrH80kvHYCUZZjjQ8KTHKWetfoi40MPzlvzO02KwXMmydlNIQdLq1hR8+qhba1+NBOLc81zig FJ7A0hLm1aQyxGZsaxuI5BJ9+4T/32w== X-Google-Smtp-Source: AGHT+IE8zBzXIHoVaRItmayx3K8nhwaLq3A5TW5ClXnoDrijSnqXjowJuULjpJiVkZQUCuQsBTTeKXy7xMxsiHZHS08= X-Received: by 2002:a17:90b:903:b0:2e2:ddfa:24d5 with SMTP id 98e67ed59e1d1-2e2f0ad562amr11366777a91.15.1728871300553; Sun, 13 Oct 2024 19:01:40 -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 19:01:29 -0700 Message-ID: Subject: Re: [PHP-DEV] Asymmetric visibility is a BC break To: Valentin Udaltsov Cc: Rob Landers , internals@lists.php.net Content-Type: multipart/alternative; boundary="000000000000bb661706246637b4" From: jordan.ledoux@gmail.com (Jordan LeDoux) --000000000000bb661706246637b4 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, Oct 13, 2024 at 5:03=E2=80=AFPM Valentin Udaltsov < udaltsov.valentin@gmail.com> wrote: > On Mon, 14 Oct 2024=E2=80=AFat 01:28, Jordan LeDoux : > > 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 > > Hi, Jordan! > > The problem is that in practice most of the PHP libraries consider > themselves to be compatible with newer PHP versions. > > For instance, Symfony PropertyInfo uses `"php": ">=3D8.2"` constraint in > its `composer.json`. However, it is not compatible with PHP 8.4, I've > just created an issue: https://github.com/symfony/symfony/issues/58556 > > The end user will be the victim, because `composer require > symfony/property-info` will happily install property-info v7.1.4 for > PHP 8.4, but it's not gonna work. > > -- > Valentin > How does a library that uses code that will not even compile (like `readonly` or `private(set)`), but claims to not require a PHP version that uses the syntax, suddenly make a BC problem for the language? Composer allows libraries to set minimum PHP versions for releases. Any time you update your libraries, you may have to update your code which uses it. That's just part of how libraries work. Jordan --000000000000bb661706246637b4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Sun, Oct 13, 2024 at 5:03=E2=80=AF= PM Valentin Udaltsov <uda= ltsov.valentin@gmail.com> wrote:
On Mon, 14 Oct 2024=E2=80=AFat 01:28, Jordan LeDoux= <jordan.le= doux@gmail.com>:
> Backwards compatible has never, in any work I've done through my e= ntire career, meant something like "if you take old code and then upda= te it to the new version incorrectly, it doesn't work"... that see= ms... obvious?
>
> What exactly is the claim being made here? Because it sounds like the = claim is very much that second "definition".
>
> Jordan

Hi, Jordan!

The problem is that in practice most of the PHP libraries consider
themselves to be compatible with newer PHP versions.

For instance, Symfony PropertyInfo uses `"php": ">=3D8.2&= quot;` constraint in
its `composer.json`. However, it is not compatible with PHP 8.4, I've just created an issue: https://github.com/symfony/sym= fony/issues/58556

The end user will be the victim, because `composer require
symfony/property-info` will happily install property-info v7.1.4 for
PHP 8.4, but it's not gonna work.

--
Valentin

How does a library that uses c= ode that will not even compile (like `readonly` or `private(set)`), but cla= ims to not require a PHP version that uses the syntax, suddenly make a BC p= roblem for the language? Composer allows libraries to set minimum PHP versi= ons for releases. Any time you update your libraries, you may have to updat= e your code which uses it. That's just part of how libraries work.

Jordan
--000000000000bb661706246637b4--