- Issue created by @znerol
- Merge request !4483Issue #3377256: Correctly implement SessionHandlerInterface β (Closed) created by znerol
- last update
over 1 year ago Custom Commands Failed - Status changed to Needs review
over 1 year ago 8:29pm 26 July 2023 - π¨πSwitzerland znerol
Transferring commit credits from #2536052-20: Remove try...catch from SessionHandler::write β and 21.
- last update
over 1 year ago 29,882 pass - π«π·France andypost
The only question - should we keep
ReturnTypeWillChange
attribute? - last update
over 1 year ago 29,884 pass - π¨πSwitzerland znerol
The only question - should we keep ReturnTypeWillChange attribute?
Good question. Let's try without.
- Status changed to RTBC
over 1 year ago 2:28pm 27 July 2023 - πΊπΈUnited States smustgrave
Typehint didn't seem to cause any issue
New service parameter has a trigger_error and CR.Could say this seems like a task but will leave as is.
LGTM
- Status changed to Needs review
over 1 year ago 6:57pm 27 July 2023 - π¬π§United Kingdom longwave UK
Hmm, not convinced the scoping of this issue is correct - this is fixing three different issues, but only for this class.
Not sure we can add the return types here? If someone has extended SessionHandler and swapped it in, and replaced one of those methods without adding a return type, there is a BC break, so we have do to this in a major version change I think.
Bulk conversion to constructor property promotion is being discussed in π Use PHP 8 constructor property promotion for existing code Needs work
Fixing REQUEST_TIME is done in children of π [meta][no patch] Replace uses of REQUEST_TIME and time() with time service Active
- last update
over 1 year ago Custom Commands Failed - π¨πSwitzerland znerol
Not sure we can add the return types here?
You are right. We cannot. Is there a way to add deprecations for methods defined in a subclass lacking the return type?
Adding type hints on the arguments is allowed as far as I can tell.
- π¨πSwitzerland znerol
Uh, ok. PHP tentative return types will likely cause serious trouble when they get enforced in PHP 9. Unless of course some PHP 8.x release will introduce more warnings for subclasses inheriting from types implementing built-in interfaces. -> https://3v4l.org/1fi6I
- Status changed to Needs work
over 1 year ago 3:38pm 7 August 2023 - First commit to issue fork.
- last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago 29,945 pass, 1 fail - last update
over 1 year ago 29,958 pass - Status changed to Needs review
over 1 year ago 9:22am 9 August 2023 - π¨πSwitzerland znerol
Looks like the last reroll did not go very well (it partially reverted π Remove try...catch from SessionHandler::write Fixed ). Did the reroll again and fixed the CC failure pointed out in #11.
- last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago Custom Commands Failed - Status changed to Needs work
over 1 year ago 12:38pm 9 August 2023 - π§π·Brazil elber Brazil
Hi @znerol wether we removed the typehints methods aren't compatible with SessionHandlerInterface
- last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago 29,958 pass - last update
over 1 year ago 29,958 pass - Status changed to Needs review
over 1 year ago 4:57pm 9 August 2023 - π¨πSwitzerland znerol
Hi @znerol if we removed the typehints methods they aren't compatible with SessionHandlerInterface
This is incorrect.
SessionHandlerInterface
is subject to the PHP tentative return types mechanism.Regrettably, as per #8 we cannot add return type hints in a minor release (at least not according to the current BC policy).
- π¨πSwitzerland znerol
Updated the issue summary. Regrettably I do not have the powers necessary to remove the CR.
- Status changed to Needs work
over 1 year ago 9:55pm 21 August 2023 - last update
over 1 year ago 30,056 pass - last update
over 1 year ago 30,056 pass - Status changed to Needs review
over 1 year ago 11:49am 22 August 2023 - Status changed to RTBC
over 1 year ago 4:01pm 22 August 2023 - last update
over 1 year ago 30,058 pass - last update
about 1 year ago 30,060 pass - last update
about 1 year ago 30,060 pass - last update
about 1 year ago 30,098 pass - last update
about 1 year ago 30,134 pass - last update
about 1 year ago 30,135 pass - last update
about 1 year ago 30,136 pass - last update
about 1 year ago 30,136 pass - Status changed to Fixed
about 1 year ago 9:24pm 7 September 2023 - π¬π§United Kingdom catch
I feel like we could probably check if contrib extends this class, and then go ahead and add return types in a minor release, based on the fact that non-base-classes are not considered @api (per https://www.drupal.org/about/core/policies/core-change-policies/bc-polic... β ).
However that can be a follow-up, since if someone actually is extending this, it would be better not to break them.
Committed/pushed to 11.x, thanks!
- π³πΏNew Zealand quietone
A search for SessionHanlder in contrib didn't find any case where it was extended.
Setting to NW for the followup asked for in #27.
- Status changed to Needs work
about 1 year ago 2:03am 11 September 2023 - last update
about 1 year ago 30,148 pass - @znerol opened merge request.
- Status changed to Needs review
about 1 year ago 5:31am 12 September 2023 - Status changed to RTBC
about 1 year ago 2:04pm 12 September 2023 - πΊπΈUnited States smustgrave
Opened https://www.drupal.org/project/drupal/issues/3386766 π Add return types to SessionHandler Active
Moving to RTBC as I don't know if MR 4751 should be closed.
- last update
about 1 year ago 30,150 pass - Status changed to Fixed
about 1 year ago 6:46am 14 September 2023 - π¬π§United Kingdom catch
Let's do the remaining work in the follow-up that's open, moving this back to fixed.
Automatically closed - issue fixed for 2 weeks with no activity.