| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
Closes GH-6179
|
|
|
|
|
| |
This makes it line up with pg_fetch_all_columns(), as well as
similar functions in other exts, such as mysqli_fetch_all().
|
|
|
|
|
| |
These have been documentation-deprecated for a very long time,
make it official.
|
|
|
|
|
| |
Given how little maintenance the libmysqlclient driver sees, be
more aggressive in dropping old version support here.
|
|
|
|
| |
Closes GH-6148
|
|
|
|
| |
As the comment indicates, these are deprecated in PHP 4.2...
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Both of these functions are well-defined when used with a single
array argument -- rejecting this case was an artificial limitation.
This is not useful when called with explicit arguments, but removes
edge-cases when used with argument unpacking:
// OK even if $excludes is empty.
array_diff($array, ...$excludes);
// OK even if $arrays contains a single array only.
array_intersect(...$arrays);
This matches the behavior of functions like array_merge() and
array_push(), which also allow calls with no array or a single
array respectively.
Closes GH-6097.
|
|
|
|
| |
Closes GH-5999
|
|
|
|
|
|
|
|
| |
RC4 is considered insecure, and it's not possible to change the
default of these functions. As such, require the method to be
passed explicitly.
Closes GH-6093.
|
|
|
|
|
|
|
| |
crypt() without salt generates a weak $1$ MD5 hash. It has been
throwing a notice since 2013 and we provide a much better alternative
in password_hash() (which can auto-generate salts for strong
password hashes), so keeping this is just a liability.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If we do not specify the exact version of the .NET framework to use,
the default CLR is loaded, which is typically CLR 2, which is very old.
Therefore, we introduce a `PHP_INI_SYSTEM` setting, which allows users
to choose the desired .NET framework version. The value of the setting
are the first three parts of the framework's version number, separated
by dots, and prefixed with "v", e.g. "v4.0.30319". If the value of the
INI setting is `NULL` (the default) or an empty string, the default CLR
is used.
Internally, we switch from the most generic `CoCreateInstance()` to
`CorBindToRuntime()` which is implemented in mscoree.dll. To avoid the
hard dependency to that library, we load dynamically.
So this fix is supposed to be fully backwards compatible.
Closes GH-5949
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
User-defined functions can't have multiple parameters with the same name.
Don't do that for var_dump/debug_zval_dump.
Consistently use array $array to match docs
Fix typo in UPGRADING
Fixes GH-6015
|
| |
|
|
|
|
|
|
| |
Mention the case from bug #79942.
[ci skip]
|
|
|
|
|
| |
This reverts commit 1ab4d0e6b7abb67d5a01ce3327bf973772271fb2.
This reverts commit a359635cb1a4df8b5137a506c88c4cb102acac0e.
|
| |
|
| |
|
|
|
|
| |
[ci skip]
|
|
|
|
|
|
|
|
|
|
| |
This method was used to protect code against XXE processing attacks.
Since PHP now requires libxml >= 2.9.0 external entity loading no longer
needs to be disabled to prevent these attacks. It is disabled by default.
Also, the method has an unwanted side effect that causes a lot of
confusion: Parsing XML data from resources like files is no longer possible.
Closes GH-5867.
|
|
|
|
|
|
| |
Since libxml version 2.9.0 external entity loading is disabled by default.
Bumping the version requirement means that XML processing in PHP is no
longer vulnerable to XXE processing attacks by default.
|
|
|
|
|
|
|
|
|
|
| |
This option allows getting status from different endpoint (e.g. port
or UDS file) which is useful for getting status when all children are
busy with serving long running requests.
Internally a new shared pool with ondemand process manager is used. It
means that the status requests have reserved resources and should not
be blocked by other requests.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In other words, don't automatically unserialize when the magic
phar:// stream wrappers are used.
RFC: https://wiki.php.net/rfc/phar_stop_autoloading_metadata
Also, change the signature from `getMetadata()`
to `getMetadata(array $unserialize_options = [])`.
Start throwing earlier if setMetadata() is called and serialization threw.
See https://externals.io/message/110856 and
https://bugs.php.net/bug.php?id=76774
This was refactored to add a phar_metadata_tracker for the following reasons:
- The way to properly copy a zval was previously implicit and undocumented
(e.g. is it a pointer to a raw string or an actual value)
- Avoid unnecessary serialization and unserialization in the most common case
- If a metadata value is serialized once while saving a new/modified phar file,
this allows reusing the same serialized string.
- Have as few ways to copy/clone/lazily parse metadata (etc.) as possible,
so that code changes can be limited to only a few places in the future.
- Performance is hopefully not a concern - copying a string should be faster
than unserializing a value, and metadata should be rare in most cases.
Remove unnecessary skip in a test(Compression's unused)
Add additional assertions about usage of persistent phars
Improve robustness of `Phar*->setMetadata()`
- Add sanity checks for edge cases freeing metadata, when destructors
or serializers modify the phar recursively.
- Typical use cases of php have phar.readonly=1 and would not be affected.
Closes GH-5855
|
|
|
|
|
|
|
|
|
|
| |
In practice, we always act as an HTTP/1.1 client, for compatibility
with servers which ignore protocol version. Sending the version in
the request will avoid problems with servers which don't ignore it.
HTTP/1.0 can still be forced using a stream context option.
Closes GH-5899.
|
|\
| |
| |
| |
| | |
This changes assert.exception to default to 1, or on by default.
Closes GH-5925.
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
This implements the last remaining part of the
https://wiki.php.net/rfc/engine_warnings RFC.
Closes GH-5927.
|
|/ |
|
| |
|
|
|
|
|
|
| |
The PHP error message says "well-formed", not "well formed"
Fixes GH-5920
|
|
|
|
|
|
| |
Closes GH-5860
Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, it's possible to override `php -a`s completion
functionality to provide an alternative to the C implementation,
with `readline_completion_function()`.
However, that surprisingly gets overridden when called from
`auto_prepend_file`, because those scripts get run before the interactive shell
is started. I believe that not overriding it would be more consistent
with what happens when you override the completion function **after** the
interactive shell.
CLI is the only built-in API that uses this (See discussion in GH-5872).
I believe MINIT and RINIT will only run once when invoked with `php -a`.
Add documentation about the architecture of how php uses readline/libedit
Closes GH-5872
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From an engine perspective, named parameters mainly add three
concepts:
* The SEND_* opcodes now accept a CONST op2, which is the
argument name. For now, it is looked up by linear scan and
runtime cached.
* This may leave UNDEF arguments on the stack. To avoid having
to deal with them in other places, a CHECK_UNDEF_ARGS opcode
is used to either replace them with defaults, or error.
* For variadic functions, EX(extra_named_params) are collected
and need to be freed based on ZEND_CALL_HAS_EXTRA_NAMED_PARAMS.
RFC: https://wiki.php.net/rfc/named_params
Closes GH-5357.
|
|
|
|
| |
[ci skip]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
RFC: https://wiki.php.net/rfc/saner-numeric-strings
This removes the -1 allow_error mode from is_numeric_string functions and replaces it by
a trailing boolean out argument to preserve BC in a couple of places.
Most of the changes can be resumed to "numeric" strings which emitted a E_NOTICE now emit
a E_WARNING and "numeric" strings which emitted a E_WARNING now throw a TypeError.
This mostly affects:
- String offsets
- Arithmetic operations
- Bitwise operations
Closes GH-5762
|
|
|
|
|
|
|
|
| |
RFC: https://wiki.php.net/rfc/shorter_attribute_syntax
Closes GH-5796.
Co-authored-by: Martin Schröder <m.schroeder2007@gmail.com>
|
|
|
|
| |
For GH-5769 (mentioned in 07db64156e180c30daa5ab5d41ed72f9bba77e6d)
|
|
|
|
|
|
|
|
|
|
| |
Don't expose references in debug_backtrace() or exception traces.
This is regardless of whether the argument is by-reference or not.
As a side-effect of this change, exception traces may now acquire
the interior value of a reference, which may be unexpected for
some internal functions. This is what necessitated the change in
the spl_array sort implementation.
|
| |
|
|
|
|
| |
This was deprecated in PHP 7.4.
|
|
|
|
|
|
|
|
| |
RFC: https://wiki.php.net/rfc/nullsafe_operator
Closes GH-5619.
Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
|
|
|
|
|
|
|
|
|
| |
Namespace names are now lexed as single tokens of type
T_NAME_QUALIFIED, T_NAME_FULLY_QUALIFIED or T_NAME_RELATIVE.
RFC: https://wiki.php.net/rfc/namespaced_names_as_token
Closes GH-5827.
|
|
|
|
|
|
| |
RFC: https://wiki.php.net/rfc/string_to_number_comparison
Closes GH-3886.
|
|
|
|
| |
[ci skip]
|
|
|
|
| |
Closes GH-5401
|
|
|
|
| |
Closes GH-5777.
|
|
|
|
|
|
|
| |
I added this to UPGRADING.INTERNALS, but it should also be
mentioned in UPGRADING, as it affects user-visible behavior.
[ci skip]
|
|
|
|
| |
[ci skip]
|