Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:127335 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 139601A00BC for ; Sun, 11 May 2025 20:14:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1746994332; bh=wpdWJgHg1L8wN+RgzM4Gy7Efo+JnWbMhTxptRZYMRG0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=EmPn3cAdBBAJZgfFY4hKs5ZQcUOK9XaNRTWdXCnE56yioREFNtJA6buhRwepRe2ae OqvSdKwcTP2BNNmsn+/yi+W5TDDusJJhCisYILbSQmrDSLtbDU+oQxwSvHL1LRzF6e hphn45xcSR/w+AXy6drf+rTPgKh4yvQDCsmBkVgild0HQjBNjyOM8zZjuwY0caq7IX Y9zdJ6r5/qmqiB58ZFw7zK870BKDPaf16ymG7aBLbakhl09EjgaK20AUcDLZDydAtq Th8s53Oqmxp5ufDXtM4KG+8Ui36Y4VVMv7+s6CBsjXgGP3JVgnk7Xs/lS/FTPd+k7L bMFJe5TJGJsnw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 988C8180034 for ; Sun, 11 May 2025 20:12:11 +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=-2.1 required=5.0 tests=BAYES_00,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 ; Sun, 11 May 2025 20:12:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1746994451; bh=rZAa7PISnbRfRFSmR4PA9yfw56OaEOKIeaIlZ966GOk=; h=MIME-Version:Date:From:To:Cc:Subject:In-Reply-To:References: Message-ID:Content-Type:from:to:cc:subject:message-id; b=DcUDzFCz+4enLrEOOFCjzPW8ESE44UUvkVepMlr3w4FATJpIIbFcjCCE38IYyidpc KiVKIL7S+dlvYr5OG8oZh/iYedlvB8akGafA7N+CQzOK+RTjhdnNGnY+smw3n1CFOW j9k7oUuMv3Jwm6V9SFEuKUiRyEMrAkm25eNoSrR5sM99ufkRUnm0IQH3nr2K+cFyg1 QmZzGYrjZjHP24XHdqjle58RqwG+J7Uw7AAEbfhwGBUADHMpjT4GU7zHNH+M0Eu30/ 8DJT+rr5EP+PhUtMfIHJfYXAlHlc7aigHd6lubIRM0FSm2YkPCmYxQyTV5pimumDQm ESoS4WOaQ8srA== Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Date: Sun, 11 May 2025 22:14:11 +0200 To: Jakub Zelenka Cc: PHP internals list Subject: Re: [PHP-DEV] [RFC][Discussion] Policy release process update In-Reply-To: References: Message-ID: <08df054856f9076039b5835c0625ee6f@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 I gave this some additional thoughts. Am 2025-05-09 13:36, schrieb Jakub Zelenka: >> - A minor version MUST NOT break syntax compatibility (i.e. every PHP >> program that compiles must continue to compile). >> > > Added this one Thinking about this more, I am not sure if having this as a MUST rule matches what we did in the past and I'm also not sure if it is useful to have. This rule prevents the addition of new keywords, since they might conflict with function names. Adding new symbols and adding a new keyword is functionally equivalent, both changes would result in a compile time error. Singling out the syntax change does not appear to be a useful distinction. -------------------------- 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). - Backwards compatibility breaks in minor versions MUST NOT result in silent behavioral differences. Instead any breaking change must be "obvious" when executing the program, even when having a less-than-stellar test suite. 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. Best regards Tim Düsterhus