Req #72285 [Asn->Csd]: SessionHandlerInterface Function Signatures

From: Date: Mon, 30 Aug 2021 16:46:38 +0000
Subject: Req #72285 [Asn->Csd]: SessionHandlerInterface Function Signatures
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-236186@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=72285&edit=1 ID: 72285 Updated by: cmb@php.net Reported by: hpdl at oscommerce dot com Summary: SessionHandlerInterface Function Signatures -Status: Assigned +Status: Closed Type: Feature/Change Request Package: Session related Operating System: * PHP Version: 7.0.7 -Assigned To: yohgaki +Assigned To: cmb Block user comment: N Private report: N New Comment: Anyhow, this is basically solved as of PHP 8.0.0[1], and further improved as of PHP 8.1.0[2]. [1] <https://3v4l.org/7rrtb> [2] <https://3v4l.org/7rrtb/rfc#vgit.master> Previous Comments: ------------------------------------------------------------------------ [2020-12-09 15:27:45] cmb@php.net > Then we can argument with covariance if someone leaves the > scalar types out (=> no BC break) and it still works when people > use the scalar types. For the record, this is basically done for PHP 8: scalar parameter types are specified relying on contravariance to not break BC. Scalar return types are not specified, again for BC reasons. ------------------------------------------------------------------------ [2016-05-30 11:05:07] bwoebi@php.net Perhaps we just could specify types on internal (non-final) classes and interfaces function parameters. Then we can argument with covariance if someone leaves the scalar types out (=> no BC break) and it still works when people use the scalar types. ------------------------------------------------------------------------ [2016-05-30 09:34:09] yohgaki@php.net Change Request would be the suitable bug type. ------------------------------------------------------------------------ [2016-05-30 09:31:42] yohgaki@php.net Object API in session is the main source of session module problems... ------------------------------------------------------------------------ [2016-05-30 05:29:02] krakjoe@php.net This is not a problem particular to this interface; Many such documentation pages are not in sync with the code. The problem is we can't change the code without breaking BC, so I think this is a documentation problem. I think we should make effort to inform people that prototypes in documentation don't always match code, and that it's code (reflection) that you need to look at if you are extending internal classes. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=72285 -- Edit this bug report at https://bugs.php.net/bug.php?id=72285&edit=1

« previous php.bugs (#236186) next »