Commit Graph

136901 Commits

Author SHA1 Message Date
David CARLIER
2aeff2c988
main: update Winsock api version to 2.2 (#14909)
not been updated since php 4 whereas 2.2 is available even in Win2000.
2024-07-17 14:17:29 +01:00
Saki Takamachi
3c9ab6eb71
ext/bcmath: Moved macros and added a test 2024-07-17 21:48:16 +09:00
Saki Takamachi
acd6ac3324
Fixed parent class of stub (#14990) 2024-07-17 21:38:59 +09:00
Saki Takamachi
d55ef3f339
ext/pdo_firebird: Added Pdo\Firebird::ATTR_API_VERSION (#14916)
closes #14916
2024-07-17 20:32:37 +09:00
Niels Dossche
b2c3f2fead
Delete bug78987.phpt test (#14982)
This test fails over and over again every time we update the library or
because of small changes elsewhere. This leads to a cycle of test
failures and us bumping the values again. This test has little value so
I propose to just get rid of it.

Fixes GH-13795.
2024-07-17 12:59:17 +02:00
Christoph M. Becker
f590b34530
Drop support for OpenSSL < 1.1.0 on Windows
PR #13498 bumped the required OpenSSL version to 1.1.1, but apparently
only for non Windows system.  We catch up somewhat by dropping support
for OpenSSL < 1.1.0 on Windows; besides completely removing detection
of old OpenSSL versions in `SETUP_OPENSSL`, we also ensure that all
bundled extension using this function do no longer accept OpenSSL <
1.1.0, to avoid to still be able to build these extensions with older
`phpize` scripts.

We do not cater to `--phar-native-ssl` yet; that might better be
addressed by #14578.

Closes GH-14973.
2024-07-17 12:22:59 +02:00
Ilija Tovilo
ead679ecf8
Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix comments between -> and keyword
2024-07-16 23:41:07 +02:00
Ilija Tovilo
e01e2bb5fd
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix comments between -> and keyword
2024-07-16 23:40:59 +02:00
Ilija Tovilo
b368db204f
Fix comments between -> and keyword
Comments should not fall out of ST_LOOKING_FOR_PROPERTY.

Fixes GH-14961
Closes GH-14976
2024-07-16 23:40:18 +02:00
Ilija Tovilo
fdbe910b3b
Fix indirect readonly error messages (#14979)
$obj->ro[] = 42;, passByRef($obj->ro); and the likes should emit an indirect
modification error message. This message already existed but was used
inconsistently.
2024-07-16 23:24:07 +02:00
Peter Kokot
71c520c74f
Fix xmlreader extension phpize build
When building ext/xmlreader with phpize, also ext/dom/dom_ce.h needs to
be installed by dom extension as it is used in
the ext/xmlreader/php_xmlreader.c.

    cd ext/xmlreader
    phpize
    ./configure
    make

Closes GH-14978
2024-07-16 22:35:59 +02:00
Niels Dossche
eb181926be
[ci skip] Fix NEWS 2024-07-16 22:25:41 +02:00
Niels Dossche
251b7896ff
Use fast ZPP for ParentNode manipulation methods (#14981)
These are very common, and parsing variadic arguments takes a very long
time, so this optimization makes sense to do.
2024-07-16 20:36:24 +02:00
Niels Dossche
f58a3c392f
Fix references in request_parse_body() options array
Otherwise we get funny messages like
"Invalid string value in $options argument".

Closes GH-14977.
2024-07-16 20:07:59 +02:00
Saki Takamachi
c4f1c5cd9f
Updated firebird version in windows ci (#14912) 2024-07-16 19:56:14 +02:00
Julien Voisin
ae2abcf3e8
Add a check for required extensions in benchmark.php (#14811)
This should prevent people from being disappointed by
an unexpected error message when running the benchmark,
namely:

```
jvoisin@chernabog 21:54 (master) ~/dev/php-src php ./benchmark/benchmark.php false sapi/cgi/php-cgi
> 'valgrind' '--tool=callgrind' '--dump-instr=yes' '--callgrind-out-file=/home/jvoisin/dev/php-src/benchmark/profiles/callgrind.out.bench' '--' 'sapi/cgi/php-cgi' '-T1' '-d max_execution_time=0' '-d opcache.enable=1' '-d opcache.jit=disable' '-d opcache.jit_buffer_size=128M' '-d opcache.validate_timestamps=0' '/home/jvoisin/dev/php-src/Zend/bench.php'
> 'valgrind' '--tool=callgrind' '--dump-instr=yes' '--callgrind-out-file=/home/jvoisin/dev/php-src/benchmark/profiles/callgrind.out.bench.jit' '--' 'sapi/cgi/php-cgi' '-T1' '-d max_execution_time=0' '-d opcache.enable=1' '-d opcache.jit=tracing' '-d opcache.jit_buffer_size=128M' '-d opcache.validate_timestamps=0' '/home/jvoisin/dev/php-src/Zend/bench.php'
> '/usr/bin/php' '/home/jvoisin/dev/php-src/benchmark/repos/symfony-demo-2.2.3/bin/console' 'cache:clear'
> '/usr/bin/php' '/home/jvoisin/dev/php-src/benchmark/repos/symfony-demo-2.2.3/bin/console' 'cache:warmup'
> 'valgrind' '--tool=callgrind' '--dump-instr=yes' '--callgrind-out-file=/home/jvoisin/dev/php-src/benchmark/profiles/callgrind.out.symfony-demo' '--' 'sapi/cgi/php-cgi' '-T50,50' '-d max_execution_time=0' '-d opcache.enable=1' '-d opcache.jit=disable' '-d opcache.jit_buffer_size=128M' '-d opcache.validate_timestamps=0' '/home/jvoisin/dev/php-src/benchmark/repos/symfony-demo-2.2.3/public/index.php'
PHP Fatal error:  Uncaught Error: Call to undefined function gmp_strval() in /home/jvoisin/dev/php-src/benchmark/benchmark.php:128
Stack trace:
  thrown in /home/jvoisin/dev/php-src/benchmark/benchmark.php on line 128
[255]
jvoisin@chernabog 12:05 (master) ~/dev/php-src
```
2024-07-16 19:37:20 +02:00
Pierrick Charron
f0dc7ad5ce
Merge branch 'PHP-8.3'
* PHP-8.3:
  [skip ci] Fix PHP 8.3.10 release date and version in NEWS
  PHP-8.2 is now for PHP 8.2.23-dev
2024-07-16 12:24:03 -04:00
Pierrick Charron
c21cfa1135
[skip ci] Fix PHP 8.3.10 release date and version in NEWS 2024-07-16 12:23:31 -04:00
Pierrick Charron
e7e09c80f8
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  PHP-8.2 is now for PHP 8.2.23-dev
2024-07-16 12:21:30 -04:00
Pierrick Charron
e07813ad46
PHP-8.2 is now for PHP 8.2.23-dev 2024-07-16 12:20:55 -04:00
Ilija Tovilo
a26ec58fa1
De-duplicate readonly property modification error message (#14972) 2024-07-16 16:29:40 +02:00
Tim Düsterhus
551038bb16
zend_compile: Fully remove ZEND_DIM_ALTERNATIVE_SYNTAX (#14974)
This flag is longer set since the merge of property hooks in
780a8280d2. This patch removes it completely,
because the corresponding error messages are unreachable.
2024-07-16 16:27:46 +02:00
Eric Mann
a4c867e8cf
Merge branch 'PHP-8.3' 2024-07-16 06:58:03 -07:00
Eric Mann
155e89e12f
PHP-8.3 is now for PHP 8.3.11-dev 2024-07-16 06:45:20 -07:00
Ayesh Karunaratne
e7c16d2a6a
Build/Windows: Update the Windows icon as svg and build derivatives from it
Co-Authored-By: Nurudin Imsirovic <realnurudinimsirovic@gmail.com>

Closes GH-14964.
2024-07-16 14:47:31 +02:00
Ilija Tovilo
aa006f1cf6
Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix use-after-free in property coercion with __toString()
2024-07-16 12:44:01 +02:00
Ilija Tovilo
aca2322801
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix use-after-free in property coercion with __toString()
2024-07-16 12:43:29 +02:00
Ilija Tovilo
8c312ba74b
Fix use-after-free in property coercion with __toString()
This was only partially fixed in PHP-8.3. Backports and fixes the case for both
initialized and uninitialized property writes.

Fixes GH-14969
Closes GH-14971
2024-07-16 12:40:14 +02:00
Ilija Tovilo
7e022ea056
Avoid duplicate code in zend_std_write_property() (#14966) 2024-07-16 12:08:46 +02:00
Peter Kokot
a2bc783815
Autotools: Add missing sigil in AC_CASE and fix Autoconf syntax (#14967) 2024-07-16 08:55:22 +02:00
Peter Kokot
ccd2787947
[skip ci] Update PHP version in phpdbg help (#14965) 2024-07-16 07:02:05 +02:00
Peter Kokot
9c84d24706
[skip ci] Update UPGRADING.INTERNALS
Related to GH-14963
2024-07-16 00:42:16 +02:00
Calvin Buckley
6635948b7a
Check for iODBC and unixODBC with pkg-config in PDO_ODBC (#14963)
* Check for iODBC and unixODBC with pkg-config in PDO_ODBC

PDO_ODBC required that these backends had their path specified manually,
which was clumsy and contrary to how procedural ODBC checked it. This
adds a pkg-config based path to check for these backends that ignores
the 'dir' part of the flag, so i.e. --with-pdo-odbc=unixODBC should pick
it up from the correct location.

Generic and the special ibm-db2 usecase should be unaffected. The header
situation is unfortunately ugly, and has a workaround; this should also
be cleaned up.

* Move check for valid headers to after

* Use existing CFLAGS for PDO_ODBC header check

...instead of a separate funny variable. It does mean we have to save
and restore the value of CPPFLAGS, as AC_CHECK_HEADERS and friends rely
on that variable instead of CFLAGS.

Co-authored-by: Peter Kokot <peterkokot@gmail.com>

* Move PDO_ODBC_TYPE to AC_DEFINE, simplify CFLAGS handling

The variable PDO_ODBC_INCLUDE becomes redundant, as is the CFLAGS
override for PHP_NEW_EXTENSION if we call PHP_EVAL_INCLINE in the
generic case.

Co-authored-by: Peter Kokot <peterkokot@gmail.com>

* Use same variable names so evals can be combined

* Fix identation

* Suggested shell syntax cleanups

---------

Co-authored-by: Peter Kokot <peterkokot@gmail.com>
2024-07-16 00:40:02 +02:00
Niels Dossche
7b3d7c6338
[ci skip] NEWS for return type change in ext/standard
See 673b4e890c
2024-07-15 23:22:49 +02:00
Ayesh Karunaratne
673b4e890c
ext/standard: change highlight_string()/print_r stub return type from string|bool to string|true (#14959)
* ext/standard: change `highlight_string()` return type from `string|bool` to `string|true`

* ext/standard: change `print_r` return type from `string|bool` to `string|true`
2024-07-15 23:20:32 +02:00
Ilija Tovilo
913157f71f
Extract obtaining of fake scope into function (#14960) 2024-07-15 20:00:15 +02:00
Peter Kokot
694e04499a
Autotools: Sync LIBS and LDFLAGS handling (#14956)
- ZEND_EXTRA_LIBS holds all possible libraries appended during the
  checks related to Zend.m4, moved after the ZEND_INIT check to make it
  more clear, redundant double quotes removed;
- EXTRA_LIBS has already been populated above in the configure.ac
- redundant 'unset LIBS' removed
2024-07-15 12:16:53 +02:00
Niels Dossche
6980eba863
Support templated content
The template element in HTML 5 is special in the sense that it does not
add its contents into the DOM tree, but instead keeps them in a separate
shadow DOM document fragment. Interacting with the DOM tree cannot touch
the elements in the document fragment.

Closes GH-14906.
2024-07-15 11:10:51 +02:00
Niels Dossche
8ad5c64393
Refactor XML serializer such that passing context is easier 2024-07-15 11:02:53 +02:00
Niels Dossche
4ef7539144
Split off private data from the ns mapper 2024-07-15 11:02:52 +02:00
Jorg Adam Sowa
85b7181d7d
Added property hooks words in fuzzer parser dict (#14958) 2024-07-14 22:52:25 +02:00
Peter Kokot
1fe854ebfa
Autotools: Sync quotes in PHP_INSTALL_HEADERS
Follow-up of GH-13213

[skip ci]
2024-07-14 22:16:48 +02:00
Peter Kokot
8e8dc40765
Fix #78757: Enhance sendmail log notice (#14955)
The sendmail is set to default value of /usr/sbin/sendmail if not found
on the host system. This was already properly fixed via GH-5548
(commit 517431892b). This change now
also outputs "no" when searching for sendmail and a minimalistic notice
that default send_mail INI directive has been set to /usr/sbin/sendmail.

Fixes and closes: https://bugs.php.net/78757
2024-07-14 22:00:43 +02:00
Peter Kokot
47d3ce4545
Autotools: Quote RE2C_FLAGS argument (#14950)
This enables and simplifies adding blank-or-newline-separated global
re2c flags to the PHP_PROG_RE2C macro possibly at some point. Fixed just
in case, so this works normally:

    PHP_PROG_RE2C([1.0.3], [--no-generation-date -W -foo])
2024-07-14 20:38:57 +02:00
Ilija Tovilo
20d8151b35
Add cachegrind support for php-cgi warmups (#14952)
Cachegrind supports cg_annotate --diff, which makes it much easier to compare
the performance of two patches.

Co-authored-by: Peter Kokot <peterkokot@gmail.com>
2024-07-14 19:53:16 +02:00
Peter Kokot
0051b73a3e
Autotools: Refactor PHP-FPM /proc/pid filename check (#14949)
- Check wrapped in AC_CACHE_CHECK using php_cv_file_proc_mem variable
- CS synced
2024-07-14 17:20:41 +02:00
Peter Kokot
0e2e8e0f13
Autotools: Quote all PHP_ADD_BUILD_DIR arguments (#14947)
- All arguments quoted for consistency
- m4_normalize used where list of directories becomes a bit simpler to
  read and see the diff
2024-07-14 16:58:43 +02:00
Christoph M. Becker
82fe4a2d48
Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix skip condition of gh13082.phpt
2024-07-14 13:40:38 +02:00
Christoph M. Becker
02a60be24d
Fix skip condition of gh13082.phpt
The test failure is not particularly related to Travis, but rather is
caused by the GD font file to only be suitable for platforms where
`int` stores 32bit values in little endian byte order.  This platform
dependence is documented in the source code[1].  Thus we fix the skip
condition and skip reason accordingly.

An alternative would be to dynamically create the font file just before
running the test, but that appears to be overkill.

[1] <d59691c02f/ext/gd/gd.c (L545-L556)>

Closes GH-14922.
2024-07-14 13:39:49 +02:00
Ilija Tovilo
e38d5107ec
[skip ci] Fix NEWS entry 2024-07-14 13:39:10 +02:00