Re: [PHP-DEV] [RFC][VOTE] User defined session serializer

2016-12-07 Thread Yasuo Ohgaki
On Thu, Dec 8, 2016 at 10:02 AM, Yasuo Ohgaki wrote: > Please note that users cannot write clean/efficient user defined > serializer without this RFC. It may be better to explain real working code. Since I added "php_serialize" to recent PHP, user defined serialization with current API became a

Re: [PHP-DEV] [RFC][VOTE] User defined session serializer

2016-12-07 Thread Yasuo Ohgaki
Hi Bob, Thank you for feedback! On Thu, Dec 8, 2016 at 7:44 AM, Bob Weinand wrote: > We can just directly read from $_SESSION (in write) and use session_encode() > (for returning on read()) as a workaround. > It isn't the cleanest way, but it works. > > I appreciate a cleaner way, but it really

Re: [PHP-DEV] [RFC][VOTE] User defined session serializer

2016-12-07 Thread Bob Weinand
> Am 07.12.2016 um 21:07 schrieb Yasuo Ohgaki : > > Hi Tony, > > On Wed, Dec 7, 2016 at 7:17 PM, Tony Marston > wrote: >> "Yasuo Ohgaki" wrote in message >> news:caga2bxyax05jbjavyxfsjyy6xia+4u14npfgywscl4aoofq...@mail.gmail.com... >>> >>> >>> Hi Marco, >>> >

Re: [PHP-DEV] [RFC][VOTE] User defined session serializer

2016-12-07 Thread Bob Weinand
> Am 07.12.2016 um 21:49 schrieb Yasuo Ohgaki : > > Hi voters, > > Following people are vote against this RFC for now. > > bwoebi (bwoebi) > danack (danack) > hywan (hywan) > leigh (leigh) > levim (levim) > nikic (nikic) > ocramius (ocramius) > peehaa (peehaa) > ryat (ryat) > > I suppose bwoeb

Re: [PHP-DEV] [RFC][VOTE] User defined session serializer

2016-12-07 Thread Yasuo Ohgaki
Hi voters, Following people are vote against this RFC for now. bwoebi (bwoebi) danack (danack) hywan (hywan) leigh (leigh) levim (levim) nikic (nikic) ocramius (ocramius) peehaa (peehaa) ryat (ryat) I suppose bwoebi and levim vote against due to error and exception usage. Thank you for feedback,

Re: [PHP-DEV] [RFC][VOTE] User defined session serializer

2016-12-07 Thread Yasuo Ohgaki
Hi all, On Thu, Dec 8, 2016 at 5:07 AM, Yasuo Ohgaki wrote: >> >> I do not see the point in this RFC. > > Did you read the RFC? > It enables to write serializer by PHP script, clean and simple. It > cannot be done by save handler. > > Besides, the reason why we don't have user defined serializer

Re: [PHP-DEV] [RFC][VOTE] User defined session serializer

2016-12-07 Thread Yasuo Ohgaki
Hi Tony, On Wed, Dec 7, 2016 at 7:17 PM, Tony Marston wrote: > "Yasuo Ohgaki" wrote in message > news:caga2bxyax05jbjavyxfsjyy6xia+4u14npfgywscl4aoofq...@mail.gmail.com... >> >> >> Hi Marco, >> >> Thank you for explaining the reason why! >> >> On Mon, Dec 5, 2016 at 11:12 AM, Marco Pivetta wrot

Re: [PHP-DEV] [RFC][VOTE] User defined session serializer

2016-12-07 Thread Tony Marston
"Yasuo Ohgaki" wrote in message news:caga2bxyax05jbjavyxfsjyy6xia+4u14npfgywscl4aoofq...@mail.gmail.com... Hi Marco, Thank you for explaining the reason why! On Mon, Dec 5, 2016 at 11:12 AM, Marco Pivetta wrote: I voted "no" because I don't see any advantage over using a custom session save

Re: [PHP-DEV] [RFC][VOTE] User defined session serializer

2016-12-06 Thread Yasuo Ohgaki
Hi Bob, On Tue, Dec 6, 2016 at 10:36 PM, Bob Weinand wrote: > Am 06.12.2016 um 08:06 schrieb Yasuo Ohgaki : > > Hi all, > > *snip* > > * Why it does not use exception for error? > > Session module uses "errors", not "exceptions" basically. Session save > handler uses "errors" also. We should avoi

Re: [PHP-DEV] [RFC][VOTE] User defined session serializer

2016-12-06 Thread Bob Weinand
Hey, > Am 06.12.2016 um 08:06 schrieb Yasuo Ohgaki : > > Hi all, > > *snip* > > * Why it does not use exception for error? > > Session module uses "errors", not "exceptions" basically. Session save > handler uses "errors" also. We should avoid inconsistency in a module. > Exception adoption wi

Re: [PHP-DEV] [RFC][VOTE] User defined session serializer

2016-12-05 Thread Yasuo Ohgaki
Hi Levi, On Tue, Dec 6, 2016 at 12:15 PM, Levi Morrison wrote: > On Mon, Dec 5, 2016 at 8:02 PM, Yasuo Ohgaki wrote: >> Hi Levi, >> >> On Tue, Dec 6, 2016 at 11:52 AM, Levi Morrison wrote: > These are not consistent with return type checking. This *must* reuse > the error checking that

Re: [PHP-DEV] [RFC][VOTE] User defined session serializer

2016-12-05 Thread Levi Morrison
On Mon, Dec 5, 2016 at 8:02 PM, Yasuo Ohgaki wrote: > Hi Levi, > > On Tue, Dec 6, 2016 at 11:52 AM, Levi Morrison wrote: These are not consistent with return type checking. This *must* reuse the error checking that is already in-place and not provide something new to accomplish the

Re: [PHP-DEV] [RFC][VOTE] User defined session serializer

2016-12-05 Thread Yasuo Ohgaki
Hi Levi, On Tue, Dec 6, 2016 at 11:52 AM, Levi Morrison wrote: >>> These are not consistent with return type checking. This *must* reuse >>> the error checking that is already in-place and not provide something >>> new to accomplish the same thing. >> >> What do you mean by inconsistent? > > We d

Re: [PHP-DEV] [RFC][VOTE] User defined session serializer

2016-12-05 Thread Levi Morrison
>> These are not consistent with return type checking. This *must* reuse >> the error checking that is already in-place and not provide something >> new to accomplish the same thing. > > What do you mean by inconsistent? We do not use E_RECOVERABLE_ERROR for return type mismatches; we use TypeErro

Re: [PHP-DEV] [RFC][VOTE] User defined session serializer

2016-12-05 Thread Yasuo Ohgaki
Hi Marco, On Mon, Dec 5, 2016 at 10:52 PM, Marco Pivetta wrote: > On Mon, Dec 5, 2016 at 4:31 AM, Yasuo Ohgaki wrote: >> Firstly, current OO custom save handler design (use of previously used >> internal save handler as its base class) is not good. Overriding >> open()/close()/etc are useless, m

Re: [PHP-DEV] [RFC][VOTE] User defined session serializer

2016-12-05 Thread Yasuo Ohgaki
Hi Levi, On Tue, Dec 6, 2016 at 7:50 AM, Levi Morrison wrote: > I apologize for the late review of your RFC. This RFC has a few issues > which I think need to be fixed (yes, this means I am asking you to > pull it out of voting phase). > > It does not specify how to indicate an encoding or decodi

Re: [PHP-DEV] [RFC][VOTE] User defined session serializer

2016-12-05 Thread Levi Morrison
On Sun, Dec 4, 2016 at 6:44 PM, Yasuo Ohgaki wrote: > Hi all, > > This RFC exposes session serializer interface to user space. It works > like user defined session save handler. > > Users are able to encrypt/validate session data transparently. e.g. > You can save encrypted session data to databas

Re: [PHP-DEV] [RFC][VOTE] User defined session serializer

2016-12-05 Thread Marco Pivetta
On Mon, Dec 5, 2016 at 4:31 AM, Yasuo Ohgaki wrote: > Hi Marco, > > Thank you for explaining the reason why! > > On Mon, Dec 5, 2016 at 11:12 AM, Marco Pivetta wrote: > > I voted "no" because I don't see any advantage over using a custom > session > > save handler, besides adding more API that p

Re: [PHP-DEV] [RFC][VOTE] User defined session serializer

2016-12-04 Thread Markus Fischer
Hi, On 05.12.16 02:44, Yasuo Ohgaki wrote: > This RFC exposes session serializer interface to user space. It works > like user defined session save handler. > > Users are able to encrypt/validate session data transparently. e.g. > You can save encrypted session data to database, decrypt encrypted

Re: [PHP-DEV] [RFC][VOTE] User defined session serializer

2016-12-04 Thread Yasuo Ohgaki
On Mon, Dec 5, 2016 at 12:31 PM, Yasuo Ohgaki wrote: > The RFC allows to save session data in whatever format. e.g. > XML/JSON/BSON/etc. This is _impossible_ by save handler submodule. I've never tried, but it would be possible technically. The code wouldn't be clean code, though. With this RFC,

Re: [PHP-DEV] [RFC][VOTE] User defined session serializer

2016-12-04 Thread Yasuo Ohgaki
Hi Marco, Thank you for explaining the reason why! On Mon, Dec 5, 2016 at 11:12 AM, Marco Pivetta wrote: > I voted "no" because I don't see any advantage over using a custom session > save handler, besides adding more API that partially covers custom session > save handlers. You mean current OO

Re: [PHP-DEV] [RFC][VOTE] User defined session serializer

2016-12-04 Thread Marco Pivetta
Hi Yasuo, I voted "no" because I don't see any advantage over using a custom session save handler, besides adding more API that partially covers custom session save handlers. This is just confusing, in my opinion, and the API can be replicated in userland with a custom session save handler decorat

[PHP-DEV] [RFC][VOTE] User defined session serializer

2016-12-04 Thread Yasuo Ohgaki
Hi all, This RFC exposes session serializer interface to user space. It works like user defined session save handler. Users are able to encrypt/validate session data transparently. e.g. You can save encrypted session data to database, decrypt encrypted data from database transparently. https://w