Re: Removing base class from session handler
| From: | Andrey Andreev | Date: | Sun, 25 Jan 2015 02:53:30 +0000 |
| Subject: | Re: Removing base class from session handler | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-81103@lists.php.net to get a copy of this message | ||
Hi,
On Sat, Jan 24, 2015 at 7:05 PM, Yasuo Ohgaki <yohgaki@ohgaki.net> wrote:
> Hi Andrey,
>
> On Sat, Jan 24, 2015 at 6:34 PM, Andrey Andreev <narf@devilix.net> wrote:
>>
>> > Let's keep SessionHandler class. However,
>> > PHP_FUNCTION(session_set_save_handler)
>> > should be cleaned up to verify implemented/extended interface/class.
>> > It's
>> > BC.
>> > Do you have opinion for this?
>>
>> php > session_set_save_handler(new stdclass);
>> PHP Warning: session_set_save_handler() expects parameter 1 to be
>> SessionHandlerInterface, object given in php shell code on line 1
>
>
> As I pasted code in this thread, current code does not check if supplied
> object
> has valid class/interface, but it checks methods implemented. SdtClass does
> not
> have them obviously, therefore it raises error.
>
> It's a legacy code when PHP didn't have proper OOP support. This is the code
> that I'm willing to remove/change.
If I understand correctly, you're suggesting the removal of the
old-style session_set_save_handler() calls where each function is
passed as a separate argument?
That could be a quite significant BC break.
Cheers,
Andrey.