rfc:change-terminology-to-allowlist-and-blocklist

This is an old revision of the document!


PHP RFC: Change terminology to AllowList and BlockList

Change uses of “whitelist” and “blacklist” with better self-descriptive terminology.

Introduction

Words like “whitelist” and “blacklist” require additional context to figure out the exact intention. We should name things better because we can. There are no reasons to use these if we can find better naming terminology.

Proposal

The proposal is to replace all occurrences of “whitelist” and “blacklist” to their respective alternatives “allowlist” and “blocklist”.

A list of Open Source projects with similar terminology change is listed in references section.

Change INI directive name

A INI directive called opcache.blacklist_filename will remain as is but with additional soft-deprecation in the docs and in php.ini-development and php.ini-production.

A new INI directive called opcache.blocklist_filename will be introduced and will write the value to the same address where original.

Change in opcache_get_configuration function

Function opcache_get_configuration() returns associative array with blacklist key which will remain untouched with additional soft-deprecation in the docs.

A new key named blocklist will be added to resulting array with the same value as original.

Backward Incompatible Changes

Most of the changes are internal only with two exceptions for which this patch requires RFC:

  1. opcache.blacklist_filename INI directive
  2. opcache_get_configuration()[“blacklist”] key in returned array value

Use of opcache.blacklist_filename INI directive triggers a deprecation notice which is a subject of the secondary vote.

Proposed PHP Version(s)

Next PHP version 8.0.

RFC Impact

To SAPIs

None.

To Existing Extensions

Only in Opcache.

To Opcache

This proposal modifies Opcache structure and function names by replacing “blacklist” with “blocklist”.

php.ini Defaults

  • php.ini-development changed name of opcache.blacklist_filename into opcache.blocklist_filename
  • php.ini-production changed name of opcache.blacklist_filename into opcache.blocklist_filename

Future scope

Removal of opcache.blacklist_filename INI directive and opcache_get_configuration()[“blacklist”] in next PHP minor version 8.1.

Proposed Voting Choices

Accept changing terminology in PHP 8.0? Yes/No with 2/3 majority required. Add deprecation notice when deprecated INI directive used? Yes/No

Implementation

References

rfc/change-terminology-to-allowlist-and-blocklist.1591703612.txt.gz · Last modified: 2020/06/09 11:53 by brzuchal