Re: [RFC] [Discussion] Deprec ate functions with overloaded signatures
| From: | Rowan Tommins | Date: | Sun, 04 Jun 2023 13:14:57 +0000 |
| Subject: | Re: [RFC] [Discussion] Deprec ate functions with overloaded signatures | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-120521@lists.php.net to get a copy of this message | ||
On 17 May 2023 08:35:18 BST, "Máté Kocsis" <kocsismate90@gmail.com> wrote:
>Particularly, I have been wondering for a long time, why the original
>function includes "save_handler" in its name?
>The passed in handlers are not just "save", but also other kinds of
>handlers (e.g. "read"). So I'm considering to use
>something like "session_set_handlers()" or
>"session_set_handler_callbacks()". What do you think about these names?
I think that's a very good point, and I like the explicitness of
"session_set_handler_callbacks" - this isn't a name people are going to need to type
often, so there's not much reason to keep it short.
If we go down that route, perhaps we should come up with a corresponding name for the object based
version - "session_set_handler_object" perhaps? That would also mean the deprecation
messages can be much simpler: if you're using the old name, you need to do something.
(There's another minor fringe benefit: once the old name is removed, it becomes available for
users to polyfill if for some reason they're struggling to change code that calls it.)
I'm still in two minds on the general concept of this RFC, as it is placing a burden on users
for the mostly minor convenience of maintainers; but I think you've done a good job responding
to concerns and improving the proposal.
Regards,
Hi Máté,
Sorry I didn't get round to replying to this sooner, particularly this point:
--
Rowan Tommins
[IMSoP]