summaryrefslogtreecommitdiff
path: root/UPGRADING
Commit message (Collapse)AuthorAgeFilesLines
* Update NEWS and UPGRADING for the OpenSSL ext CMS additionJakub Zelenka2020-06-071-0/+19
|
* Add $filter parameter for ReflectionClass::(getConstants|getReflectionConstants)Gabriel Caruso2020-06-071-0/+9
| | | | | | | | | | | | | | | | This solves [#79628](https://bugs.php.net/79628). Similar to `ReflectionClass::getMethods()` and `ReflectionClass::getProperties()`, this new `$filter` argument allows the filtering of constants defined in a class by their visibility. For that, we create three new constants for `ReflectionClassConstant`: * `IS_PUBLIC` * `IS_PROTECTED` * `IS_PRIVATE` Closes GH-5649.
* Implement "Constructor Promotion" RFCNikita Popov2020-06-051-0/+3
| | | | | | RFC: https://wiki.php.net/rfc/constructor_promotion Closes GH-5291.
* Add upgrading note for Attributes RFCBenjamin Eberlei2020-06-041-0/+2
| | | | [ci-skip]
* Add UPGRADING note for pty supportNikita Popov2020-05-311-0/+8
| | | | [ci skip]
* Add UPGRADING note for xmlrpc unbundlingNikita Popov2020-05-311-6/+4
| | | | | | | | And drop other UPGRADING references to xmlrpc. I don't think it makes sense to have those for extensions that are no longer shipped... [ci skip]
* Fix some line overruns in UPGRADINGNikita Popov2020-05-311-31/+34
| | | | [ci skip]
* Move upgrading note for mixedNikita Popov2020-05-311-2/+2
| | | | | | This should be in the "new features" section. [ci skip]
* Use ZPP callable check for spl_autoload_register.George Peter Banyard2020-05-301-0/+3
| | | | | | | | | | This makes it always throw a TypeError, moreover this makes the error message consistent. Added a warning mentioning that the second parameter is now ignored when passed false. Closes GH-5301
* Add upgrading notes about the deprecated functionality in ext/enchantMáté Kocsis2020-05-291-0/+2
| | | | [skip ci]
* Convert enchant resources to opaque objectsMáté Kocsis2020-05-291-0/+6
| | | | | | | Additionally, deprecate ENCHANT_MYSPELL and ENCHANT_ISPELL constants. Closes GH-5577 Co-authored-by: Remi Collet <remi@php.net>
* [RFC] Always enable JSON support in php 8.0Tyson Andre2020-05-271-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, it's possible to disable the json extension with `./configure --disable-json` (for historical reasons that no longer apply). However, JSON is widely used in many use cases - web sites, logging output, and as a data format that can be used to share data with many applications and programming languages, so I'd personally find it useful if it was always enabled. Examples of where this would be useful: - For internal classes to be able to implement `JsonSerializable` which currently requires a hard dependency on the JSON extension. - For 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. (polyfills are less efficient and may have issues with recursive data structures) - So that php-src's own modules, tools and test cases can start using JSON if it's a good choice for encoding a value. (same for PECLs) https://wiki.php.net/rfc/jsond mentions that in PHP 5, > The current Json Parser in the json extension does not have a free license > which is a problem for many Linux distros. > This has been referenced at Bug #63520. > That results in not packaging json extension in the many Linux distributions. Starting in php 7.0 with the switch to jsond, It looks like licensing is no longer an issue. Changes: - Remove all flags related to JSON such as `configure --disable-json` - Require that JSON be compiled statically instead of as a shared library Examples of uses of JSON in various distros (backwards incompatible changes such as changing packaging are typically reserved for major versions, and 8.0 is a major version) - JSON is required by `php-cli` or `php` in ubuntu: https://packages.ubuntu.com/focal/php/ - The php-json package has to be installed separately from the PHP binary in Fedora repos. Closes GH-5495
* Add support for * width and precision in printf()Nikita Popov2020-05-271-0/+7
| | | | | | | | | | | | | | | | | | | | | | If * is used for width/precision in printf, then the width/precision is provided by a printf argument instead of being part of the format string. Semantics generally match those of printf in C. This can be used to easily reproduce PHP's float printing behavior: // Locale-sensitive using precision ini setting. // Used prior to PHP 8.0. sprintf("%.*G", (int) ini_get('precision'), $float); // Locale-insensitive using precision ini setting. // Used since to PHP 8.0. sprintf("%.*H", (int) ini_get('precision'), $float); // Locale-insensitive using serialize_precision ini setting. // Used in serialize(), json_encode() etc. sprintf("%.*H", (int) ini_get('serialize_precision'), $float); Closes GH-5432.
* Add support for %h and %H in printf()Nikita Popov2020-05-271-0/+5
| | | | | | These are locale-independent variants of %g and %G. Closes GH-5436.
* Return empty array instead of null from enchant APIsNikita Popov2020-05-271-0/+4
| | | | Closes GH-5566.
* Support catching exceptions without capturing them to variablesMax Semenik2020-05-261-0/+3
| | | | | | RFC: https://wiki.php.net/rfc/non-capturing_catches Closes GH-5345.
* Fix ZPP of v*printf()Máté Kocsis2020-05-251-0/+2
|
* PGSQL and POD_SQL: don't include pg_config.hChristoph M. Becker2020-05-251-2/+6
| | | | | | | | | | | | | | | | | | | | | Even if that header file is available, we better consider it private, and don't include it. The information about whether SSL support is enabled is now missing (`USE_(OPEN)SSL`), and it seems there is no alternative way to get it (`PQinitSSL()` is always defined), so we remove it from the PHP info. Furthermore, the `PG_VERSION` and `PG_VERSION_STR` macros are no longer available, but as of libpq 9.1 there is `PQlibVersion()` which allows us to construct `PG_VERSION` in a most likely backwards compatible manner. The additional information available through `PG_VERSION_STR` is lost, though, so we define `PGSQL_LIBPQ_VERSION_STR` basically as alias of `PGSQL_LIBPQ_VERSION`, and deprecate it right away. Since we are now requiring at least libpq 9.1, we can remove some further compatibility code and additional checks. Regarding the raised requirements: official support for PostGreSQL 9.0 ended on 2015-10-08, and even CentOS 7 already has PostGreSQL 9.2, so this is not supposed to be too much of an issue.
* [skip-ci] Update UPGRADINGGeorge Peter Banyard2020-05-221-0/+4
| | | | Add upgrading note for mixed type and removal of curly braces offset syntax
* Raise ext/pgsql requirements to PostGreSQL 7.4Christoph M. Becker2020-05-221-0/+3
| | | | | | | We can safely assume that users have at the very least libpq 7.4, for which official support ended on 2010-10-01; even CentOS 6 has 8.4 now. It is also noteworthy that PDO_PGSQL already requires libpq 7.4 or later.
* Add support for replaying warnings in opcacheNikita Popov2020-05-201-0/+5
| | | | | | | | | If opcache.record_warnings is enabled, opcache will record compilation warnings and replay them when the file is included again. The primary use case I have in mind for this is automated testing of the opcache file cache. This resolves bug #76535.
* Convert resource to object in SysvmsgMáté Kocsis2020-05-141-0/+5
| | | | Closes GH-5546
* Revert "doc for enchant Object move"Remi Collet2020-05-131-8/+0
| | | | This reverts commit 2c63324a4eabf3f8bdf9585c8dae4527dca2e41f.
* doc for enchant Object moveRemi Collet2020-05-131-0/+8
|
* Convert resource to object in XML-RPC extensionMáté Kocsis2020-05-131-0/+6
| | | | Closes GH-5457
* Deprecate old ReflectionParameter type declaration APIsNikita Popov2020-05-111-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | This deprecates: ReflectionParameter::isArray() ReflectionParameter::isCallable() ReflectionParameter::getClass() These APIs have been superseded by ReflectionParameter::getType() since PHP 7.0. Types introduced since that time are not available through the old APIs, and their behavior is getting increasingly confusing. This is how they interact with PHP 8 union types: * isArray() will return true if the type is array or ?array, but not any other union type * Same for isCallable(). * getClass() will return a class for T|int etc, as long as the union only contains a single type. T1|T2 will return null. This behavior is not particularly reasonable or useful, and will get more confusing as new type system extensions are added. Closes GH-5209.
* Add get_resource_id() functionNikita Popov2020-05-111-0/+4
| | | | | | | | Behavior is same as for (int) $resource, just under a clearer name. Also type-safe, in that the parameter actually needs to be a resource. Closes GH-5427.
* Make float to string casts locale-independentMáté Kocsis2020-05-081-0/+2
| | | | | | | | From now on, float to string casting will always behave locale-independently. RFC: https://wiki.php.net/rfc/locale_independent_float_to_string Closes GH-5224 Co-authored-by: George Peter Banyard <girgias@php.net>
* Rename the recently introduced Sysvsem class to SysvSemaphoreMáté Kocsis2020-05-071-1/+1
|
* Convert resource to object in ext/sysvsemMáté Kocsis2020-05-061-0/+5
| | | | Closes GH-5508
* Make numeric operations on resources, arrays and objects type errorsNikita Popov2020-05-051-1/+8
| | | | | | RFC: https://wiki.php.net/rfc/arithmetic_operator_type_checks Closes GH-5331.
* Add str_starts_with() and str_ends_with()William Hudgins2020-05-051-3/+10
| | | | | | RFC: https://wiki.php.net/rfc/add_str_starts_with_and_ends_with_functions Closes GH-5300.
* Change the default PDO error mode to exceptionsAllenJB2020-05-041-0/+4
| | | | According to <https://www.php.net/manual/en/pdo.error-handling.php>.
* Use libenchant-2 when availableRemi Collet2020-05-041-0/+5
|
* Fix #79467: data:// wrappers are writableChristoph M. Becker2020-05-031-0/+1
| | | | | | | | Despite the docs claiming that data: wrappers would not be writable[1], they are implemented as writing to a memory stream. That does not seem to be particularly sensible, so we disallow writing altogether. [1] <https://www.php.net/manual/en/wrappers.data.php#refsect1-wrappers.data-options>
* [skip ci] Fix a typo in UPGRADINGTyson Andre2020-05-011-1/+1
| | | | | | Confirmed that php_zip.c checks for `"enc_password"` Closes GH-5503
* Do not inherit LC_CTYPE locale from environmentNikita Popov2020-04-301-0/+6
| | | | | | | | | | | | | | | | | | Treatment of locales in PHP is currently inconsistent: The LC_ALL locale is set to "C", as is standard behavior on program startup. The LC_CTYPE locale is set to "", which will inherit it from the environment. However, the inherited LC_CTYPE locale will only be used in some cases, while in other cases it is necessary to perform an explicit setlocale() call in PHP first. This is the case for the locale-sensitive handling in the PCRE extension. Make things consistent by *never* inheriting any locales from the environment. LC_ALL, including LC_CTYPE will be "C" on startup. A locale can be set or inherited through an explicit setlocale() call, at which point the behavior will be fully consistent and predictable. Closes GH-5488.
* Completely remove disabled functions from function tableNikita Popov2020-04-301-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, disabling a function only replaces the internal function handler with one that throws a warning, and a few places in the engine special-case such functions, such as function_exists. This leaves us with a Schrödinger's function, which both does not exist (function_exists returns false) and does exist (you cannot define a function with the same name). In particular, this prevents the implementation of robust polyfills, as reported in https://bugs.php.net/bug.php?id=79382: if (!function_exists('getallheaders')) { function getallheaders(...) { ... } } If getallheaders() is a disabled function, this code will break. This patch changes disable_functions to remove the functions from the function table completely. For all intents and purposes, it will look like the function does not exist. This also renders two bits of PHP functionality obsolete and thus deprecated: * ReflectionFunction::isDisabled(), as it will no longer be possible to construct the ReflectionFunction of a disabled function in the first place. * get_defined_functions() with $exclude_disabled=false, as get_defined_functions() now never returns disabled functions. Fixed bug #79382. Closes GH-5473.
* doc enchant changesRemi Collet2020-04-301-0/+11
|
* Allow optional trailing comma in parameter listNikita Popov2020-04-281-0/+2
| | | | | | RFC: https://wiki.php.net/rfc/trailing_comma_in_parameter_list Closes GH-5306.
* Make throw statement an expressionIlija Tovilo2020-04-231-0/+3
| | | | | | | | | | RFC: https://wiki.php.net/rfc/throw_expression This has an open issue with temporaries that are live at the time of the throw being leaked. Landing this now for easier testing and will revert if we cannot resolve the issue. Closes GH-5279.
* Fix typo in UPGRADING [ci skip]Jacob Dreesen2020-04-231-1/+1
|
* Add get_debug_type() functionYour Name2020-04-231-0/+4
| | | | RFC: https://wiki.php.net/rfc/get_debug_type
* Remove support for libmysqlclient 5.0Nikita Popov2020-04-231-0/+4
| | | | Closes GH-5391.
* Skip non-existing properties returned by __sleep()Nicolas Grekas2020-04-221-0/+3
|
* Document change to ReflectionMethod->isConstructor/isDestructorTyson Andre2020-04-221-1/+4
| | | | | | | | | | See https://externals.io/message/109377 This prevented PHPUnit's test doubles from being created for interfaces. The reason this changed is https://github.com/php/php-src/pull/3846/files#diff-3a8139128d4026ce0cb0c86beba4e6b9L5549-R5605 (ReflectionMethod::isConstruct checks if the method is the zend_class_entry's constructor, etc.)
* Remove support for EBCDICNikita Popov2020-04-201-0/+3
| | | | Closes GH-5390.
* Store default parameter values of internal functions in arg infoMáté Kocsis2020-04-081-0/+6
| | | | | | | Closes GH-5353. From now on, PHP will have reflection information about default values of parameters of internal functions. Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
* news / UPGRADING for zip 1.19.0Remi Collet2020-04-021-1/+6
|
* Add PhpToken classNikita Popov2020-03-261-0/+6
| | | | | | | | | RFC: https://wiki.php.net/rfc/token_as_object Relative to the RFC, this also adds a __toString() method, as discussed on list. Closes GH-5176.