This is an old revision of the document!
PHP RFC: Change terminology to AllowList and BlockList
- Version: 0.9
- Date: 2020-06-09
- Author: Michał Marcin Brzuchalski brzuchal@php.net
- Status: Draft
- First Published at: http://wiki.php.net/rfc/change-terminology-to-allowlist-and-blocklist
Change uses of “whitelist” and “blacklist” in Opcache configuration with better self-descriptive terminology.
Introduction
The words “whitelist” and “blacklist” require additional context to figure out the exact intention of a specific configuration. This proposal suggest to change these to names that better reflect what the functionality does.
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. There is also a draft IETF document.
Change INI directive name
A new INI directive called opcache.blocklist_filename
will be introduced and will configure the same internal value as the already existing opcache.blacklist_filename
.
The 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
.
Change in opcache_get_configuration function
The opcache_get_configuration()
function currently returns an associative array with information about Opcache.
A new key named blocklist
will be added to resulting array with the same value as the original blacklist
key which will remain untouched with additional soft-deprecation in the docs.
Backward Incompatible Changes
Most of the changes are internal only with two exceptions for which this patch requires RFC:
- The new
opcache.blacklist_filename
INI directive - An extra
blacklist
key in the returned array value ofopcache_get_configuration()
Whether the use of the opcache.blacklist_filename
INI directive triggers a deprecation notice is a subject to a 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
intoopcache.blocklist_filename
- php.ini-production changed name of
opcache.blacklist_filename
intoopcache.blocklist_filename
Future scope
The possibility to remove opcache.blacklist_filename
INI directive and opcache_get_configuration()[“blacklist”]
in the next
minor PHP 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