Deprecate PhpStorage ::writeable() methods for removal in Drupal 11 with no replacement

Created on 21 May 2020, about 4 years ago
Updated 17 February 2023, over 1 year ago

Problem/Motivation

This is a followup to #2898947: Change "writeable" to "writable" in documentation . Where that ticket covers the documentation, a follow-up was requested to cover changes to the method names. This is that follow-up.

Drupal core defines three functions with the less-used spelling 'writeable'...

The PHP standard library has a function named is_writable(), which Core uses 36 times; and an alias of that function named is_writeable(), which core does not use (as of commit 3834d60f1a).

Given that 'writable' already occurs more often than 'writeable', it makes sense for us change to 'writable' in this patch.

Proposed resolution

  1. Create new versions of the methods spelled "writable".
  2. Update the old versions to be wrappers of the new ones.
  3. Deprecate the old ones.

Remaining tasks

  1. Write a patch.
  2. Review by searching latest code with grep -r 'writeable' /path/to/core.

API changes

  1. \Drupal\Component\PhpStorage\PhpStorageInterface::writeable() is deprecated with no replacement
  2. \Drupal\Component\PhpStorage\FileStorage::writeable() is deprecated with no replacement
  3. \Drupal\Component\PhpStorage\FileReadOnlyStorage::writeable() is deprecated with no replacement

Data model changes

N/A

Release notes snippet

N/A

📌 Task
Status

Fixed

Version

10.1

Component
System 

Last updated 1 day ago

No maintainer
Created by

🇺🇸United States markdorison

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024