Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:126706 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 C1EBC1A00BC for ; Mon, 10 Mar 2025 23:07:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1741647912; bh=QxOAUYULKzHeEr1d6MFCcV11qtL0fACNPHbDrDwz4Qs=; h=From:Date:Subject:To:From; b=nJOTGCWIvyaho1v7FJ6QrnBe2F+1mPYizJeKKFgRVZ5GPvDWz1TfPKWUWH1eBz1Jk Wm+nx3TD48Ng/Z0i1EPhVx2oNj4H6QEMaHONxFr+pj5vVHH7nxvDWuRd4+6+adVH+y yqag+aZHY89/n/bD+fEbj8TH/7RAdOVmAG2GSZDAtFsjKib+VKsdP09PLzeo7fhkri Pb95IlDgHo+WBoCVzYzOERBOxfEXiwjxmadOrXWIyPkmiWCGEV0nYo+ECpXtv2G54H IdqGPUMbXMR9W1L4GG8VbLUTI1BcnDAfr15GqvoyTY0gPREF6OCl2Ns8fsujrrUPZk 1PHp1F7EiO5Yw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C25B81806E6 for ; Mon, 10 Mar 2025 23:05: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=-0.2 required=5.0 tests=BAYES_20,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-pj1-f47.google.com (mail-pj1-f47.google.com [209.85.216.47]) (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 ; Mon, 10 Mar 2025 23:05:11 +0000 (UTC) Received: by mail-pj1-f47.google.com with SMTP id 98e67ed59e1d1-2ff6ae7667dso9140237a91.0 for ; Mon, 10 Mar 2025 16:07:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1741648065; x=1742252865; darn=lists.php.net; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=QxOAUYULKzHeEr1d6MFCcV11qtL0fACNPHbDrDwz4Qs=; b=iBdyd1zsMYq8EsyhSg2QTaU5MKJzkjIZDly0MqMr7eZRQlJ99qPh0b1hR1vIbyrDkb Lmud1v+lnpcDquF5OBmHWGxH2KX5gjR5npeLOG3zpMSaJhNP5OS3n0noz9I2GSJeCVD7 ImqlmmSRwIhhk5o6QtS+ZwHecvxmHUT+FY68aRa//mrBbECPQbrpNn346YbKFaHgTh3M PiOA7PCGjpibaHBnkcPj/nvnHzjDwnsN9evjmLIXpcRQ79YXFMYcbtdnG5gu9YGtVldJ Ow4EZNG6EBsEgv86ABIjjpffe84JccqpbJVE/hG72NyoByMCGWECVNmyv2fyHVHfF/iH 64Pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741648065; x=1742252865; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=QxOAUYULKzHeEr1d6MFCcV11qtL0fACNPHbDrDwz4Qs=; b=kifRfAu3eoL91quReWvYpB4sDiXrYU41movPghob3nONU1VSCSwBz2TCpubEjl25DL 3GN2t4WFUfZnJ0gmlgHnprAxIABNbmxhk7/fKI/tX94UZtFBBOQltPcFbtCjGOL7m/WP 25FiGb5w/kfOvyCK74lUeHjBxwC4+2gziuzTGbj5VoROSg6HXDAUz414WtuPWx8trSiC kGZZorFtnnyK8o9FJLQGV8OdGIOx5+fHdT6/X6kLUKThHSKL2LvAyCox0xH938dLWxF+ VJr7LTxwam8RFA4suZNYHyakXVDnRdwzMCYN+tKjm4/Hf7ice0Yd+00K2V2vJ6e7MX/9 M4sw== X-Gm-Message-State: AOJu0Yw17kHGD5WxqJ4oxc56AKyBFP1OTTmvV7WBB5PnL3W0kKL8+v9K z/FMymogYz6HtCYDV88m0xKsGPqx0mLaEumQMyeWqX9xaoHuxeZbg700sy1lat+89CjDVqArXjs yDkQ4/rRh3AW+njkpNmR6AmCma4KVoYVK X-Gm-Gg: ASbGncvE62hjpDVplnd9dcKZ8v1bHpVS+umpsXl8abl7ItGyE40DqepJbwypmIOVQ7T tGrnqkSSstC6S1ZgMOHl/jv7iUe9OSfYYzzEBrDFXti9NqzUrC3afLAkD7U/9zlLt3OWvI6rbdO pomAZrxXlwIq1z6W/hGqORbrJfnS4= X-Google-Smtp-Source: AGHT+IH0QkQRZh8B62XexfbuUz4vYKgxC1HfJk7ta7Km3edd5wJYcaIqujEwsClRiASopQk9XDVRiZ66bsnq62xghsA= X-Received: by 2002:a17:90b:1c0c:b0:2fe:a545:4c85 with SMTP id 98e67ed59e1d1-2ff7cefccd3mr23733149a91.27.1741648064513; Mon, 10 Mar 2025 16:07:44 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Date: Tue, 11 Mar 2025 00:07:33 +0100 X-Gm-Features: AQ5f1JpDohbtBTkqajYZNk2aJvmBl6AVOuSY9k60hUy9MzfC6ikOIDiO2X6X-GY Message-ID: Subject: [PHP-DEV] Consensus on argument validation for built-in functions To: PHP internals Content-Type: multipart/alternative; boundary="00000000000035902a0630050ac5" From: jorg.sowa@gmail.com (Jorg Sowa) --00000000000035902a0630050ac5 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello everyone, I=E2=80=99d like to align on the approach to validating arguments for built= -in functions (usually for flag inputs). Some ongoing discussions in PRs: - https://github.com/php/php-src/pull/15647 - https://github.com/php/php-src/pull/15883 - https://github.com/php/php-src/pull/17859 In some cases, changes introduced ValueError immediately in the next version, without a deprecation phase. To ensure a consistent approach, I propose the following: 1. Introduce a deprecation notice in the next minor version. 2. Raise a ValueError in the following minor version. If needed, I can create RFC, but as described by a few people in the discussions, we can avoid it having the consensus. What do you think? Kind regards, Jorg Sowa --00000000000035902a0630050ac5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello everyone,

I= =E2=80=99d like to align on the approach to validating arguments for built-= in functions (usually for flag inputs). Some ongoing discussions in PRs:- https://github.com= /php/php-src/pull/15647
- https://github.com/php/php-src/pull/15883
- https://github.com/php/php-src/pu= ll/17859

In some cases, changes introduced ValueErro= r immediately in the next version, without a deprecation phase. To e= nsure a consistent approach, I propose the following:

1. Introduce a= deprecation notice in the next minor version.
2. Raise a ValueErr= or in the following minor version.

If needed, I can create RFC, b= ut as described by a few people in the discussions, we can avoid it having = the consensus. What do you think?

Kind regards,
Jorg Sowa
--00000000000035902a0630050ac5--