Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:120990 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 12772 invoked from network); 6 Sep 2023 12:22:21 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 6 Sep 2023 12:22:21 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id B8873180341 for ; Wed, 6 Sep 2023 05:22:20 -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,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-pf1-f174.google.com (mail-pf1-f174.google.com [209.85.210.174]) (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 ; Wed, 6 Sep 2023 05:22:20 -0700 (PDT) Received: by mail-pf1-f174.google.com with SMTP id d2e1a72fcca58-68c0d262933so2389321b3a.0 for ; Wed, 06 Sep 2023 05:22:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694002939; x=1694607739; darn=lists.php.net; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=2Ta4JTchPcpagNjFb7KcegsKtI1Tg2bIwT/NxZE/UO4=; b=J2AjO97DjauQTvGUudmXu6P1LNI8a3/rM+Uvztz/5PgWbZfQiaLsuSMqUvn+qdrH4J /fTXmYVOKQ/hO7CNu6JZtggr/8kVn2uEMpPBnc7oIpqEN9z22AwRZcUliqgYZAWTaEzK v09zquG2YZNryxXIt2Qv6kVQRFshdD0u8RVnVA1rDEj+7R3m6bkxDJ16HYzLn6DRRVmw dqbFGw3znRvB1l1RjZ2CQhZtcWs7Yf0kCXttHF1i60Ab44QigOcejaF+q+IE/shM3Q2x WUsNvKApGDyEtGkbqfz/iLscSTcPgU8fnh5YxwKC7QuOLszyr9I1Qx0CFrKN3SPrcyDJ UnZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694002939; x=1694607739; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=2Ta4JTchPcpagNjFb7KcegsKtI1Tg2bIwT/NxZE/UO4=; b=AqCSM6KsKPMql/6T8lAwbD87ENE1NlpH9IvE7Q6P829uYrHP2n2r7Ubb75yGY1lh26 EfPozH0TX0/8xGKHEYhH12Toxbt6Iu7q0cz4v1DdudcVj0q3zL0lOu2ifco0M/ORtP2s F2dOnOswbO1GW+IzIvT5dR4OFSN4AZqJeKxiW2JPAVNATiB7AYzVWx+B94TDpuWKvnj8 RQ9vLdA+yYNUZxB7wzPHM+dIHzNwh5F7Hs6IAAUgntz8j+OlX374hfEQi23zkvpIlUEq t91s1lB14kGQilKV5shdw1woxzANgHWNg20WSEMg5ChIeq3AtfssIAUVRObpTaHiu6t+ Hy2w== X-Gm-Message-State: AOJu0YyPG9FsGwU+Ot55vE5rCiWwDOBAXmvbs0J6AynDnxJ5puhOF6RF p+ktZpjTRm3O6EtVKhPp+kIAf+BZ2zx5vuzjOjOwyTkl8pRKoQ== X-Google-Smtp-Source: AGHT+IGdiWF1v+Am9tTjTqeY3LvmBSA4J6ykOybkhM3k4mo99ybn/gOeFX5LKMYIcHj/WGM/JGHfA2b1pQD1uzLi9R4= X-Received: by 2002:a05:6a00:1ca0:b0:68e:36b1:3d7f with SMTP id y32-20020a056a001ca000b0068e36b13d7fmr511269pfw.18.1694002938915; Wed, 06 Sep 2023 05:22:18 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Wed, 6 Sep 2023 13:22:07 +0100 Message-ID: To: Saki Takamachi Cc: internals@lists.php.net Content-Type: multipart/alternative; boundary="0000000000006c2f690604afcb5a" Subject: Re: [PHP-DEV] Deprecate PDO::ATTR_ERRMODE [Proposed RFC] From: george.banyard@gmail.com ("G. P. B.") --0000000000006c2f690604afcb5a Content-Type: text/plain; charset="UTF-8" On Tue, 29 Aug 2023 at 14:52, Saki Takamachi wrote: > 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-errors > > 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/223fb08819967b3063610289a5783944a85d6d65/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 > I don't know about removing the silent mode altogether, but I think the warning version is pretty useless. However, if we are going to remove it, it would be nice to have this done consistently across all bundled extensions. From the top of my head, I know SQLite3 and the Intl extension also have such flags, and possibly the DOM extension too. Best regards. George P. Banyard --0000000000006c2f690604afcb5a--