Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:87313 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 59949 invoked from network); 27 Jul 2015 07:09:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Jul 2015 07:09:15 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.169 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.213.169 mail-ig0-f169.google.com Received: from [209.85.213.169] ([209.85.213.169:33141] helo=mail-ig0-f169.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 93/E6-06606-A19D5B55 for ; Mon, 27 Jul 2015 03:09:14 -0400 Received: by igbpg9 with SMTP id pg9so80124944igb.0 for ; Mon, 27 Jul 2015 00:09:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=EEPoVT4ykMy1n8yrLx0cy/ILYF+C2DWiFyldX/WOLVo=; b=De3AXhkK9MIa2fcKygxMnYfAXBMf4AA450uMX+FGSKovT2QnMw7UATbsyPAEgCnujJ pJitEcD+2GdVZEbBAv6TuSk/oDV2xoIhvUGD+rHFd4jpBOK9wRsQ3bzk67Vf0Ex89c6Y 16llGro6pk8081tCwr1Ztm1Z1VD1NvXcl1L73JYFF5Ud4V4G0Ry0wA50J7FERj2rld5N BPX1mURW/uPqH4z3U+ThhQ7M/jaxkBnGpSmSWMi7PlFOd8SOBOmvo1C+N4wJ/QdjsNzJ mgBS23Mdy674pdZO9eLygrLuoS2aiRhHI9EriLkuzuASwYgQYguWSV7Sg773iQbcJd9P elXQ== X-Received: by 10.50.138.76 with SMTP id qo12mr15477918igb.38.1437980951044; Mon, 27 Jul 2015 00:09:11 -0700 (PDT) MIME-Version: 1.0 Received: by 10.36.38.136 with HTTP; Mon, 27 Jul 2015 00:08:51 -0700 (PDT) In-Reply-To: <550FA2ED.6080000@gmail.com> References: <550FA2ED.6080000@gmail.com> Date: Mon, 27 Jul 2015 00:08:51 -0700 Message-ID: To: PHP Internals Content-Type: multipart/alternative; boundary=001a1134b964c7ea21051bd607d3 Subject: Re: Serializing exceptions From: smalyshev@gmail.com (Stas Malyshev) --001a1134b964c7ea21051bd607d3 Content-Type: text/plain; charset=UTF-8 Hi! Looking into some issue, I've discovered that, to my surprise, > Exceptions are serializable. Except that it doesn't always work of > course (e.g. see http://stackoverflow.com/q/9747813/214196) because > exceptions contain backtraces, and those can contain non-serializable > objects. So in reality, you never know if you can serialize it or not. > > So, I wonder - would it be ok to make exceptions not serializable at > all? I think that would prevent major WTF factor when people try it and > it randomly fails. > Since discussion on this did not lead to a definite conclusion, but I did not hear from anybody that they need serialized exceptions, and we keep getting bug reports about exception serialization and various issues triggered by it, I propose this change: https://github.com/php/php-src/pull/1442 Since it is kind of BC break (even though I assume it breaks something that needed not to be allowed in the first place) I'd like to merge it in 7.0.0. Please object if you think this should not be done and explain why. Otherwise I intend to merge it after a suitable wait and after adding necessary tests/docs. Thanks, -- Stas Malyshev smalyshev@gmail.com --001a1134b964c7ea21051bd607d3--