rfc:always_enable_json
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
rfc:always_enable_json [2020/04/30 00:02] – Mention similarity to permanent_hash_ext RFC. Fix formatting. tandre | rfc:always_enable_json [2020/05/12 13:42] – Keep the HAVE_JSON constant, fix formatting tandre | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== PHP RFC: Always | + | ====== PHP RFC: Always |
- | * Version: 0.2 | + | * Version: 0.3 |
* Date: 2020-04-29 | * Date: 2020-04-29 | ||
- | * Author: Tyson Andre | + | * Author: Tyson Andre < |
* Status: Under Discussion | * Status: Under Discussion | ||
* Target version: PHP 8.0 | * Target version: PHP 8.0 | ||
Line 10: | Line 10: | ||
===== Introduction ===== | ===== Introduction ===== | ||
- | Currently, it's possible to disable the json extension with '' | + | Currently, it's possible to disable the json extension with '' |
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 18: | Line 18: | ||
Examples of where this would be useful: | Examples of where this would be useful: | ||
- | * Allowing internal classes to implement '' | + | * Allowing internal classes to implement '' |
* Allowing PHP users to publish single-file scripts that use json_encode and json_decode and don't require polyfills or less readable var_export output. \\ | * Allowing PHP users to publish single-file scripts that use json_encode and json_decode and don't require polyfills or less readable var_export output. \\ | ||
Line 41: | Line 41: | ||
===== Backward Incompatible Changes ===== | ===== Backward Incompatible Changes ===== | ||
- | Build configurations that contain '' | + | Build configurations that contain '' |
- | + | ||
- | The '' | + | |
- | + | ||
- | * PECL extensions should check ''# | + | |
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 '' | 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 '' | ||
Line 69: | Line 65: | ||
===== Future Scope ===== | ===== Future Scope ===== | ||
+ | |||
+ | * Make internal classes that already have custom JSON serialization behavior ('' | ||
* Start using JSON in more places within PHP's own functions. For example, adding additional conversion specifiers for '' | * Start using JSON in more places within PHP's own functions. For example, adding additional conversion specifiers for '' | ||
Line 77: | 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