Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:118815 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 51935 invoked from network); 14 Oct 2022 22:01:07 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 14 Oct 2022 22:01:07 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 39ECD1804A7 for ; Fri, 14 Oct 2022 15:01:03 -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: AS24940 176.9.0.0/16 X-Spam-Virus: No X-Envelope-From: Received: from chrono.xqk7.com (chrono.xqk7.com [176.9.45.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 14 Oct 2022 15:01:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1665784860; bh=n0FbzKuoUC+TBhnw4ziLn+h+lx+z9hAPffKg2mzKvNU=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=e4xgXlrkPSPpvgYUBeT+US/n44SU5TThjIHJIMuIN/4pOsYv1y+A2TF1pGOqRnfu7 SkkRROTr2/zV4BPOoQXCDwRqHqWeOYfVPwJWbK1ZS7FLPEgAdnZ+p2wsU/bBwQeWaK 8weJEZem/BwW+34Fym0mQnIEUY6ZKLP0OIMuvrprmji7lyWNqJk+jWa0uAhOFS9ew2 3SXarE5Gx2idY/2oiB61w3aNHUyEnbwGxK2+xj/ovynbttK7pLR045s/4Zp5C62loY LNUwCaBWfxDXw6wo5gCbApG8YwQNDo/KP27kZRL/5Wuz1AVspwaLM9F9BTfNPVS9XO DQ5y7bMCw0b/g== Content-Type: multipart/mixed; boundary="------------1iZAER0fgd9dDHI1rRU0awpD" Message-ID: Date: Sat, 15 Oct 2022 00:00:58 +0200 MIME-Version: 1.0 Content-Language: en-US To: Nicolas Grekas Cc: PHP internals References: <22177032-fe72-c39b-63fe-fa4368a70852@bastelstu.be> In-Reply-To: Subject: Re: [PHP-DEV] [VOTE] Improve unserialize() error handling From: tim@bastelstu.be (=?UTF-8?Q?Tim_D=c3=bcsterhus?=) --------------1iZAER0fgd9dDHI1rRU0awpD Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hi On 10/14/22 22:42, Nicolas Grekas wrote: > Not sure why I didn't think about it before but I just ran the test suite > of Symfony after applying the patch proposed in the RFC to change the way > exceptions are handled by unserialize. > > This change breaks the test suite of 5 separate components. I created this > gist to list all the failures: > https://gist.github.com/nicolas-grekas/3da652a51669baa40c99bd20e4a1b4dd > > Maybe I wasn't convincing enough during the discussion period, but that > doesn't change the fact that the proposed behavior in the RFC is a very > clear BC break that will affect userland significantly. > > I'm therefore voting NO on the proposal. > I'm not surprised by the “no” on the first vote based on the previous discussion. I am surprised however that you also disagree with raising the E_NOTICE to E_WARNING for consistency. I don't plan on repeating all the previous discussion points with you, but as you mention the Symfony tests specifically: Please find the patch attached. Do you believe the expectations in this new test would a reasonable expectation by a Symfony user? Best regards Tim Düsterhus --------------1iZAER0fgd9dDHI1rRU0awpD Content-Type: text/x-patch; charset=UTF-8; name="PhpSerializerTest.diff" Content-Disposition: attachment; filename="PhpSerializerTest.diff" Content-Transfer-Encoding: base64 ZGlmZiAtLWdpdCBpL3NyYy9TeW1mb255L0NvbXBvbmVudC9NZXNzZW5nZXIvVGVzdHMvVHJh bnNwb3J0L1NlcmlhbGl6YXRpb24vUGhwU2VyaWFsaXplclRlc3QucGhwIHcvc3JjL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