doc:todo:migrationguide
Migration guide TODO
Version: PHP 7.2.0
Undocumented new functionality
- Undocumented new behavior/new features
- Libsodium
- Extension load by name on the dl() function page and ini.core#extension list
- Abstract method overriding in OOP changelog/abstraction page
- resource > object in hash function documentation
- JSON_OBJECT_AS_ARRAY on json_decode() function page, note+changelog
- $php_errormsg and track_error behavior in local scope
- Constants
- PREG_UNMATCHED_AS_NULL
- JSON_INVALID_UTF8_IGNORE
- JSON_INVALID_UTF8_SUBSTITUTE
- SODIUM_LIBRARY_VERSION
- SODIUM_LIBRARY_MAJOR_VERSION
- SODIUM_LIBRARY_MINOR_VERSION
- SODIUM_CRYPTO_AEAD_AES256GCM_KEYBYTES
- SODIUM_CRYPTO_AEAD_AES256GCM_NSECBYTES
- SODIUM_CRYPTO_AEAD_AES256GCM_NPUBBYTES
- SODIUM_CRYPTO_AEAD_AES256GCM_ABYTES
- SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES
- SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_NSECBYTES
- SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_NPUBBYTES
- SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_ABYTES
- SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_IETF_KEYBYTES
- SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_IETF_NSECBYTES
- SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUBBYTES
- SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_IETF_ABYTES
- SODIUM_CRYPTO_AUTH_BYTES
- SODIUM_CRYPTO_AUTH_KEYBYTES
- SODIUM_CRYPTO_BOX_SEALBYTES
- SODIUM_CRYPTO_BOX_SECRETKEYBYTES
- SODIUM_CRYPTO_BOX_PUBLICKEYBYTES
- SODIUM_CRYPTO_BOX_KEYPAIRBYTES
- SODIUM_CRYPTO_BOX_MACBYTES
- SODIUM_CRYPTO_BOX_NONCEBYTES
- SODIUM_CRYPTO_BOX_SEEDBYTES
- SODIUM_CRYPTO_KDF_BYTES_MIN
- SODIUM_CRYPTO_KDF_BYTES_MAX
- SODIUM_CRYPTO_KDF_CONTEXTBYTES
- SODIUM_CRYPTO_KDF_KEYBYTES
- SODIUM_CRYPTO_KX_SEEDBYTES
- SODIUM_CRYPTO_KX_SESSIONKEYBYTES
- SODIUM_CRYPTO_KX_PUBLICKEYBYTES
- SODIUM_CRYPTO_KX_SECRETKEYBYTES
- SODIUM_CRYPTO_KX_KEYPAIRBYTES
- SODIUM_CRYPTO_GENERICHASH_BYTES
- SODIUM_CRYPTO_GENERICHASH_BYTES_MIN
- SODIUM_CRYPTO_GENERICHASH_BYTES_MAX
- SODIUM_CRYPTO_GENERICHASH_KEYBYTES
- SODIUM_CRYPTO_GENERICHASH_KEYBYTES_MIN
- SODIUM_CRYPTO_GENERICHASH_KEYBYTES_MAX
- SODIUM_CRYPTO_PWHASH_ALG_ARGON2I13
- SODIUM_CRYPTO_PWHASH_ALG_DEFAULT
- SODIUM_CRYPTO_PWHASH_SALTBYTES
- SODIUM_CRYPTO_PWHASH_STRPREFIX
- SODIUM_CRYPTO_PWHASH_OPSLIMIT_INTERACTIVE
- SODIUM_CRYPTO_PWHASH_MEMLIMIT_INTERACTIVE
- SODIUM_CRYPTO_PWHASH_OPSLIMIT_MODERATE
- SODIUM_CRYPTO_PWHASH_MEMLIMIT_MODERATE
- SODIUM_CRYPTO_PWHASH_OPSLIMIT_SENSITIVE
- SODIUM_CRYPTO_PWHASH_MEMLIMIT_SENSITIVE
- SODIUM_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_SALTBYTES
- SODIUM_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_STRPREFIX
- SODIUM_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_OPSLIMIT_INTERACTIVE
- SODIUM_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_MEMLIMIT_INTERACTIVE
- SODIUM_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_OPSLIMIT_SENSITIVE
- SODIUM_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_MEMLIMIT_SENSITIVE
- SODIUM_CRYPTO_SCALARMULT_BYTES
- SODIUM_CRYPTO_SCALARMULT_SCALARBYTES
- SODIUM_CRYPTO_SHORTHASH_BYTES
- SODIUM_CRYPTO_SHORTHASH_KEYBYTES
- SODIUM_CRYPTO_SECRETBOX_KEYBYTES
- SODIUM_CRYPTO_SECRETBOX_MACBYTES
- SODIUM_CRYPTO_SECRETBOX_NONCEBYTES
- SODIUM_CRYPTO_SIGN_BYTES
- SODIUM_CRYPTO_SIGN_SEEDBYTES
- SODIUM_CRYPTO_SIGN_PUBLICKEYBYTES
- SODIUM_CRYPTO_SIGN_SECRETKEYBYTES
- SODIUM_CRYPTO_SIGN_KEYPAIRBYTES
- SODIUM_CRYPTO_STREAM_NONCEBYTES
- SODIUM_CRYPTO_STREAM_KEYBYTES
- Functions/Methods
- ldap_parse_exop()
- ldap_exop()
- ldap_exop_passwd()
- ldap_exop_whoami()
- socket_addrinfo_lookup()
- socket_addrinfo_connect()
- socket_addrinfo_bind()
- socket_addrinfo_explain()
- stream_isatty()
- sapi_windows_vt100_support()
- spl_object_id()
- DomNodeList::count()
- DomNamedNodeMap::count()
- ftp_append()
- mb_chr()
- mb_ord()
- mb_scrub()
- sodium_add()
- sodium_bin2hex()
- sodium_compare()
- sodium_crypto_aead_aes256gcm_decrypt()
- sodium_crypto_aead_aes256gcm_encrypt()
- sodium_crypto_aead_aes256gcm_is_available()
- sodium_crypto_aead_aes256gcm_keygen()
- sodium_crypto_aead_chacha20poly1305_decrypt()
- sodium_crypto_aead_chacha20poly1305_encrypt()
- sodium_crypto_aead_chacha20poly1305_ietf_decrypt()
- sodium_crypto_aead_chacha20poly1305_ietf_encrypt()
- sodium_crypto_aead_chacha20poly1305_ietf_keygen()
- sodium_crypto_aead_chacha20poly1305_keygen()
- sodium_crypto_auth_keygen()
- sodium_crypto_auth_verify()
- sodium_crypto_auth()
- sodium_crypto_box_keypair_from_secretkey_and_publickey()
- sodium_crypto_box_keypair()
- sodium_crypto_box_open()
- sodium_crypto_box_publickey_from_secretkey()
- sodium_crypto_box_publickey()
- sodium_crypto_box_seal_open()
- sodium_crypto_box_seal()
- sodium_crypto_box_secretkey()
- sodium_crypto_box_seed_keypair()
- sodium_crypto_box()
- sodium_crypto_generichash_final()
- sodium_crypto_generichash_init()
- sodium_crypto_generichash_keygen()
- sodium_crypto_generichash_update()
- sodium_crypto_generichash()
- sodium_crypto_kdf_derive_from_key()
- sodium_crypto_kdf_keygen()
- sodium_crypto_kx_client_session_keys()
- sodium_crypto_kx_keypair()
- sodium_crypto_kx_publickey()
- sodium_crypto_kx_secretkey()
- sodium_crypto_kx_seed_keypair()
- sodium_crypto_kx_server_session_keys()
- sodium_crypto_pwhash_scryptsalsa208sha256_str_verify()
- sodium_crypto_pwhash_scryptsalsa208sha256_str()
- sodium_crypto_pwhash_scryptsalsa208sha256()
- sodium_crypto_pwhash_str_verify()
- sodium_crypto_pwhash_str()
- sodium_crypto_pwhash()
- sodium_crypto_scalarmult_base()
- sodium_crypto_scalarmult()
- sodium_crypto_secretbox_keygen()
- sodium_crypto_secretbox_open()
- sodium_crypto_secretbox()
- sodium_crypto_shorthash_keygen()
- sodium_crypto_shorthash()
- sodium_crypto_sign_detached()
- sodium_crypto_sign_ed25519_pk_to_curve25519()
- sodium_crypto_sign_ed25519_sk_to_curve25519()
- sodium_crypto_sign_keypair_from_secretkey_and_publickey()
- sodium_crypto_sign_keypair()
- sodium_crypto_sign_open()
- sodium_crypto_sign_publickey_from_secretkey()
- sodium_crypto_sign_publickey()
- sodium_crypto_sign_secretkey()
- sodium_crypto_sign_seed_keypair()
- sodium_crypto_sign_verify_detached()
- sodium_crypto_sign()
- sodium_crypto_stream_keygen()
- sodium_crypto_stream_xor()
- sodium_crypto_stream()
- sodium_hex2bin()
- sodium_increment()
- sodium_memcmp()
- sodium_memzero()
- sodium_pad()
- sodium_unpad()
Incompatibilities
- Session
- Removed register_globals related code and “!” can be used as $_SESSION key name.
- Session is made to manage session status correctly and prevents invalid operations. Only inappropriate codes are affected by this change. If you have problems with this, it means you have problem in your code.
- Functions are made to set or return correct session status: session_start(), session_status(), session_regenerate_id().
- Functions are made to return bool from null. These functions have void parameter and void parameter is checked: session_unset(), session_write_close()/session_commit(), session_abort(), session_reset().
- Functions prohibit invalid operations with regard to session status and HTTP header status, returns correct bool return value: session_start(), session_set_cookie_params(), session_name(), session_module_name(), session_set_save_handler(), session_regenerate_id(), session_cache_limiter(), session_cache_expire(), session_unset(), session_destroy(), session_write_close()/session_commit(), session_reset().
- INI value change by ini_set() returns update status correctly. Invalid INI modifications are checked and made to fail: session.name, session.save_path, session.cookie_lifetime, session.cookie_path, session.cookie_domain, session.cookie_httponly, session.cookie_secure, session.use_cookies, session.use_only_cookies, session.use_strict_mode, session.referer_check, session.cache_limiter, session.cache_expire, session.lazy_write, session.save_handler, session.serialize_handler, session.gc_probability, session.gc_divior, session.gc_maxlifetime.
- Some E_ERRORs are changed to E_WARNING since session status is managed correctly: session_start().
- Session no longer initialize $_SESSION for invalid and useless session: session_start()
- When headers are already sent and try to set new INI values: session_name(), session_module_name(), session_save_path(), session_cache_limiter() and session_cache_expire() are no longer works. Older PHPs accepts new values even if new values will not be effective. This new corrected behavior may affect command line mode CLI scripts that manage sessions. Use output buffer just like web applications to resolve problems on CLI scripts.
New Features
- JSON
- Added JSON_INVALID_UTF8_IGNORE and JSON_INVALID_UTF8_SUBSTITUTE options for json_encode() and json_decode() to ignore and replace invalid UTF-8 byte sequences, respectively.
- PCRE:
- Added `PREG_UNMATCHED_AS_NULL` flag to allow distinguish between unmatched subpatterns and empty matches by reporting NULL and “” (empty string), respectively.
Other Changes
- Mbstring
- mb_check_encoding() accepts array parameter. Both key and value encodings are checked recursively.
- mb_convert_encoding() accepts array parameter. Only value encodings are converted recursively.
- Standard Library
- mail()/mb_send_mail() accept array $extra_header. Array parameter is checked against RFC 2822.
- Windows
- Support for VT100 console mode on systems starting with Windows NT 10.0.10586 (Windows 10 (TH2)), cmd.exe supports ANSI escape sequences. The corresponding console mode is enabled by default on CLI on suitable systems. As well, the function sapi_windows_vt100_support() is provided, to control and query the corresponding information in the scripts.
doc/todo/migrationguide.txt · Last modified: 2017/11/29 23:34 by kalle