Re: Revert session_serializer_name(), session_gc()

From: Date: Tue, 11 Mar 2014 22:37:31 +0000
Subject: Re: Revert session_serializer_name(), session_gc()
References: 1  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
Hi Andrey,

On Tue, Mar 11, 2014 at 10:37 PM, Andrey Andreev <[email protected]> wrote:

> I just saw this in the 5.6-alpha1 changelog:
>
>    - Implemented Request #54649 (Create session_serializer_name()). (Yasuo)
>     ...
>    - Implemented Request #11100 (session_gc() function). (Yasuo)
>
>
> I didn't find an RFC and I don't know a way to search for a discussion
> on internals (Google doesn't find one).
>
> session_serializer_name(): https://bugs.php.net/bug.php?id=54649
>
> I don't think that this should've been implemented, especially with
> the reasoning from the feature request ... The same could be applied
> to all session ini options and especially now since session_start()
> accepts them, it's useless IMO.
>
> session_gc() was added in a similar fashion:
> https://bugs.php.net/bug.php?id=11100
>
> There's already a comment about how the same thing can be achieved by
> overloading SessionHandler::gc(), but a user could also just alter
> session.gc_divisor, session.gc_probability to ensure that the garbage
> collector is started.
>

Users want to have contorl *when* gc is performed rather than luck. This is
reasonable. IMO.


>  And while session_serializer_name() is just redundant, session_gc()
> could cause performance issues.
>

There is session_module_name(), why not session_serializer_name()?
Many 3rd party save handler implements many serializer.

session_gc() is nothing to do with performance. Users may abuse. The same
argument applies to gc probability.

 I'd strongly suggest that these 2 functions should be removed before
> PHP 5.6 is officially released.
>

These are simple additional APIs.
If your argument applies, there should be number of new RFCs.

Regards,

--
Yasuo Ohgaki
[email protected]


Thread (41 messages)

« previous php.internals (#73069) next »