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 smalys...@gmail.com 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

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

Re: [PHP-DEV] Re: Serializing exceptions

2015-07-31 Thread Rowan Collins
On 1 August 2015 00:36:58 BST, Stanislav Malyshev smalys...@gmail.com 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

Re: [PHP-DEV] Re: Serializing exceptions

2015-07-31 Thread Ferenc Kovacs
On Tue, Jul 28, 2015 at 6:40 PM, Stanislav Malyshev smalys...@gmail.com 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,

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

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

RE: [PHP-DEV] Re: Serializing exceptions

2015-07-31 Thread Anatol Belski
Subject: Re: [PHP-DEV] Re: Serializing exceptions 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

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

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 in

Re: [PHP-DEV] Re: Serializing exceptions

2015-07-31 Thread Ferenc Kovacs
On Sat, Aug 1, 2015 at 1:10 AM, Stanislav Malyshev smalys...@gmail.com 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.

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.

Re: [PHP-DEV] Re: Serializing exceptions

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

Re: [PHP-DEV] Re: Serializing exceptions

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

Re: [PHP-DEV] Re: Serializing exceptions

2015-07-28 Thread Nikita Popov
On Mon, Jul 27, 2015 at 9:08 AM, Stas Malyshev smalys...@gmail.com 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

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

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
On 28 July 2015 21:34:06 BST, Marco Pivetta ocram...@gmail.com 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:

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 rowan.coll...@gmail.com wrote: On 28 July 2015 21:34:06 BST, Marco Pivetta ocram...@gmail.com 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

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
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 smalys...@gmail.com wrote: Hi! -1 on this. If there is no technical problem with serializing the Exception class itself, it should be

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: