Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:127252 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 A84AD1A00BC for ; Wed, 30 Apr 2025 12:13:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1746015043; bh=+FeA1xTZBDw/Dwxv6+IU4td/feIGQvRs3NwyDOAHDLM=; h=From:Subject:Date:References:To:In-Reply-To:From; b=Jce4nX/UQRkHMqRujyl8+XNQ7kP0zanyPmZviWVwz9Zj3qfumws6ZWI74klYxU5LI 7CEZeo2asJIHeWLLttLES3KXTtq2qYHJ5sPD+A2U0mN2VO5duNTIC0zNLzkJaJmuBh kRSXq+hsfLMWx1JuImmLcSdxEe5JR8tzPvVjL41oYILwB+CqRFTYmjnhUf2HsXI0wS Li4fYhpCoobgCrsVTQbyNlP25zK54AtSx416Skx27zdX9DAFvSC5Fmt3iSok/AksPP ehBlBWouWCJGUwE3N2uU/GCXT4hdwnMBzjKrXZzI/n+BXX9Oz0e8wfG2+MSzMfkSHD aSdhe3cbUbQFQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 6E2111801D4 for ; Wed, 30 Apr 2025 12:10:42 +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.2 required=5.0 tests=BAYES_40,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 mail.gna.ch (mail.gna.ch [212.45.196.109]) (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 ; Wed, 30 Apr 2025 12:10:31 +0000 (UTC) Received: from smtpclient.apple (unknown [194.169.219.181]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by darkcity.gna.ch (Postfix) with ESMTPSA id CE5903A0795 for ; Wed, 30 Apr 2025 14:12:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=cschneid.com; s=default; t=1746015166; bh=+FeA1xTZBDw/Dwxv6+IU4td/feIGQvRs3NwyDOAHDLM=; h=From:Subject:Date:References:To:In-Reply-To; b=JR7nDWEuJt4OCjmAQSIyhDXjRhF+07x9iD4H1UO66sTmAvrv3sXS4FuoOQMrjQXWy NJM67jFtxEcNafuZ9Tp3WPIx/4PPga4SaTcHNqYCyXBM0TAz1K3gZ7UZhtIF2BYuJB dVZqO1zQPSf3t6+OA/6R5I2uhiYlNvkEVQ2l43WA= Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.500.181.1.5\)) Subject: Re: [PHP-DEV] [RFC] [Discussion] Minor version compatibility Date: Wed, 30 Apr 2025 14:12:46 +0200 References: To: PHP internals In-Reply-To: Message-ID: <0433FF37-D938-4D3D-AC03-E5143218EFEA@cschneid.com> X-Mailer: Apple Mail (2.3826.500.181.1.5) From: cschneid@cschneid.com (Christian Schneider) Am 27.04.2025 um 20:22 schrieb Gina P. Banyard : > I fundamentally reject the concept of this RFC to restrict our ability = to do input validation. I am sorry but I fail to see how the RFC restrict the ability to do = input validation. > Emitting an E_DEPRECATED for invalid inputs remains utter nonsense. I agree that it should most probably be an E_WARNING, not an = E_DEPRECATED. Which is a voting option in the RFC. > I will repeat this once again, but error-ing on *invalid* inputs = entered by the developer is an *advantage*. > I cannot comprehend the motivation to let users ship buggy code into = production, that might end up hard to debug. > We throw Errors on non-existent constants, functions, classes, etc. = for a reason. I am *not* against error-ing on invalid input, and I don't think anyone = else is. It is all about the migration path for existing software and having = guidelines for such changes. Using intermediate warnings before going to an Exception allows updating = an installation step-by-step instead of all at once. Which is important = both for projects using a lot of composer packages as well as = installations where PHP and applications are maintained by different = people (e.g. hosting companies). Case-studies regarding implicitly nullable parameters and the warning = phase: - https://github.com/hybridauth/hybridauth/releases with fixes for PHP = 8.4 was released only last week - https://github.com/grpc/grpc-php still has not released fixes for PHP = 8.4 Sure, this is from one minor version to the next and not about invalid = argument values and it uses E_DEPRECATED instead of E_WARNING but my = main points stays the same: If this would have been done without warning phase then it would be a = blocker for upgrading to PHP 8.4, now filtering this warning is enough = while the packages are being updated. And I am of the very strong opinion that the benefits of reducing = friction for upgrading to the current PHP version outweighs the costs. = Forgetting to change the warning to an Exception can be simply prevented = by e.g. a helper function or even a greppable code comment. > As such, if this policy does get accepted, I will start to severely = reduce my contributions to the project. > As it would be a clear sign to me that what people want from the = project is something that I find completely nonsensical and thus I = should direct my energy and time to something more inline with my own = design beliefs. I find it very unfortunate that you are feeling the need to pressure the = community in this way as I can assure you that we all want the project = to improve even it is sometimes in different ways. Regards, - Chris