Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:120945 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 63832 invoked from network); 29 Aug 2023 13:52:15 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 29 Aug 2023 13:52:15 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id E38841804AC for ; Tue, 29 Aug 2023 06:52:14 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-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,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS9370 160.16.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail.sakiot.com (mail.sakiot.com [160.16.227.216]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 29 Aug 2023 06:52:14 -0700 (PDT) Received: from smtpclient.apple (softbank060109141104.bbtec.net [60.109.141.104]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.sakiot.com (Postfix) with ESMTPSA id 85C30401D8 for ; Tue, 29 Aug 2023 22:52:12 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=sakiot.com; s=default; t=1693317132; bh=UbFwSQ6yteLxoLitT9aNJkLjFWbiR9vcvvb1CrdNfZc=; h=From:Subject:Date:To:From; b=MgGdiLEGlA7K0+gyRkOFiij4ZJdCmicFdrJ4br0BUpZF2MEyE20G40XPxncPfK/a0 oXuLggMemJEh/+DW1kADnKVmNNuu5UBFRz5Q+Jkb5GpBbX1dEcadbe4MAj5qXLuZQx crCo4HygPkZpcsO27hZTIfTNxt/A6/ClUQK82Xgs= Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Message-ID: Date: Tue, 29 Aug 2023 22:51:56 +0900 To: internals@lists.php.net X-Mailer: Apple Mail (2.3731.700.6) Subject: Deprecate PDO::ATTR_ERRMODE [Proposed RFC] From: saki@sakiot.com (Saki Takamachi) Hi, internals. I thought about various things to improve the current situation where = `PDO::ATTR_ERRMODE` is not working very smartly. Exceptions may be thrown regardless of the setting of = `PDO::ATTR_ERRMODE`. = https://www.php.net/manual/en/pdo.rollback.php#refsect1-pdo.rollback-error= s Another annoyance is that `PDO::ERRMODE_SILENT` sometimes gives a = warning. This is an undocumented phenomenon, and it's a 19-year-old vintage bug. = https://github.com/php/php-src/blob/223fb08819967b3063610289a5783944a85d6d= 65/ext/pdo/pdo_dbh.c#L74 Based on these, I feel that the reliability of the attribute value = PDO::ATTR_ERRMODE is low and there is not much meaning in its existence = as an attribute value. Since the default behavior became `PDO::ERRMODE_EXCEPTION` in PHP8.0.0, = I think it would be better to abolish it rather than leave it halfway. I think this is a big change, so I'm assuming 9.x+ even if it's = implemented. I will do the implementation myself. Please let me know what you think. Thank you. Saki=