- last update
over 1 year ago 29,882 pass - π¨πSwitzerland znerol
Rerolling #1 for 11.x. #6 and #10 are identical. Changes introduced in #20 and #21 are not desirable. We do not want to eat the exception if the database write failed. Instead the request should crash hard.
This is inline with session handlers in other projects. E.g., the PdoSessionHandler in symfony explicitly rethrows any exception encountered during db writes.
- π¨πSwitzerland znerol
Opened π Correctly implement SessionHandlerInterface Fixed for other changes (e.g., the
REQUEST_TIME
deprecation and changed method signatures). Also added credits for @jungle over there. - Status changed to Needs work
over 1 year ago 2:25pm 27 July 2023 - πΊπΈUnited States smustgrave
Was previously tagged for a test which still needs to happen I believe.
Will add related issue to my review list.
- Status changed to Needs review
over 1 year ago 2:42pm 27 July 2023 - π¨πSwitzerland znerol
Re testing: This class gets installed into the PHP runtime via session_set_save_handler(). Given that fact, I'd argue that the only way to meaningfully cover this is using an end-to-end test.
Good news is that we have functional tests in place for session manager and co. in:
Drupal\Tests\system\Functional\Session\SessionTest.php
. No need to add special coverage for the refactoring here IMHO. - π¨πSwitzerland znerol
Ok, took me some time to come up this idea for a test:
SessionTestController::triggerWriteException
replaces thesessions
table with an incomplete one in order to trigger an exception duringSessionHandler::write()
. So we can look for that from withinSessionTest::testSessionWriteError()
. - Merge request !4500Issue #2536052: Remove try...catch from SessionHandler::write β (Closed) created by znerol
- last update
over 1 year ago 29,879 pass, 1 fail - Status changed to Needs work
over 1 year ago 4:18pm 30 July 2023 - last update
over 1 year ago 29,909 pass - Status changed to Needs review
over 1 year ago 4:47pm 30 July 2023 - π¨πSwitzerland znerol
Ah right! The SQL error messages are db specific. Thus, let's look for
DatabaseExceptionWrapper
(wraps db specific exceptions) and also the stringINSERT INTO
which should be present in the error messages generated by all supported databases. - last update
over 1 year ago 29,909 pass - last update
over 1 year ago 29,901 pass, 1 fail - last update
over 1 year ago 29,909 pass - last update
over 1 year ago 29,909 pass - last update
over 1 year ago 29,909 pass - Status changed to RTBC
over 1 year ago 9:42pm 30 July 2023 - Status changed to Fixed
over 1 year ago 7:55am 31 July 2023 Automatically closed - issue fixed for 2 weeks with no activity.