Add return types to SessionHandler

Created on 12 September 2023, over 1 year ago
Updated 22 January 2024, about 1 year ago

Problem/Motivation

Follow up from #3377256-27: Correctly implement SessionHandlerInterface β†’ from @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 β†’ ...).

As per @quietone in #3377256-28: Correctly implement SessionHandlerInterface β†’

A search for SessionHanlder in contrib didn't find any case where it was extended.

Steps to reproduce

Proposed resolution

Remove #[\ReturnTypeWillChange] attribute and add return types to session handler methods.

Remaining tasks

User interface changes

API changes

The SessionHandler class uses the correct PHP \SessionHandlerInterface method signatures for return types.

Note: This will break subclasses of SessionHandler if they do not specify the correct return types. However, since non-base classes β†’ are not considered public API, this isn't considered a BC break. Also a code search revealed no subclass of SessionHandler in contrib.

Data model changes

Release notes snippet

πŸ“Œ Task
Status

Fixed

Version

11.0 πŸ”₯

Component
BaseΒ  β†’

Last updated about 16 hours ago

Created by

πŸ‡ΊπŸ‡ΈUnited States smustgrave

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024