Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:87453 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 93556 invoked from network); 31 Jul 2015 19:56:37 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 Jul 2015 19:56:37 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.44 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.220.44 mail-pa0-f44.google.com Received: from [209.85.220.44] ([209.85.220.44:35958] helo=mail-pa0-f44.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 93/B0-24609-5F2DBB55 for ; Fri, 31 Jul 2015 15:56:37 -0400 Received: by pachj5 with SMTP id hj5so45523196pac.3 for ; Fri, 31 Jul 2015 12:56:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=LosKaeZPfEGQdyeSkL0soeS5iTOprQO7lnzsqmJCHZs=; b=w/c7Pu3s2Tz7Vce+fwsisfkOqEMRtoNzf4SP8zLV6BsC9PgZgnlW6WYm0UcH/7Z0Yy o3Z/C/EjzY3ke+ESMId6UlBVkJI/WkfEBGLlVVaA0jx6u1uhJPC7EoHuw4AiqXIfXJWJ t4y6YunLCtTGZuiE3ALUdMYdxKe5/VWlGNSLJvjUZFW3wcEuBvvRYuV2sDOlF4BkW4SP JgxJ2EZX1Hlidr3BwUzgsBR6J+kl5ylGknDpyc/mi7JcDUm2oAKvZM+yvpbElZwkWHWb ggsp531OnRvEO688K0vHafaTZ7L0IQ+EByf2uWonhlZMphgplFWAxwon/1yfGwY2B6QP wiDg== X-Received: by 10.66.66.68 with SMTP id d4mr10361467pat.43.1438372593732; Fri, 31 Jul 2015 12:56:33 -0700 (PDT) Received: from Stas-Air.local (108-66-6-48.lightspeed.sntcca.sbcglobal.net. [108.66.6.48]) by smtp.gmail.com with ESMTPSA id ca13sm9193729pac.25.2015.07.31.12.56.32 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 Jul 2015 12:56:32 -0700 (PDT) To: Ferenc Kovacs References: <550FA2ED.6080000@gmail.com> <55B7B08E.7070700@gmail.com> Cc: Nikita Popov , PHP Internals X-Enigmail-Draft-Status: N1110 Message-ID: <55BBD2EE.2070008@gmail.com> Date: Fri, 31 Jul 2015 12:56:30 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: Serializing exceptions From: smalyshev@gmail.com (Stanislav Malyshev) Hi! > Personally I feel the restoring them impossible argument weak, consider > that we allow stuff like serializing resources without even a notice. Not sure what you mean by that. If you try to serialize resource, you just get an integer. Not ideal, as a remanant of the times in PHP where the approach was "if it doesn't make sense, do whatever and hope the user is ok with that", but certainly it's not "serializing resources". It's "ignoring resources when serializing and producing integers instead". Replacing Exceptions with integers probably won't work that well :) > Based on my own experiences where I had to fix multiple apps when we > introduced the unserializable Closure (mostly error logger and debugging > tools) which got passed as argument in the backtrace I would prefer if > we could remove that restriction. I don't see how we can really remove the underlying problem - Exceptions contain backtraces, which means serializing them tries to serialize a ton of stuff that may be not only not serializable but outright dangerous to carry around - such as keys, passwords, etc. Given how many problems we have had with serialization of complex objects lately, and given that I still see absolutely no practical use of actually serializing exceptions I would rather remove it and reduce the vulnerable surface than keep dealing with dozens of issues that continue to pop up from that. BTW what you mean by "unserializable Closure"? As far as I know you can not serialize Closure. -- Stas Malyshev smalyshev@gmail.com