Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 292343

Replace method names that use writeable with writable

$
0
0

Problem/Motivation

This is a followup to #2898947: Change "writeable" to "writable". 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

The following instances will be replaced/deprecated:

  1. \Drupal\Component\PhpStorage\PhpStorageInterface::writeable()
  2. \Drupal\Component\PhpStorage\FileStorage::writeable()
  3. \Drupal\Component\PhpStorage\FileReadOnlyStorage::writeable()

Data model changes

N/A

Release notes snippet

N/A


Viewing all articles
Browse latest Browse all 292343

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>