Re: [PHP-DEV] Re: Serializing exceptions

2015-08-02 Thread Rowan Collins
On 01/08/2015 01:06, Rowan Collins wrote: On 1 August 2015 00:36:58 BST, Stanislav Malyshev wrote: DEBUG_BACKTRACE_IGNORE_ARGS in a debug_backtrace() call. IIRC the object of called methods is already excluded (equivalent to masking out DEBUG_PROVIDE_OBJECT) so what's left is all strings. I'm

Re: [PHP-DEV] Re: Serializing exceptions

2015-07-31 Thread Stephen Coakley
Hi! week or two and I serialize exceptions (excluding stack trace arguments) to send them back to the calling process to aid in debugging process failures. But then you don't need to serialize Exception. You need to send the text representation of Exception, for humans to look at, not the live

Re: [PHP-DEV] Re: Serializing exceptions

2015-07-31 Thread Rowan Collins
On 1 August 2015 00:36:58 BST, Stanislav Malyshev wrote: >Hi! > >> As I have pointed out several times, it is only the 'args' section of >> the backtrace that ever contains unserializable items. The solution > >previous could too. In fact, right now, since you can unserialize >exceptions, previous

Re: [PHP-DEV] Re: Serializing exceptions

2015-07-31 Thread Ferenc Kovacs
On Sat, Aug 1, 2015 at 1:10 AM, Stanislav Malyshev wrote: > Hi! > > > this is where my point about we allow serializing resources just fine > > was aimed at. > > It's not "just fine". It's "it was there before we got smarter so now we > can't change it without breaking too many things". But I thi

Re: [PHP-DEV] Re: Serializing exceptions

2015-07-31 Thread Stanislav Malyshev
Hi! > As I have pointed out several times, it is only the 'args' section of > the backtrace that ever contains unserializable items. The solution previous could too. In fact, right now, since you can unserialize exceptions, previous can contain literally anything and so can any other members. Als

Re: [PHP-DEV] Re: Serializing exceptions

2015-07-31 Thread Stanislav Malyshev
Hi! > this is where my point about we allow serializing resources just fine > was aimed at. It's not "just fine". It's "it was there before we got smarter so now we can't change it without breaking too many things". But I think we did get smarter and no longer see silently putting whatever string

Re: [PHP-DEV] Re: Serializing exceptions

2015-07-31 Thread Stanislav Malyshev
Hi! > week or two and I serialize exceptions (excluding stack trace arguments) > to send them back to the calling process to aid in debugging process > failures. But then you don't need to serialize Exception. You need to send the text representation of Exception, for humans to look at, not the l

Re: [PHP-DEV] Re: Serializing exceptions

2015-07-31 Thread Rowan Collins
On 31 July 2015 20:56:30 BST, Stanislav Malyshev wrote: >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

Re: [PHP-DEV] Re: Serializing exceptions

2015-07-31 Thread Ferenc Kovacs
On Fri, Jul 31, 2015 at 9:56 PM, Stanislav Malyshev wrote: > 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

RE: [PHP-DEV] Re: Serializing exceptions

2015-07-31 Thread Anatol Belski
Hi Stas, > -Original Message- > From: Stanislav Malyshev [mailto:smalys...@gmail.com] > Sent: Tuesday, July 28, 2015 10:51 PM > To: Marco Pivetta ; Rowan Collins > > Cc: Nikita Popov ; PHP Internals List > > Subject: Re: [PHP-DEV] Re: Serializing exceptions >

[PHP-DEV] Re: Serializing exceptions

2015-07-31 Thread Stephen Coakley
On 07/27/2015 02:08 AM, Stas Malyshev wrote: 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 con

Re: [PHP-DEV] Re: Serializing exceptions

2015-07-31 Thread Stephen Coakley
On 07/28/2015 03:46 PM, Stanislav Malyshev wrote: Hi! This sort of change would be a major BC break for 8.x or similar. How is it a major BC break? You make it sound like serializing exceptions is something no application can do without. I have yet to see a single case where it's useful (yes,

Re: [PHP-DEV] Re: Serializing exceptions

2015-07-31 Thread 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 a

Re: [PHP-DEV] Re: Serializing exceptions

2015-07-31 Thread Ferenc Kovacs
On Tue, Jul 28, 2015 at 6:40 PM, Stanislav Malyshev wrote: > Hi! > > > -1 on this. If there is no technical problem with serializing the > > Exception class itself, it should be possible to serialize it. It can > > always happen that an object contains some not-serializable member, this > > is no

Re: [PHP-DEV] Re: Serializing exceptions

2015-07-28 Thread Stanislav Malyshev
Hi! > New BC breaks in Beta? Why not? What's the problem with it? Beta is to identify issues with current code, serialized exceptions is an issue (as in, they don't work and lead to security problems and generally pointless). Dragging this known problem around for years makes no sense. -- Stas

Re: [PHP-DEV] Re: Serializing exceptions

2015-07-28 Thread Marco Pivetta
New BC breaks in Beta? Meh. On Jul 28, 2015 22:44, "Rowan Collins" wrote: > On 28 July 2015 21:34:06 BST, Marco Pivetta wrote: > >This sort of change would be a major BC break for 8.x or similar. > > I think that was the point of trying to squeeze it into 7.0 > >

Re: [PHP-DEV] Re: Serializing exceptions

2015-07-28 Thread Stanislav Malyshev
Hi! > This sort of change would be a major BC break for 8.x or similar. How is it a major BC break? You make it sound like serializing exceptions is something no application can do without. I have yet to see a single case where it's useful (yes, I've read the Symphony comment but I'm not sure wh

Re: [PHP-DEV] Re: Serializing exceptions

2015-07-28 Thread Rowan Collins
On 28 July 2015 21:34:06 BST, Marco Pivetta wrote: >This sort of change would be a major BC break for 8.x or similar. I think that was the point of trying to squeeze it into 7.0 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Re: Serializing exceptions

2015-07-28 Thread Marco Pivetta
This sort of change would be a major BC break for 8.x or similar. I also don't see security implications, tbh. On Jul 28, 2015 18:41, "Stanislav Malyshev" wrote: > Hi! > > > -1 on this. If there is no technical problem with serializing the > > Exception class itself, it should be possible to seri

Re: [PHP-DEV] Re: Serializing exceptions

2015-07-28 Thread Stanislav Malyshev
Hi! > -1 on this. If there is no technical problem with serializing the > Exception class itself, it should be possible to serialize it. It can > always happen that an object contains some not-serializable member, this > is nothing specific to exceptions. I don't see the point of this change. The

Re: [PHP-DEV] Re: Serializing exceptions

2015-07-28 Thread Rowan Collins
Nikita Popov wrote on 28/07/2015 14:07: -1 on this. If there is no technical problem with serializing the Exception class itself, it should be possible to serialize it. It can always happen that an object contains some not-serializable member, this is nothing specific to exceptions. I don't see t

Re: [PHP-DEV] Re: Serializing exceptions

2015-07-28 Thread Nikita Popov
On Mon, Jul 27, 2015 at 9:08 AM, Stas Malyshev wrote: > 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 back

Re: [PHP-DEV] Re: Serializing exceptions

2015-07-27 Thread Rowan Collins
Stas Malyshev wrote on 27/07/2015 08:08: 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: h

[PHP-DEV] Re: Serializing exceptions

2015-07-27 Thread Stas Malyshev
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 rea