- Issue created by @smustgrave
- π¬π§United Kingdom catch
https://git.drupalcode.org/project/drupal/-/merge_requests/4751 should be transferred over here.
- Merge request !4785Issue #3386766: Add return types to SessionHandler β (Closed) created by znerol
- Open on Drupal.org βEnvironment: PHP 8.2 & MySQL 8last update
over 1 year ago Not currently mergeable. - First commit to issue fork.
- Status changed to Needs review
over 1 year ago 12:36pm 14 September 2023 - last update
over 1 year ago Build Successful - Status changed to Needs work
over 1 year ago 3:08pm 14 September 2023 - Status changed to Needs review
over 1 year ago 3:24pm 14 September 2023 - πΊπΈUnited States smustgrave
Actually seeing this on other tickets. Wonder if head broke.
- First commit to issue fork.
- last update
over 1 year ago 30,154 pass - Status changed to RTBC
over 1 year ago 3:40pm 15 September 2023 - last update
over 1 year ago 30,161 pass - last update
over 1 year ago 30,164 pass - last update
over 1 year ago 30,144 pass, 2 fail - last update
over 1 year ago 30,205 pass - last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago 30,363 pass - last update
over 1 year ago 30,361 pass - last update
about 1 year ago 30,360 pass 56:18 53:18 Running- last update
about 1 year ago 30,379 pass - last update
about 1 year ago 30,377 pass - last update
about 1 year ago 30,382 pass - last update
about 1 year ago 30,392 pass - last update
about 1 year ago 30,397 pass - last update
about 1 year ago 30,397 pass - last update
about 1 year ago 30,414 pass - last update
about 1 year ago 30,417 pass - last update
about 1 year ago 30,426 pass - last update
about 1 year ago 30,427 pass - last update
about 1 year ago 30,437 pass - last update
about 1 year ago 30,442 pass - last update
about 1 year ago 30,464 pass - last update
about 1 year ago 30,480 pass - last update
about 1 year ago 30,485 pass - last update
about 1 year ago 30,486 pass - last update
about 1 year ago 30,488 pass - last update
about 1 year ago 30,511 pass - πΊπΈUnited States xjm
Hmm, this seems too disruptive for a minor to me, at least without additional process or tooling. We'd want to provide best-effort BC for typehint changes, or at least a tool to automatically fix all typehint changes, and I think if nothing else it should target 11.0.x with a single rector rule for all added typehints or something (if we can't come up with a BC way to document the typehint additions in a D10 minor, which I think we also could do somehow-or-other). We've never broken BC even for an internal API like this before.
It'd also need at least a CR if not a release note -- possibly one single CR or something that documents all the typehint additions in a given major-or-minor, and a single simple release note about typehint additions linking that CR. Or something.
Also, there are whole sprawling policy issues about how to go about adding typehints to existing code; this issue should have one of them as a parent, or at least related issues.
Tagging for RM review while I check with @catch about this.
- π¨πSwitzerland znerol
Updated the issue summary with information from the original issue π Correctly implement SessionHandlerInterface Fixed and also linked the CR from over there.
- πΊπΈUnited States xjm
Thanks @znerol. The stuff we need a CR for is not the original API, but the typehint specifically. It is not related to the API itself; I am talking about a generic CR for added return typehints. So retagging.
- last update
about 1 year ago 30,515 pass, 1 fail - last update
about 1 year ago 30,520 pass - last update
about 1 year ago 30,551 pass - π¬π§United Kingdom catch
We did π Make DebugClassLoader ignored deprecations more accurate Fixed recently, this means that during tests, Symfony's debug classloader will issue deprecations for any parent method that has a documented type hint that it might add a return type hint in the future. So contrib will get notified when it's extending core classes that have documented type hints but haven't added them yet. I would prefer it if this was configurable via an attribute on methods or similar, but it's not, they just issue the deprecation for any random method on the basis that child classes can add type hints and it won't do any harm.
However, with this issue specifically, the parent interface, which is PHP's own interface, already has the return typehints, and you already get deprecation notices from PHP itself, if you implement those methods without a [#ReturnTypeWillChange] attribute (which is what's being removed here). So PHP is already doing the deprecation for us in this case.
https://www.php.net/manual/en/class.sessionhandlerinterface.php
- Status changed to Needs work
about 1 year ago 3:28pm 15 November 2023 - πΊπΈUnited States xjm
Thanks @catch; that's compelling. I think maybe we can do the following:
- Create a second CR about typehint changes in 10.2, and include this and any other issues.
- Add a release note about typehint changes generally linking that first CR.
- Update the CR to make it a little more clear about the typehint change and the consequences/mitigations.
Then we can use a similar pattern for the rest that we implement in D11.
- Status changed to Needs review
12 months ago 2:33pm 6 January 2024 - π¨πSwitzerland znerol
Issue now targets 10.3, added a dedicated change record now.
- Status changed to RTBC
12 months ago 3:07pm 6 January 2024 - last update
12 months ago 25,989 pass, 1,839 fail - Status changed to Fixed
12 months ago 10:16am 8 January 2024 - π¬π§United Kingdom catch
Committed/pushed to 11.x (which will become 10.3.x too), thanks!
Automatically closed - issue fixed for 2 weeks with no activity.