Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:97019 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 49553 invoked from network); 19 Nov 2016 04:15:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Nov 2016 04:15:53 -0000 Authentication-Results: pb1.pair.com smtp.mail=yohgaki@ohgaki.net; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=yohgaki@ohgaki.net; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ohgaki.net designates 180.42.98.130 as permitted sender) X-PHP-List-Original-Sender: yohgaki@ohgaki.net X-Host-Fingerprint: 180.42.98.130 ns1.es-i.jp Received: from [180.42.98.130] ([180.42.98.130:40362] helo=es-i.jp) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C8/50-47264-7F1DF285 for ; Fri, 18 Nov 2016 23:15:52 -0500 Received: (qmail 16331 invoked by uid 89); 19 Nov 2016 04:15:47 -0000 Received: from unknown (HELO mail-qt0-f174.google.com) (yohgaki@ohgaki.net@209.85.216.174) by 0 with ESMTPA; 19 Nov 2016 04:15:47 -0000 Received: by mail-qt0-f174.google.com with SMTP id w33so169236776qtc.3 for ; Fri, 18 Nov 2016 20:15:47 -0800 (PST) X-Gm-Message-State: AKaTC004Y9Blo/9TO49RJ55uXdR93fXhsPNOgO3+xZWeDJXpHV+eKVRxynw2ZcL8RKy9atEN+BzFV16L5Ja/uQ== X-Received: by 10.28.57.193 with SMTP id g184mr1598805wma.122.1479528941603; Fri, 18 Nov 2016 20:15:41 -0800 (PST) MIME-Version: 1.0 Received: by 10.194.190.200 with HTTP; Fri, 18 Nov 2016 20:15:01 -0800 (PST) In-Reply-To: <507c801d-1442-c6c6-581c-16ced9d35a53@fischer.name> References: <507c801d-1442-c6c6-581c-16ced9d35a53@fischer.name> Date: Sat, 19 Nov 2016 13:15:01 +0900 X-Gmail-Original-Message-ID: Message-ID: To: Markus Fischer Cc: "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [RFC DISCUSSION] User defined session serializer From: yohgaki@ohgaki.net (Yasuo Ohgaki) Hi Markus, On Sat, Nov 19, 2016 at 9:02 AM, Markus Fischer wrote: > On 17.11.2016 11:55, Yasuo Ohgaki wrote: >> >> Session module implements serialize handler as module. >> This RFC is to expose it to user space. >> >> RFC >> https://wiki.php.net/rfc/user_defined_session_serializer >> >> PR >> https://github.com/php/php-src/pull/2205 >> >> Comments are appreciated! > > Well, I like it. It's sometimes necessary to share session state with > non-PHP application and this is IMHO a welcome addition to ease the > exchange. > > Btw, what is the proper way to signal a problem during > serialization/unserialization? I couldn't figure it out from the RFC nor > the PR and there doesn't seem to be a test case for it. > Return null/false? Throw an exception? It raises E_RECOVERABLE_ERROR currently. I choose it because session module raises errors. However, I prefer to use exception over error. I'll create a RFC to adopt exception for session. Thank you for feedback about tests, I'll add error case tests. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net