Commit Graph

133129 Commits

Author SHA1 Message Date
Peter Kokot
32cdd330f3
Remove unneeded zend_language_parser.h patch (#11974)
This was cleaned in 4cbffd89d9 and
patching the Zend/zend_language_parser.h file to include zend.h is not
needed anymore.
2023-08-22 11:21:42 +02:00
Peter Kokot
adc4a48d26
Fix configure phpdbg help output (#12013)
By default phpdbg is enabled (--enable-phpdbg) and user can get info in
the `./configure --help` output if they want to disable it like with the
other configuration options.
2023-08-22 02:52:06 +01:00
Peter Kokot
e199104a35
Fix passing null to parameter of type string (#12014)
This fixes builds without cgi or phpdbg:
  ./configure --disable-cgi --disable-phpdbg
  make
  ./sapi/cli/php run-tests.php

Otherwise, deprecation warnings (since PHP-8.1) are emitted:
  Deprecated: escapeshellarg(): Passing null to parameter #1 ($arg) of
  type string is deprecated in run-tests.php...
2023-08-22 02:51:31 +01:00
Peter Kokot
9026596fe9
Sync --enable-mysqlnd-compression-support option (#12006)
This syncs the style of the --enable-mysqlnd-compression-support option
name, otherwise in Autoconf both --enable-foo_bar and --enable-foo-bar
work.

Also the configure output message is synced to match the check
information.
2023-08-21 16:38:04 +02:00
Ayesh Karunaratne
1887f02b0b
Add class constant types to Phar extension (#11826) 2023-08-21 07:14:45 +02:00
Peter Kokot
278a57f95a
Add all README.* files to paths-ignore (#12003)
Within the entire repository these are documentation files and CI don't
need to run when they are changed.

This now includes also README.REDIST.BINS, README.md, and similar README
files within the sapi and ext directories.

README files in tests directories are also only for internals
documentations purposes.
2023-08-20 21:53:45 +02:00
Ayesh Karunaratne
e6627ccb52
gen_stub: fix regexps with unintentional range due to - character placement (#12004) 2023-08-20 14:20:56 +02:00
Niels Dossche
807a05ee55 Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix memory leak when setting an invalid DOMDocument encoding
2023-08-20 14:07:44 +02:00
Niels Dossche
767697c4ae Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix memory leak when setting an invalid DOMDocument encoding
2023-08-20 14:07:25 +02:00
Niels Dossche
20ac42e1b0 Fix memory leak when setting an invalid DOMDocument encoding
Because the failure path did not release the string, there was a memory
leak.
As the only valid types for this function are IS_NULL and IS_STRING, we
and IS_NULL is always rejected in practice, solve the issue by not using
a function that increments the refcount in the first place.

Closes GH-12002.
2023-08-20 14:05:26 +02:00
David Carlier
0d65f726c8 Merge branch 'PHP-8.2' 2023-08-19 23:11:23 +01:00
David Carlier
f995c0df36 Merge branch 'PHP-8.1' into PHP-8.2 2023-08-19 23:09:41 +01:00
David Carlier
fc8d5c72e5 ext/iconv: fix build for netbsd.
NetBSD still adopts the old iconv signature for buffer inputs.
The next release will too so we can assume it will remain that way for
a while.

Close GH-12001
2023-08-19 23:09:22 +01:00
Sergey Panteleev
b94f9f68a6
Merge branch 'PHP-8.2'
* PHP-8.2:
  Remove `mysqli.reconnect` from php.ini files (#11836)
2023-08-19 22:54:44 +03:00
jrfnl
85661a35f0
Remove mysqli.reconnect from php.ini files (#11836)
The `mysqli.reconnect` ini directive was removed in PHP 8.2.0.
2023-08-19 22:54:21 +03:00
Peter Kokot
c180e9b48a
Remove unused call to Makefile.frag in ext/zip
The Makefile.frag has been removed in ext/zip.
2023-08-19 17:41:05 +02:00
ju1ius
7f1c3bf09b
Adds support for DNF types in internal functions and properties (#11969)
Note that this does not add support for items generated by gen_stubs,
only for items registered dynamically via the Zend API.

Closes GH-10120
2023-08-19 00:11:06 +01:00
Niels Dossche
4ff93f779c Remove unnecessary invalidation from processing instructions
These invalidations only need to happen when elements are added,
removed, or manipulated. Processing instructions are not elements and
their contents are just text.
2023-08-18 18:06:04 +02:00
Kamil Tekiela
ee82c94208
Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix failing test on nightly
2023-08-17 18:46:28 +01:00
Kamil Tekiela
6d039d282a
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix failing test on nightly
2023-08-17 18:45:49 +01:00
Kamil Tekiela
ffd398b4fe
Fix failing test on nightly 2023-08-17 18:45:10 +01:00
Ilija Tovilo
1b9ff16f92
Merge branch 'PHP-8.2'
* PHP-8.2:
  Remove redundant condition
2023-08-17 18:55:51 +02:00
Ilija Tovilo
d016c49cf5
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Remove redundant condition
2023-08-17 18:55:45 +02:00
Ilija Tovilo
dd01c74a6f
Remove redundant condition
Never refactor code just before pushing
2023-08-17 18:54:30 +02:00
Ilija Tovilo
48ede64506
Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix segfault in format_default_value due to unexpected enum/object
2023-08-17 18:44:37 +02:00
Ilija Tovilo
9437aa9a8e
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix segfault in format_default_value due to unexpected enum/object
2023-08-17 18:43:49 +02:00
Ilija Tovilo
f78d1d0d10
Fix segfault in format_default_value due to unexpected enum/object
Evaluating constants at comptime can result in arrays that contain objects. This
is problematic for printing the default value of constant ASTs containing
objects, because we don't actually know what the constructor arguments were.
Avoid this by not propagating array constants.

Fixes GH-11937
Closes GH-11947
2023-08-17 18:43:11 +02:00
Kamil Tekiela
7e4ca2e8d9
Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix implicit/explicit port in mysqlnd

Closes GH-11990
2023-08-16 20:34:48 +01:00
Kamil Tekiela
06bda99280
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix implicit/explicit port in mysqlnd
2023-08-16 20:33:52 +01:00
Kamil Tekiela
c1103a9772
Fix implicit/explicit port in mysqlnd 2023-08-16 18:59:07 +01:00
Niels Dossche
2b61f71046 Add test for SimpleXMLElement::asXML() with a fragment and a filename 2023-08-16 08:27:43 +02:00
Ayesh Karunaratne
543eedf9e1
[skip-ci] minor typo fixes in UPGRADING and CONTRIBUTING.md (#11976) 2023-08-16 07:51:56 +02:00
Pierrick Charron
baaa37ff78
Merge branch 'PHP-8.2'
* PHP-8.2:
  PHP-8.2 is now for PHP 8.2.11-dev
2023-08-15 16:10:02 -04:00
Pierrick Charron
4467f33e89
PHP-8.2 is now for PHP 8.2.11-dev 2023-08-15 16:08:52 -04:00
Eric Mann
32fa67331b
Update NEWS for PHP 8.3.0beta3 2023-08-15 12:45:42 -07:00
Patrick Allaert
5713bc312a
Merge branch 'PHP-8.2' 2023-08-15 21:10:25 +02:00
Patrick Allaert
6e8f5e091e
Merge branch 'PHP-8.1' into PHP-8.2 2023-08-15 21:10:06 +02:00
Patrick Allaert
6e3f93f2f8
PHP-8.1 is now for PHP 8.1.24-dev 2023-08-15 21:09:58 +02:00
Niels Dossche
d46dc5694c Fix various namespace prefix conflict resolution bugs and namespace shift bugs
There are two linked issues:

- Conflicts couldn't be resolved by changing the prefix name.
- Lacking a prefix would shift the namespace as the default namespace,
  causing elements to suddenly become part of the namespace instead of
  the attributes.

The output could still be improved by removing redundant namespace
declarations, but that's another issue. At least the output is
correct now.

Closes GH-11777.
2023-08-15 20:42:42 +02:00
George Peter Banyard
82972f448f Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix various bugs related to DNF types
2023-08-15 17:01:51 +01:00
George Peter Banyard
02a80c5b82 Fix various bugs related to DNF types
- GH-11958: DNF types in trait properties do not get bound properly
 - GH-11883: Memory leak in zend_type_release() for non-arena allocated DNF types
 - Internal trait bound to userland class would not be arena allocated
 - Property DNF types were not properly deep copied during lazy loading

Co-authored-by: Ilija Tovilo <ilija.tovilo@me.com>
Co-authored-by: ju1ius <jules.bernable@gmail.com>
2023-08-15 15:34:33 +01:00
Niels Dossche
63a7f225ea Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix #81992: SplFixedArray::setSize() causes use-after-free
2023-08-14 21:38:36 +02:00
Niels Dossche
0b516aea25 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix #81992: SplFixedArray::setSize() causes use-after-free
2023-08-14 21:34:04 +02:00
Niels Dossche
b71c6b2c6c Fix #81992: SplFixedArray::setSize() causes use-after-free
Upon resizing, the elements are destroyed from lower index to higher
index. When an element refers to an object with a destructor, it can
refer to a lower (i.e. already destroyed) element, causing a uaf.
Set refcounted zvals to NULL after destroying them to avoid a uaf.

Closes GH-11959.
2023-08-14 21:32:22 +02:00
Kamil Tekiela
0b887042ae
mysqli_field_seek return type changed to true (#11948) 2023-08-14 19:04:34 +01:00
Ayesh Karunaratne
27fb8d1c0c
Fix DateTime exception hierarchy for DateInvalidTimeZoneException (#11970)
`DateInvalidTimeZoneException` is supposed to inherit from `DateException`, but the current stub has `Exception`.
2023-08-14 18:55:38 +02:00
Ilija Tovilo
09e63e4a09
Merge branch 'PHP-8.2'
* PHP-8.2:
  ci update freebsd image to the 13.2 image (#11110)
2023-08-14 16:30:23 +02:00
Ilija Tovilo
231a1f81c6
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  ci update freebsd image to the 13.2 image (#11110)
2023-08-14 16:30:14 +02:00
David CARLIER
2012fd3f04
ci update freebsd image to the 13.2 image (#11110) 2023-08-14 16:30:01 +02:00
Niels Dossche
17b3af2958 GH-11964: In ext/date/php_date.stub.php, DateRangeError extends itself
According to the RFC[1] it's supposed to extend DateError.

[1] https://wiki.php.net/rfc/datetime-exceptions
2023-08-14 13:57:09 +02:00