rfc:always_enable_json

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
rfc:always_enable_json [2020/05/03 15:54] – Mention implementing JsonSerializable in future scope, update wording tandrerfc:always_enable_json [2020/05/12 13:42] – Keep the HAVE_JSON constant, fix formatting tandre
Line 1: Line 1:
 ====== PHP RFC: Always available JSON extension ====== ====== PHP RFC: Always available JSON extension ======
-  * Version: 0.2+  * Version: 0.3
   * Date: 2020-04-29   * Date: 2020-04-29
   * Author: Tyson Andre <tandre@php.net>   * Author: Tyson Andre <tandre@php.net>
Line 10: Line 10:
 ===== Introduction ===== ===== Introduction =====
  
-Currently, it's possible to disable the json extension with ''./configure --disable-json''.+Currently, it's possible to disable the json extension with ''./configure %%--%%disable-json''.
 However, JSON is extremely useful to have because it's widely used for many use cases (web sites, logging output, However, JSON is extremely useful to have because it's widely used for many use cases (web sites, logging output,
 and as a data format that can be used to share data with many applications and as a data format that can be used to share data with many applications
Line 41: Line 41:
 ===== Backward Incompatible Changes ===== ===== Backward Incompatible Changes =====
  
-Build configurations that contain ''--enable-json'' or ''--disable-json'' will have to be updated, as the argument will cease to exist. +Build configurations that contain ''%%--%%enable-json'' or ''%%--%%disable-json'' will have to be updated, as the argument will cease to exist.
- +
-The ''HAVE_JSON'' C macro constant was removed from the generated ''main/php_config.h'', because it's always true (the removal of macros that are no longer useful are typically reserved for major versions such as 8.0, but have also been done in minor versions). +
- +
-  * PECL extensions should check ''#if PHP_MAJOR_VERSION >= 8 || HAVE_JSON'' instead of ''#if HAVE_JSON''+
  
 Because JSON would always be built statically to guarantee it can be used, package maintainers for OSes such as Fedora would need to create stub packages for the ''php-json'' package, or to remove the package in php 8 (or mark it as provided by the core ''php'' package). Because JSON would always be built statically to guarantee it can be used, package maintainers for OSes such as Fedora would need to create stub packages for the ''php-json'' package, or to remove the package in php 8 (or mark it as provided by the core ''php'' package).
Line 79: Line 75:
  
 Make the JSON extension impossible to disable (Yes/No vote, requiring 2/3 majority) Make the JSON extension impossible to disable (Yes/No vote, requiring 2/3 majority)
 +
 +===== Changelog =====
 +
 +0.3: Keep the HAVE_JSON constant in config.m4, to avoid a backwards compatibility break.
  
 ===== References ===== ===== References =====
rfc/always_enable_json.txt · Last modified: 2020/05/27 13:15 by tandre