rfc:my_rfc
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionLast revisionBoth sides next revision | ||
rfc:my_rfc [2015/01/31 00:37] – created yohgaki | rfc:my_rfc [2017/09/22 13:28] – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== PHP RFC: Your Title Here ====== | + | ====== PHP RFC: Deprecate INI set/get aliases |
- | * Version: 0.9 | + | * Version: 0.1 |
* Date: 2015-01-31 | * Date: 2015-01-31 | ||
* Author: Yasuo Ohgaki < | * Author: Yasuo Ohgaki < | ||
Line 10: | Line 10: | ||
There are number of INI set/get functions. This RFC proposes deprecation of these functions. | There are number of INI set/get functions. This RFC proposes deprecation of these functions. | ||
- | ===== Proposal ===== | + | Use of ini_set()/ |
- | Use of ini_set()/ | ||
- | Pros | + | **Pros** |
- | - Less API, hence simpler API. | + | - Less API, hence simpler API. |
- | - Modules will be less buggy. | + | - Modules will be less buggy. i.e. PHP_INI_MH() must handle " |
- | | + | - Consistent coding style/API across modules, both internal and script. |
- | - Consistent coding style/API across modules, both internal and script. | + | - Reduced documentations. INI descriptions are only in INI section. |
- | - Reduced documentations. INI descriptions are only in INI section. | + | - Less documentations, |
- | - Less documentations, | + | - Better documentation. All user needs to know will be in INI section. |
- | - Better documentation. All user needs to know will be in INI section. | + | - Awareness of INI setting use. Users are better to know they are using INI. i.e. All INI values has the same limitations, |
- | - Awareness of INI setting use. Users are better to know they are using INI. i.e. All INI values has the same limitations, | + | - (Please point it out more advantages) |
- | - (Please point it out more advantages) | + | |
- | Cons | + | **Cons** |
- | - Existing code modifications. (It's E_DEPRECATED. User may ignore.) | + | - Existing code modifications. (It's E_DEPRECATED. User may ignore.) |
- | - (Please point it out more disadvantages) | + | - (Please point it out more disadvantages) |
+ | |||
+ | |||
+ | **Before** | ||
+ | <code php> | ||
+ | <?php | ||
+ | // Setup environment | ||
+ | session_cache_limiter(' | ||
+ | session_name(' | ||
+ | session_save_path('/ | ||
+ | ini_set(' | ||
+ | ini_set(' | ||
+ | ini_set(' | ||
+ | mb_internal_encoding(' | ||
+ | </ | ||
+ | |||
+ | **After** | ||
+ | <code php> | ||
+ | <?php | ||
+ | // Setup environment | ||
+ | ini_set(' | ||
+ | ini_set(' | ||
+ | ini_set(' | ||
+ | ini_set(' | ||
+ | ini_set(' | ||
+ | ini_set(' | ||
+ | ini_set(' | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | **From pre RFC discussion: | ||
+ | |||
+ | removing or disrupting functions without a very good reason | ||
+ | (such as, functionality going away or this function is abused or is | ||
+ | broken in many use cases) is wrong. These functions don't seem broken, | ||
+ | they just do something that you can do in another way. I don't think it | ||
+ | is necessary to deprecated them. (Stas) | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ===== Proposal ===== | ||
+ | There are 2 documentation and 1 code change proposal. | ||
- | 1. Add plain ini_get/ | + | 1. Add plain ini_get/ |
10. Use ini_set()/ | 10. Use ini_set()/ | ||
alias functions. | alias functions. | ||
- | 2. Document INI set/get alias functions. | + | 2. Document INI set/get alias functions |
e.g. | e.g. | ||
- | - http:// | + | |
- | - http:// | + | - http:// |
- | - http:// | + | - http:// |
- | - http:// | + | - http:// |
- | - http:// | + | - http:// |
- | - http:// | + | - http:// |
- | - http:// | + | - http:// |
- | - http:// | + | - http:// |
- | - http:// | + | - http:// |
- | - http:// | + | - http:// |
- | - http:// | + | - http:// |
- | - http:// | + | - http:// |
- | - http:// | + | - http:// |
- | - And more. | + | - And more. |
- | 3. Raise E_DEPRICATE | + | 3. Add **E_DEPRICATED** |
Line 61: | Line 104: | ||
1. None for CODING_STANDARD documentation. | 1. None for CODING_STANDARD documentation. | ||
- | 2. None for deprecation documentation in the manual. | + | 2. None for deprecation documentation in the PHP manual. |
- | 3. E_DEPRECATE | + | 3. E_DEPRECATED |
Line 103: | Line 146: | ||
===== Open Issues ===== | ===== Open Issues ===== | ||
- | None. | + | Decided exceptions. Candidates are |
+ | |||
+ | - Zend/Core functions that changes INI. e.g. gc_enable. | ||
===== Unaffected PHP Functionality ===== | ===== Unaffected PHP Functionality ===== |
rfc/my_rfc.txt · Last modified: 2022/04/05 18:30 by imsop