mirror of
https://github.com/php/php-src.git
synced 2024-11-24 18:34:21 +08:00
60a69daec6
This patch adds missing newlines, trims multiple redundant final newlines into a single one, and trims redundant leading newlines. According to POSIX, a line is a sequence of zero or more non-' <newline>' characters plus a terminating '<newline>' character. [1] Files should normally have at least one final newline character. C89 [2] and later standards [3] mention a final newline: "A source file that is not empty shall end in a new-line character, which shall not be immediately preceded by a backslash character." Although it is not mandatory for all files to have a final newline fixed, a more consistent and homogeneous approach brings less of commit differences issues and a better development experience in certain text editors and IDEs. [1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206 [2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2 [3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
83 lines
3.2 KiB
Plaintext
83 lines
3.2 KiB
Plaintext
PHP 7.2 INTERNALS UPGRADE NOTES
|
|
|
|
1. Internal API changes
|
|
a. Path related functions
|
|
b. php_win32_get_random_bytes()
|
|
c. nice() Windows implementation
|
|
d. ZEND_ACC_CLONE removed
|
|
e. IS_TYPE_IMMUTABLE removed
|
|
f. zend_arg_info.class_name removed
|
|
g. ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX changed
|
|
h. valid_symbol_table removed
|
|
|
|
2. Build system changes
|
|
a. Unix build system changes
|
|
b. Windows build system changes
|
|
|
|
|
|
3. Module changes
|
|
|
|
========================
|
|
1. Internal API changes
|
|
========================
|
|
|
|
a. Path related functions
|
|
- CWD_API void realpath_cache_del(const char *path, size_t path_len);
|
|
- CWD_API realpath_cache_bucket* realpath_cache_lookup(const char *path, size_t path_len, time_t t);
|
|
- PHPAPI void php_clear_stat_cache(zend_bool clear_realpath_cache, const char *filename, size_t filename_len);
|
|
- PHPAPI void php_stat(const char *filename, size_t filename_length, int type, zval *return_value);
|
|
|
|
b. php_win32_get_random_bytes()
|
|
The internal randomness source on Windows switched to use CNG API.
|
|
|
|
c. nice() now have a Windows alternative that is implemented in win32/nice.c, using
|
|
SetPriorityClass(). See the implementation for more in-depth details. This also
|
|
defines HAVE_NICE.
|
|
|
|
d. ZEND_ACC_CLONE is removed, but was not used in previous versions
|
|
|
|
e. IS_TYPE_IMMUTABLE is removed, IS_TYPE_COPYABLE can be used instead
|
|
Z_IMMUTABLE() check function is still available
|
|
|
|
f. zend_arg_info class_name member is removed, use ZEND_TYPE_NAME instead
|
|
|
|
g. ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX classname option is removed
|
|
use ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX for simple type
|
|
use ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX for object
|
|
|
|
h. valid_symbol_table is removed from executor_globals.
|
|
Use EG(active) instead of removed EG(valid_symbol_table)
|
|
|
|
========================
|
|
2. Build system changes
|
|
========================
|
|
|
|
a. Unix build system changes
|
|
|
|
b. Windows build system changes
|
|
|
|
. Minimum supported Windows versions are Windows 7/Server 2008 R2.
|
|
. --enable-one-shot configure option is removed, --with-mp is usable.
|
|
. The new binary tools SDK is required for Windows builds, the
|
|
documentation is available under https://wiki.php.net/internals/windows/stepbystepbuild_sdk_2
|
|
. Visual Studio 2017 is utilized for the Windows builds
|
|
. Clang build with ASAN is supported with clang 5+
|
|
|
|
========================
|
|
3. Module changes
|
|
========================
|
|
|
|
- Pcre:
|
|
. php_pcre_replace and php_pcre_replace_impl expect a zend_string instead of a zval and
|
|
is_callable_replace options is removed:
|
|
- PHPAPI zend_string *php_pcre_replace(zend_string *regex, zend_string *subject_str, char *subject, int subject_len, zend_string *replace_str, int limit, int *replace_count);
|
|
- PHPAPI zend_string *php_pcre_replace_impl(pcre_cache_entry *pce, zend_string *subject_str, char *subject, int subject_len, zend_string *replace_str, int limit, int *replace_count);
|
|
|
|
- Session:
|
|
. php_session_start()/session_reset_id() return value is changed from void to int.
|
|
It returns SUCCESS/FAILURE.
|
|
. Session module manages session status correctly.
|
|
|
|
- OpenSSL:
|
|
. Windows builds ship with OpenSSL 1.1 by default, lower versions are still supported with custom deps.
|