Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:118522 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 38556 invoked from network); 26 Aug 2022 22:17:44 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 26 Aug 2022 22:17:44 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 1BCE4180084 for ; Fri, 26 Aug 2022 15:17:44 -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=-0.2 required=5.0 tests=BAYES_20,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,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-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 26 Aug 2022 15:17:43 -0700 (PDT) Received: by mail-wr1-f53.google.com with SMTP id e13so2392453wrm.1 for ; Fri, 26 Aug 2022 15:17:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:references :in-reply-to:user-agent:subject:to:from:date:from:to:cc; bh=XElLkM2Jd8DDZC6DOQmMXQxZe1iJwpPTeDqe2Hu1jSc=; b=BAWeP+U3YmKwhq+HxGtP6wQuUby40UaFgDTPY5Ay2CFAh0qLzPeebkQqMpnfMN2NFv OzJ6txXDkXi2MkI7XrbORtjE4EnfGEGWsNg6w6JJwMosWl4xc0Yd3gFvP7zkLTkr0JL6 kECqSlbo8ubBErczVAQf75VevI9qqUcK7zIgOKNc5WtB64HLfgNCzGI/JzncCpDjk011 kaDHSYbT7/ff2JmRtes/zC+BLXthK3c9PzDMJozj4oe7u1aibeLxcpeoYFGecTZCXRkG xyYBhJQt3cy9Gr5x/1zjsSTutViTIXhFSKbOKnuX4A/Hooy5K7SKR2eBrR6NgiEmE1S7 6Tig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:references :in-reply-to:user-agent:subject:to:from:date:x-gm-message-state:from :to:cc; bh=XElLkM2Jd8DDZC6DOQmMXQxZe1iJwpPTeDqe2Hu1jSc=; b=Arp/jEJQ4/pBLa68AJozahyKI5Rx7PppoHGNBG8+01JWJxPemySnU62bmej90QMjKZ +eINXfsedD/KVIaIjqMEbWVXAmisGXeygjOVytsJTzwshgJYpQiueiTcn/ejgwH9ccU/ +2xfGUsFKoY8gvQh4fFs3sULwl83xk8GRUQURFT6ZP+Uk7afBsPU3zVWm4GwKQ9YBZlJ S5xIl3jHh8qkYEQgKiKbQOTtAf3qcT04eakf5KClvUvMMLMqIL7sTc/QcyYrXMFDDwV4 zmDTGMz+L/3nQET3rA7aPidoB34r/Snq9MhI5IOrUfALF86sZfAgrj8hMhJIwlwZOwTq iDkQ== X-Gm-Message-State: ACgBeo2A1Api5AtqveNr19WLFMIk7xcpcetc1gQqTjYlrtseSaK6dRWd fHyZKO28IsrEdi2AflGiuu+S0Y8WEzA= X-Google-Smtp-Source: AA6agR6Etii1rjFffn9StIUGntPJwyDhQTl4zbNOXTK/1HHte2/QnZUU+TUpxtf4KOvT14E5kyNB4A== X-Received: by 2002:adf:e8cd:0:b0:226:cfa3:82ca with SMTP id k13-20020adfe8cd000000b00226cfa382camr810261wrn.525.1661552262289; Fri, 26 Aug 2022 15:17:42 -0700 (PDT) Received: from [127.0.0.1] (cpc104104-brig22-2-0-cust548.3-3.cable.virginm.net. [82.10.58.37]) by smtp.gmail.com with ESMTPSA id p20-20020a05600c359400b003a35516ccc3sm771327wmq.26.2022.08.26.15.17.41 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 26 Aug 2022 15:17:41 -0700 (PDT) Date: Fri, 26 Aug 2022 23:17:40 +0100 To: internals@lists.php.net User-Agent: K-9 Mail for Android In-Reply-To: <86a071f4-41ee-33e0-92cd-2a76d5b480d8@bastelstu.be> References: <302000df-5c3f-a86c-a608-2a45d2726ab1@bastelstu.be> <86a071f4-41ee-33e0-92cd-2a76d5b480d8@bastelstu.be> Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: =?US-ASCII?Q?Re=3A_=5BPHP-DEV=5D_What_type_of_Exceptio?= =?US-ASCII?Q?n_to_use_for_unserialize=28=29_failure=3F?= From: rowan.collins@gmail.com (Rowan Tommins) On 25 August 2022 16:06:48 BST, "Tim D=C3=BCsterhus" wrote: >- I've noticed that 'unserialize()' already emits E_WARNING for some type= s of error (e=2Eg=2E out-of-bounds integers), so users already need to be p= repared for E_WARNING to be emitted=2E I've adjusted the aforementioned Not= ice to Warning, but we might be able to directly jump to UnserializationFai= ledException from the existing warnings? IMHO, any change from Warning or lower to Exception or Error is a clear Br= eaking Change, because it can make a program that runs successfully under o= ne version abort mid-process in another=2E So, while it probably makes sense for all serialisation errors to consiste= ntly throw, that should be planned for 9=2E0, and everything that's not alr= eady an exception could raise a consistently formatted E_WARNING in 8=2E3= =2E Regards, --=20 Rowan Tommins [IMSoP]