Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:127338 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 1E10C1A00BC for ; Tue, 13 May 2025 10:56:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1747133662; bh=0yWsrbu0ww5nvQ63NEul94HZPwXX6x5astqQVqscaro=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=iGVzHFOs9m3F/t/FUp62yOQdF8itNVx68R1v7HQcwz0lxTw1r0BtuNOdYfSzRaSNu Z7PxwdGl9y5dsYLiZ6yT0ikhssDkXeuHlbuRPOjyN/dWpI3hG8JRfXSqCDWEAhbeNy 9Lzl9jqfBez2xzlrWR0zcvuSHcZzNtupCbTRPVdbQECQEfMv2xOVr070F6AWHf/I8t GLhbD+QWYbvBJ8chfHlWBum6LAECmlgaNKPfjFD2JuCnseW/5nZfIMrDV0nm68KzGJ F4YPM3K5Lp87Su7tINTxzw2XhEWSt+p6WeMMbYy2ZDfJHG/IYaAKE/Hui6Efc/cWDi JooYsEvXuyZzw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id AB15218006A for ; Tue, 13 May 2025 10:54:21 +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.7 required=5.0 tests=BAYES_05,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,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 chrono.xqk7.com (chrono.xqk7.com [176.9.45.72]) (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:54:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1747133791; bh=JVWNHYXsxWIA9tXNMfxJs419LW4FelgIwZSstoPKDCE=; h=MIME-Version:Date:From:To:Cc:Subject:In-Reply-To:References: Message-ID:Content-Type:from:to:cc:subject:message-id; b=H2D4QB1+/vqNqWEEfSP8pU00PleksglXEG8UipDMH5W7MFHIJF60aJIO+1fSfhCUG FmSLplqRLgvxYEKTBVws9qMMMBVLCCRDMO0HZo9joZkPsNE+Nll6gRRlV3oqVDVRli bwXF+RA/Vg57ZApMTEFWxLWrnHC76BCM/WfYCx2uMGt2Swqp1diFZVDJF6wPnysZGM kU/zE54pbMa/8rUbKlbzYASiO4oVLH/aWYxkWDXwZQu7WSkUcypJm7I1fwprdBayAK C6LVZI9ihtpYBwACzwSHjpmChmYUpL3k7+aJOj1s34Z1j95T6INrXCHkDcmDA6qj+O /RuYUoZ2etsIg== Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Date: Tue, 13 May 2025 12:56:30 +0200 To: Jakub Zelenka Cc: PHP internals list Subject: Re: [PHP-DEV] [RFC][Discussion] Policy release process update In-Reply-To: References: <08df054856f9076039b5835c0625ee6f@bastelstu.be> Message-ID: <0c55c9b700ddac8810974ca62522c3fd@bastelstu.be> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit From: tim@bastelstu.be (=?UTF-8?Q?Tim_D=C3=BCsterhus?=) Hi Am 2025-05-13 12:13, schrieb Jakub Zelenka: >> 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. We don't currently have any rules at all, except for “when the RFC approves the break, then it's okay”. I was trying to find some guideline for BC breaks that might be okay in a minor (when approved) and BC breaks that are never okay in a minor. The application in question is in a very similar position that PHP itself is, it has a large public API that "third party" developers rely on and a long development history. BC breaks sometimes are not avoidable when you try to move forward. Basically the rule of thumb for a breaking change in a minor version was that "most third party add-on should be adaptable with minimal changes, while remaining compatible with both minor versions after making these minimal changes". >> 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? That paragraph is intended as an example for my train of thought / how I would interpret my suggested guidelines for hypothetical breaking changes. Of course I do not expect anyone to propose an RFC to disallow single-letter variables (not even in a major). Best regards Tim Düsterhus