Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:113012 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 90329 invoked from network); 28 Jan 2021 00:49:43 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 28 Jan 2021 00:49:43 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id A7A6C1804CF for ; Wed, 27 Jan 2021 16:31:33 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 27 Jan 2021 16:31:33 -0800 (PST) Received: by mail-ej1-f47.google.com with SMTP id bl23so5260158ejb.5 for ; Wed, 27 Jan 2021 16:31:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=SmUsFRsJvhg0A56KWXPOp0/72ZYZOCRipixS7aHwDtE=; b=bpBV8BC+CMIFSmR2SZJ/YOT1/0EIk68Bja42p/5aBoVREekJFIZvXl01NqIiSJjF7x LO+HX/wrawHSUFCiD0lRy1iVTRC5F1eMEh5gXj1IHWEEXIlsaS5sO0zFfV89vMaLZwui ljjqzH8iQ5tkh+R0I8ZSp3QRT4wCg5DEEWuJGQ5U522fc+KcHwedtWuG2qB1xM0BOxbT zs0xFgroHPp0WzHh+p2AwaeX31IdpRpg+NMSvrhLb7xxCIDWvopXuBNt0STI0akar4qD rMl5U1X0/ykBdnsitLm6INy980N5sMljTHf8gvoUN0qKJkdJ3gYKwhnuzhh+BBn3CBJQ qdZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=SmUsFRsJvhg0A56KWXPOp0/72ZYZOCRipixS7aHwDtE=; b=KZkeXMU7uiY5apUEJvR8ZfYHojF5gd5yZP6ksIpOpoH/cIRfJ5iLQgXxo8B2SD7HZv Ij+MdiEiTPr6Kr9Shf27W/p74lyP2VQfZvbGVWC1BUOE7A4c8m2C5jpHhFEoUZMm+znJ btH2ReeiwTaCa3doznjwq4T3ZAkJPWACJ3GnAaDtgacckS9oL9E2SqoCHk9DKp71DP5E 7mrTrdgy+n4iITumm+0Zk1q+5CxXrmiaw19vzIRmhtoUUjDu6mfc382KU8BVxdRuFuor 3vL7yvggZldzTbDhsb1RanUDWFIIMJgpHnPtOv6LL28W21x72qmZm6ZG0UJET5BXiH+7 RiEg== X-Gm-Message-State: AOAM532qtqMb0pb3qQKtAvsGtz2Hv/h98FMaVCgfg/27ZBCrhhYMgPlo NYcdFGPApdYEThHWzqgf0+SFMisrwHKcGp5Yi98= X-Google-Smtp-Source: ABdhPJyGWpZ0h7YHb/7r2blwL5wkuEL6y1T82KFHIcM+8Icmki0AZOR08jjOfQpVBUx2pybY/qlau9vr5aOaBY/Ef2E= X-Received: by 2002:a17:906:ae81:: with SMTP id md1mr8388036ejb.222.1611793889670; Wed, 27 Jan 2021 16:31:29 -0800 (PST) MIME-Version: 1.0 References: <0edafce4-c9a5-c483-65f1-72e49614135a@telia.com> <4D7D042F-39A5-4BEF-93B6-542FD53928A1@cschneid.com> <73C12DD2-D99E-44BA-B557-6043F3DDD4C7@cschneid.com> <30C0E1A8-6269-4221-AF21-3FA738D5910C@cschneid.com> <0eb16a55-92d0-7118-57fe-0f3f7d2bc351@telia.com> In-Reply-To: <0eb16a55-92d0-7118-57fe-0f3f7d2bc351@telia.com> Date: Thu, 28 Jan 2021 00:31:19 +0000 Message-ID: To: =?UTF-8?Q?Bj=C3=B6rn_Larsson?= Cc: Christian Schneider , Nikita Popov , PHP internals Content-Type: multipart/alternative; boundary="0000000000003eb92c05b9eb0251" Subject: Re: [PHP-DEV] [RFC]: Change Default mysqli Error Mode From: tekiela246@gmail.com (Kamil Tekiela) --0000000000003eb92c05b9eb0251 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable > > I'm missing a thing here when we talk about "your code". I mean on our > site we have third party libraries. They can typically have a release > schedule on a couple of releases each year. So all code is not up to > us to change. So how does this proposal adress that scenario when it's > not up to us to do the necessary changes? Is it e.g. a blocker to > upgrade to PHP 8.1 with exceptions vs warnings until the library is > updated? > > As a side note I'm at the moment migrating our test site to PHP 8 and > the two most prominent hickups are located in a third party library: > "Undefined array key" and "Attempt to read property "value" on null" > which are warnings. Not sure how it would have been with these as > exceptions, e.g. would the test site stop running and thereby stop > testing of other parts. > > And as I have said earlier, I do like exceptions! It's the migration > aspect I'm wondering about... > > r//Bj=C3=B6rn L > This is a valid concern. I have thought about it for a while and I think that we should handle this the same way we did with PDO error mode change. We don't do anything special. I really don't see a way that we could make a smoother upgrading experience. For users that avail of old libraries the onus is on them to check the library's compatibility with the new PHP version. Ideally, the change should have been made in PHP 8.0 where it would be more justifiable to change a default setting. The good thing about mysqli error reporting compared to PDO is that the setting is global. If the library you are using is abandoned or you can't wait for the library to be updated then you can set the error reporting level in your own code. The only problem comes when you want to mix both modes in the same code, but that is a huge code smell anyway. This means that this change is not a blocker for the upgrade. I think the proposal is good to be implemented in PHP 8.1 as it is now. But if anyone thinks otherwise or has any ideas on how to improve I would gladly take it into consideration. If there is any way that we could make the migration smoother then it would be great. Kamil --0000000000003eb92c05b9eb0251--