Commit Graph

136855 Commits

Author SHA1 Message Date
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
Ilija Tovilo
a0c42df4f9
[skip ci] Add property hooks entry to NEWS 2024-07-14 13:37:55 +02:00
Ilija Tovilo
f7649dc103
[skip ci] Fix duplicate core header in NEWS 2024-07-14 13:36:45 +02:00
Christoph M. Becker
a6d1844446
Merge branch 'PHP-8.3'
* PHP-8.3:
  Add test case for GH-13774
2024-07-14 12:48:22 +02:00
Christoph M. Becker
0ed956dc69
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Add test case for GH-13774
2024-07-14 12:47:25 +02:00
Christoph M. Becker
6d0db52896
Add test case for GH-13774
Besides demonstrating the new behavior, this test also ensures that the
bundled and external libgd now behave the same.  It has to be noted,
though, that we only test one of the five code paths.

Closes GH-14945.
2024-07-14 12:46:37 +02:00
Ilija Tovilo
780a8280d2
[RFC] Property hooks (#13455)
RFC: https://wiki.php.net/rfc/property-hooks

Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
2024-07-14 11:55:03 +02:00
Peter Kokot
09d61b6368
Autotools: Refactor curl config.m4 (#14948)
- CS synced
- When checking for libcurl linked against old OpenSSL the LIBS can be
  used instead of LDFLAGS to put -lcurl to proper place. Also, flags
  manipulation variables are wrapped in the AC_CACHE_CHECK commands
  because there is also OpenSSL setup done later in the code which
  changes LDFLAGS, LIBS and/or CFLAGS.
- CFLAGS added to the check to have edge case of -I flags of custom
  installation paths taken into consideration
- All macro arguments quoted
- SSL check simplified a bit
- The HAVE_CURL symbol help text synced
2024-07-14 03:55:23 +02:00
Peter Kokot
35f64bb5e1
Autotools: Trim redundant newlines in PHP_ADD_BUILD_DIR (#14946)
This reduces redundant newlines in the generated configure script while
keeping possible 'dnl' usage before or after this macro call working as
before (backwards compatible).
2024-07-14 00:07:51 +02:00
Peter Kokot
808d5b3047
[ci skip] Add note about --with-openssl-legacy-provider
Added here to have all build system configuration options changes also
at one place for easier overview.

Option added via GH-13951
2024-07-13 23:21:45 +02:00
Peter Kokot
31a21bb0a1
Make ext/fileinfo/generate_patch.sh simpler to use (#14941)
- Shebang added so it can be called with ./generate_patch.sh
- Script changes its working directory to ext/fileinfo (where it is
  located) so it can be also called as ./ext/fileinfo/generate_patch.sh
- Syntax adjusted a bit for using Bourne or a compatible shell (/bin/sh)
- Downloaded files added to .gitignore
2024-07-13 22:38:43 +02:00
David Carlier
79c134a6e8
Merge branch 'PHP-8.3' 2024-07-13 17:00:53 +01:00
David Carlier
10a94f846d
Merge branch 'PHP-8.2' into PHP-8.3 2024-07-13 16:59:30 +01:00
Denis Ryabov
b456ae8d34
Restore Warning instead of Fatal Error in gd_webp.c
According to the docs (https://www.php.net/manual/en/function.imagecreatefromwebp.php and https://www.php.net/manual/en/function.imagewebp.php), `false` should be returned on errors (similar to other functions of the `gd` extension), but actually all errors result in a `Fatal Error`. It doesn't look normal when trying to read an empty file or a file in the wrong format causes the program to stop. The problem seems to be related to a mega-patch that replaced `zend_error` with `zend_error_noreturn` almost everywhere. My patch fixes this behavior by switching from `zend_error_noerror` to `gd_error` (i.e. to `E_WARNING` level). All necessary memory cleanup is already in the code (as it was before the "zend_error_noreturn" patch).

Close GH-13774
2024-07-13 16:58:54 +01:00
Peter Kokot
520787bb93
Autotools: Refactor PDO_ODBC_CHECK_HEADER (#14935)
- Macro renamed to PHP_PDO_ODBC_CHECK_HEADER
- AC_DEFINE_UNQUOTED used instead of PHP_DEF_HAVE
- help texts added to CPP macro definitions
- CS synced a bit
2024-07-13 06:52:25 +02:00
Peter Kokot
1ee4bf1c5f
Autotools: Use LIBS for appending -lonig (#14936)
LDFLAGS is by convention used more for linker options like -s and -L.
The -l option should go to LIBS instead. This does the same check but
is more understandable in the logs and M4 code.
2024-07-13 06:37:58 +02:00
Peter Kokot
fb5d64c300
Autotools: Use FPM_EXTRA_LIBS for SELinux library (#14885)
Instead of appending -lselinux to global LIBS variable, this adds it as
needed only to FPM_EXTRA_LIBS as it was already used in the BUILD_FPM
invocation.

Follow-up of GH-14881
2024-07-13 01:20:44 +02:00
Peter Kokot
2ea79c024c
Autotools: Use FPM_EXTRA_LIBS for apparmor library (#14884)
Instead of appending -lapparmor to global LIBS variable, this adds it as
needed only to FPM_EXTRA_LIBS as it was already used in the BUILD_FPM
invocation.

Follow-up of GH-14881
2024-07-13 01:20:05 +02:00
Peter Kokot
3dd0c11cc3
Autotools: Use FPM_EXTRA_LIBS for systemd library (#14883)
Instead of appending -lsystemd to global LIBS variable, this adds it as
needed only to FPM_EXTRA_LIBS as it was already used in the BUILD_FPM
invocation. Move php_fpm_systemd substitution after its check.

Follow-up of GH-14881
2024-07-13 01:19:16 +02:00
Niels Dossche
1a07bb9252
Fix GH-14873: PHP 8.4 min function fails on typed integer
The problem is that this line in the VM: `ZVAL_NULL(result);` changes the type
of arg1 as well, because after the DFA pass the result and input both use
CV0($result).
We should not contract assignments with CVs in frameless calls with
arguments.
An older attempt is found at GH-14876 that tried to modify the VM/JIT.

Closes GH-14903.
2024-07-13 00:29:09 +02:00
Peter Kokot
8fe127a55e
Autotools: Enhance PHP_EVAL_LIBLINE M4 macro (#14924)
PHP_EVAL_LIBALINE macro processes the given libraries flags (-l) and/or
library paths flags (-L) and appends the -l flags to either LIBS or the
given *_SHARED_LIBADD variables. The -L flags are appended to the
LDFLAGS. The new 3rd argument enables appending libraries to the given
variable in the 2nd argument without manual setting whether the
extension is shared. For example, to simplify usage in SAPIs where
additional libraries need to be appended but they shouldn't go to the
global LIBS. This can be then used in PHP-FPM SAPI to link apparmor,
SELinux, systemd, etc.
2024-07-12 23:48:36 +02:00
Niels Dossche
3703459c3e
Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix GH-14930: Custom stream wrapper dir_readdir output truncated to 255 characters in PHP 8.3
2024-07-12 19:28:37 +02:00
Joe Cai
38501ed48a
Fix GH-14930: Custom stream wrapper dir_readdir output truncated to 255 characters in PHP 8.3
Revert "Reserve less file space if possible in a directory entry"
This reverts commit 00c1e7bf0f.

Closes GH-14933.
2024-07-12 19:26:42 +02:00
Peter Kokot
149abd2fe9
Autotools: Refactor oniguruma invalid KOI8 check (#14928)
- Fixed warning: cast from pointer to integer of different size
  using the intptr_t instead of int type case
- CS synced
- Check wrapped in AC_CACHE_CHECK
- Over-quoted arguments reduced
- Also the include flags added to the check when building with oniguruma
  installed on custom places
2024-07-12 19:26:18 +02:00
Niels Dossche
92c0db398e
Avoid reconciling when cloning into the same document (#14921)
We don't need to reconcile when we clone into the same document because
the namespace mapper is the same. Only when cloning into another
document is the namespace mapper different and do we need a
reconciliation.
2024-07-12 19:23:37 +02:00
Peter Kokot
e935f00fde
Autotools: Simplify the iconv not found error (#14931) 2024-07-12 18:48:22 +02:00
David CARLIER
0f398a437e
sapi/apache: AP_MPMQ_MAX_THREADS is always available. (#14934)
since we upgraded the minimum with 2.4, AP_MPMQ_MAX_THREADS is always
available (since 2.3) and all MPM return a value, including prefork.
2024-07-12 13:22:24 +01:00
Peter Kokot
79215c0727
Autotools: Sync CS for PHP_EBCDIC and PHP_C_BIGENDIAN (#14923)
- Over-quoted arguments reduced
- CS synced a bit
- AS_VAR_IF used instead of raw shell "if test"
2024-07-12 09:05:53 +02:00
Peter Kokot
58a3ab92c3
Autotools: Fix config.status script syntax (#14929)
The init-cmds argument is appended to the config.status script with cat
command and variables $var are replaced during the cat step to their
values, so quoting these values fixes the syntax errors.

* Simplify threaded Apache build detection

Instead of checking for entire "grepped" string, this only checks for
yes|no values instead.

* Redirect the standard output and standard error

The "grep -q" is not portable according to docs so this redirects the
output and checks the exit status.

Fixes report in GH-14872
2024-07-12 02:16:49 +02:00
David CARLIER
246357607c
sapi/apache2handler: function using char * to const char *. (#14925) 2024-07-12 00:34:00 +01:00
Peter Kokot
33928a05a4
Update config.guess to 2024-01-01 and config.sub to 2024-01-01 (#14898)
```
wget -O build/config.guess https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
wget -O build/config.sub https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
```
2024-07-11 21:31:47 +02:00
Saki Takamachi
be4b10e95e
Added scale to bc_compare argument (#14802)
In the original specification, the scale of bc_num was directly changed
and compared.

This becomes a problem when objects are supported, so we will modify it
to compare without changing bc_num.
2024-07-12 00:08:47 +09:00
Christoph M. Becker
32bf50a1d8
Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix GH-14888: README.REDIST.BINS refers to non-existing LICENSE [ci skip]
2024-07-11 16:40:39 +02:00
Christoph M. Becker
a23775a30d
Fix GH-14888: README.REDIST.BINS refers to non-existing LICENSE [ci skip]
The LICENSE file of libmagic had been inadvertently removed when the
lib had been upgraded to 5.43.  So we add the file `COPYING` from that
release[1], and rename it to `LICENSE`.

[1] <https://github.com/file/file/releases/tag/FILE5_43>

Closes GH-14917.
2024-07-11 16:39:22 +02:00
Peter Kokot
5586d0c7de
Autotools: Refactor ptrace check for PHP-FPM (#14907)
- This syncs CS and wraps ptrace function check in a single
  AC_CACHE_CHECK for optional edge case cross-compiling adjustments
- Overquoted arguments are reduced (first the compilation check if
  ptrace in proper form is available on the system and then the run
  check if ptrace works as expected)
- The cache variable php_cv_have_mach_vm_read is renamed to
  php_cv_func_mach_vm_read.
2024-07-11 00:09:08 +02:00
Peter Kokot
d59691c02f
Autotools: Move php_shtool variable initialization to PHP_INIT_BUILD_SYSTEM (#14904)
As this script is still needed across the PHP build system its path can
be also set on once place for both phpize usage and regular php-src's
configure.ac.
2024-07-10 21:15:02 +02:00
David Carlier
17cf7b381a
ext/pcntl adding Pcntl namespace for Qos class.
Close GH-14892
2024-07-10 19:15:04 +01:00
Niels Dossche
71defce4be
Merge branch 'PHP-8.3'
* PHP-8.3:
  ext/gd/tests/gh10614.phpt: skip if no PNG support
2024-07-10 19:51:17 +02:00
Niels Dossche
361644b78d
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  ext/gd/tests/gh10614.phpt: skip if no PNG support
2024-07-10 19:51:11 +02:00
Michael Orlitzky
09957ab9a8
ext/gd/tests/gh10614.phpt: skip if no PNG support
This test uses imagecreatefrompng(), which won't be there if libgd was
built without PNG support.

Closes GH-14905.
2024-07-10 19:50:48 +02:00
Tim Düsterhus
29f98e7485
Replace @deprecated by #[\Deprecated] for internal functions / class constants (#14750)
Co-authored-by: Gina Peter Banyard <girgias@php.net>
Co-authored-by: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
2024-07-10 16:47:31 +02:00
Michael
6bb960092a
[skip ci] Fix some typos (#14893) 2024-07-10 00:11:36 +01:00
David CARLIER
93c3ebd209
ext/gd minor corrections concerning image format id for errors. (#14887) 2024-07-09 20:07:07 +01:00
Peter Kokot
9185f613e0
Autotools: Use FPM_EXTRA_LIBS for ACL library (#14881)
- ACL user/group check wrapped in AC_CACHE_CHECK
- instead of appending -lacl to global LIBS variable, this adds it as
  needed only to FPM_EXTRA_LIBS as it was already used in the BUILD_FPM
  invocation
2024-07-09 18:42:31 +02:00
Julien Voisin
c2cbbd9b98
zend_alloc: remove duplicate zend_mm_alloc_large definition (#14880)
The two parts of the #if condition are the same.
2024-07-09 06:46:00 +01:00
Niels Dossche
19813b5b7e
Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix GH-14741: Segmentation fault in Zend/zend_types.h
2024-07-09 00:57:35 +02:00
Niels Dossche
4c95cb37f5
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-14741: Segmentation fault in Zend/zend_types.h
2024-07-09 00:57:28 +02:00