Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:126717 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 8FDC91A00BC for ; Tue, 11 Mar 2025 15:29:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1741706816; bh=G+mAyypB17LHw44+wMtNdWYqHjcjREbh97LzHxYNiTI=; h=From:Subject:Date:References:To:In-Reply-To:From; b=OHe1a0nUiKY5WR0pi0kpzxlL4a//yyBYgO/AON5FG0J22SMC/Xu8fp6Vd2v7DFnoZ PH/nrBjMYU4cfdZRvgS6O0eiM37cuxwkQ8MLnDqSxbU/1+PaMos6vFPzC5GyuI8Drm dRtTTzBBT8l/yFQizkpKAWzOhmyFbaQIVaIR8kEX+BXy+/u+NgMJa2gVskT5nO9+xy UO5ULjyK1fwzZ6IL2UexwBPPlCqiwr2IQ+sqGP84GI0vd+s3DZ034FBljz/DWrhzcY eRKI/Q9pyYgbZsv8QxWRKcERvmMTNMeQY4OVJqGIzIbc0t2DbjsY0AT6QGKrbTWqcm NqBRb3fj7r8yQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id B0F8418003C for ; Tue, 11 Mar 2025 15:26:54 +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_20,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: No 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 ; Tue, 11 Mar 2025 15:26:54 +0000 (UTC) Received: from smtpclient.apple (unknown [IPv6:2a02:1210:2e2d:4d00:fd5a:4e01:516f:5509]) (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 764BF3A0795 for ; Tue, 11 Mar 2025 16:29:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=cschneid.com; s=default; t=1741706966; bh=G+mAyypB17LHw44+wMtNdWYqHjcjREbh97LzHxYNiTI=; h=From:Subject:Date:References:To:In-Reply-To; b=QTptynDmPBHAkSPFgGBvf1WWHuUEPid8ihP8DQhSDPDFsiYZmAm9pSJDvrGwu0Wup U3qjeFzD7LkbKnS3lPRE+a+YzAnSCWagtOO2HKoSoIyogq4lAV5afo/7Xlv/jU8fs8 p6yT0EDaSx4SvANVlYV/IqyYCEjG6ZYz9dloFwHM= 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.400.131.1.6\)) Subject: Re: [PHP-DEV] Consensus on argument validation for built-in functions Date: Tue, 11 Mar 2025 16:29:26 +0100 References: <041d1a8c-dd43-4592-b997-ad4d2f91aeac@app.fastmail.com> To: internals@lists.php.net In-Reply-To: Message-ID: X-Mailer: Apple Mail (2.3826.400.131.1.6) From: cschneid@cschneid.com (Christian Schneider) Am 11.03.2025 um 12:54 schrieb Gina P. Banyard : > Taking the example of ext/pcntl again, if it were a standalone = extension, having it follow semver is a way more reasonable proposition. > Because we could just release 2 versions the same day, a x.y+1.0 = introducing a warning, and a x+1.0.0 which would convert them into = proper errors. > Meaning as a user, you could be running whatever PHP version and have = the stricter behaviour, or upgrade PHP while still holding the ext/pcntl = version behind while you deal with the issues. I live in a world where a) people don't always control the PHP version = they are using (hosted websites) and b) are using more and more packages = which have to stay compatible for (e.g. security) updates to be = applicable. My (sad) experience is that semver *does not* solve this, it = just provides the concept of differentiating different types of changes = and their respective compatibility assumptions. To be honest the pcntl example sounds like worst of both worlds: - Maintainers would have two (and later maybe even more) versions to = maintain (for how long?). I'd rather have one version at a time and if I = do not want to forget switching the warning to an exception at a = specific point there are ample ways of doing this, e.g. a = TODO/FIXME/whatever you want to call it marker somewhere which is = automatically reported once the given criteria (time, version, ...) is = met. - Would this be the only difference between these two version? If Yes = then why have them in the first place (if you want to be strict about = warnings then just convert them to an exception, that's easy enough). If = No then you open yet another can of worms, e.g. one package requiring = x.y+1 and another package requiring x+1.0. Been there, hated it :-) Regards, - Chris