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

Change "writeable" to "writable"

$
0
0

Problem/Motivation

The spelling of the word writeable/writable is not consistent in core. Either spelling is correct.

Proposed resolution

Core uses 'writeable' 22 times and 'writable' 154 times.

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.

Out of scope

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

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

... (and there are some tests for these functions which use the incorrect name) ... but changing these would break backwards compatibility, and is therefore out-of-scope for this patch.

Remaining tasks

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

User interface changes

All instances of writeable change to writable

API changes

N/A

Data model changes

N/A

Release notes snippet

N/A

Original report by gnikolovski

The spelling of the word writeable/writable is not consistent in core. Core use ‘writeable’ 22 times and ‘writable’ 154 times. (#9)

Possible resolutions:
- Change all instances of ‘writeable’ to ‘writable’
- Change all instances of ‘writable’ to ‘writeable’
- Leave as-is. Either spelling is correct.


Viewing all articles
Browse latest Browse all 295547


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