Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:116521 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 32526 invoked from network); 25 Nov 2021 23:58:23 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 25 Nov 2021 23:58:23 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id F110A1804B4 for ; Thu, 25 Nov 2021 16:55:42 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_20,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS 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-qv1-f41.google.com (mail-qv1-f41.google.com [209.85.219.41]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 25 Nov 2021 16:55:42 -0800 (PST) Received: by mail-qv1-f41.google.com with SMTP id v2so5866825qve.11 for ; Thu, 25 Nov 2021 16:55:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=grokability.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=kAEf5xR6k7qWv7D1mJOiK5eDPOCxezJS0QZHOY81tqI=; b=a3dTAKPBsw5K6KRNPfauPNu5qHV4EBJdvST8N7lEhplYmctqvtuMGy8PpBfqYAJ6wo zuo76WuwwVZ8omfNICz2EtdAqdxwHXxM9U3Ecs6+MKIOPa6j7J7gVHNqTs7nbMM7b+td f52mtWd0UtWWwlmp2eik3q/oEquLxuv/Qk5OEON2Hb69Cyml1rYkcnHkYF/tmdfutJto PmocdOwZ3/8VYQSzWh5ny+FxHb+mjONFF3XqryW6vLUyJDuEuKoHt7tjgLIQhdRK9DuI Q1AXm1yQ/2QN7tBzOAAA3yWMQa7oGomAIIqJXyMsyGH7fH0vsx1qM97Q2BhvzA6qu85H ZN4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=kAEf5xR6k7qWv7D1mJOiK5eDPOCxezJS0QZHOY81tqI=; b=nEaWdHg39I/wWiLa0qx/MaW9uiHorulz638RfINyjIXD3EYrLk0ww1VTlH9eYVn8wc LcpqwZX0MBIuGXvwwPKxMr38+HN5dS25P5bTCw8A+TqFZ/af5VnaL0AEUcgwmz5euSbh isS04ExdyMJ5Ct/BF7787CXiVnmliohxKv+zsVCtJkUXxSM+xS/GJR3iHC9FoZz5RdPG x9TtIKRYbnkBcX1mQR0AaKOe4cKh1kvcAxVmFRV7c79iFcVRqEjaSWuUmd3NBmsTq7G9 cIpu45IMwm8eR3raA04jXEoP+I2kI6VkZPvn3L3w0u1WlE+drHbvaA9AAsQVqBb8xQdY FUvg== X-Gm-Message-State: AOAM531XJhVtlYfKpC7FZjuRnXVey1Qnqv6WsOs4RrxxAT1I9Vkbf2mr CIjnTpJfvsTf+dFLy6ZfW/MFTX5XGKB6kAhijvXWcw== X-Google-Smtp-Source: ABdhPJwoJhi3Sf43RwutBRICpVrixz4U4XDqFk0DTpVv4w7ENTGTntTruAu8iBKfb14AuJsG60CePAgCjyqzlZ6LUvY= X-Received: by 2002:a05:6214:c8a:: with SMTP id r10mr22003364qvr.38.1637888141580; Thu, 25 Nov 2021 16:55:41 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Reply-To: Brady Wetherington Date: Thu, 25 Nov 2021 16:55:30 -0800 Message-ID: To: Kamil Tekiela Cc: PHP internals Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Re: [VOTE] Deprecate dynamic properties From: internals@lists.php.net ("Brady Wetherington via internals") > This is a little bit overly dramatic. This isn't such a huge change that = would affect 50% of existing projects. It's likely to affect a small number= of projects in a very limited way. > It's also not true that developers will slap #[AllowDynamicProperties] on= every class. That would imply that every class in their project is using d= ynamic properties. That would be absurd. If it's truly the case that every = class in 50% of the projects uses dynamic properties then we should not con= sider this RFC at all. The whole premise of it is that it's highly unlikely= that many people are using dynamic properties on purpose. It's true that m= any old unmaintained projects might use it as a feature, but the keyword is= "unmaintained". I would not trust dependencies that haven't been kept up t= o date for a few years. > > I doubt that having to add a single attribute to a selected few classes w= ould be such a major issue that projects would decide to stay on PHP 8.1 ra= ther than upgrade. It's not comparable to Python 2/3 situation IMHO. > > I would be interested to know some numbers from Snipe-IT. Have you done a= preliminary analysis of your codebase of how many classes are actually usi= ng dynamic properties? From a brief look, I can see that usually most prope= rties are declared. Sorry, I didn't mean to sound dramatic, just trying to share my concerns. I suspect that you're very right, and *very very few* projects use dynamic properties on purpose (in our own code, we probably don't ever _mean_ to, except maybe for our Custom Fields feature, but we could do the attribute for that one or so class(es)), but that's not my point. I suspect many of our _dependencies_ might be using it (by accident, to your point!). But I can't control every package in my composer.json, which is where I'm worried. I can't force those developers to do what I want, and I don't want to be stuck in a 'version sandwich' because I'm waiting for one of them to change something. And maybe when they *do* try and change something, they might also change the interface (a violation of semver, but, it happens in the wild, more often than we would like). We have to support old and new versions of php and that can make our Composer situation a real nightmare (I just dragged us forward to be able to work in PHPv8, and it was far harder than it needed to be). I'm not worried about our code at **all** - we write it! We can change it (and we'd be good citizens, I promise, we would!) And that attribute is ignored on versions of PHP that don't support it; which'd be fine for us. That's a fair ask, and we'd do it. What I'm scared about is about our 42 dependencies in composer.json, and the ~400k bytes of dependencies described by our composer.lock. And I'm worried about other projects that have even more dependencies, or might be stuck on a framework or something that's no longer being updated, but they can't migrate off of for whatever reason. I wouldn't wish that on anyone. Thank you for considering, and for your extremely well-written response, -B.