1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 16:22:37 +01:00
Commit Graph

142050 Commits

Author SHA1 Message Date
Volker Dusch
24b32f6a89 Update Version to 8.5.0alpha2 php-8.5.0alpha2 2025-07-15 13:40:10 +02:00
Tim Düsterhus
2039664e47 ext/xml: Suppress libxml deprecation for _xmlParserCtxt.inState (#19131)
The FreeBSD build fails due to the deprecation and -Werror:

    2025-07-15T00:37:20.8390774Z /home/runner/work/php-src/php-src/ext/xml/compat.c:358:38: error: 'instate' is deprecated [-Werror,-Wdeprecated-declarations]
    2025-07-15T00:37:20.8392577Z   358 |                 if (ret == NULL || parser->parser->instate == XML_PARSER_CONTENT) {
    2025-07-15T00:37:20.8393184Z       |                                                    ^
    2025-07-15T00:37:20.8394006Z /usr/local/include/libxml2/libxml/parser.h:309:33: note: 'instate' has been explicitly marked deprecated here
    2025-07-15T00:37:20.8394903Z   309 |     xmlParserInputState instate XML_DEPRECATED_MEMBER;
    2025-07-15T00:37:20.8395413Z       |                                 ^
    2025-07-15T00:37:20.8396166Z /usr/local/include/libxml2/libxml/xmlexports.h:74:50: note: expanded from macro 'XML_DEPRECATED_MEMBER'
    2025-07-15T00:37:20.8397058Z    74 |     #define XML_DEPRECATED_MEMBER __attribute__((deprecated))
    2025-07-15T00:37:20.8397581Z       |                                                  ^
    2025-07-15T00:37:20.8425542Z 1 error generated.
2025-07-15 13:36:56 +02:00
Jakub Zelenka
81d1529a13 Merge branch 'PHP-8.4' 2025-07-15 11:29:18 +02:00
Jakub Zelenka
0d19984cda Merge branch 'PHP-8.3' into PHP-8.4 2025-07-15 11:24:34 +02:00
Jakub Zelenka
6b2b60f683 Fix bug #80770: openssl cafile not used in SNI SSL_CTX
The issue is about not being able to connect as cafile for SNI
is not used in its SSL context. This sets it up so it is possible
to capture the client certificate which is only possible when
verify_peer is true.

Closes GH-18893
2025-07-15 11:23:10 +02:00
Jakub Zelenka
25c0874bc1 Use custom OpenSSL libctx for NCONF (#19130) 2025-07-15 09:30:15 +02:00
Daniel Scherzer
142e378618 Arginfo: add and use known strings for attribute values 2025-07-14 17:31:22 -07:00
Daniel Scherzer
0c920ecb07 gen_stub: use StringBuilder for attribute strings 2025-07-14 17:31:22 -07:00
Daniel Scherzer
ecdff3b563 gen_stub: add StringBuilder class for managing known strings
Split out from the PropertyInfo class so that known strings can also be used
for attributes in a follow-up commit.
2025-07-14 17:31:22 -07:00
Peter Kokot
a4d39f9713 Fix missing strnlen symbol on Solaris 10 (#19109)
- On Solaris, strnlen was implemented on Solaris 11.
- In Autotools, strnlen can be also checked in Zend scope as
  HAVE_STRNLEN is used only there.
2025-07-14 23:07:04 +02:00
Niels Dossche
9121b015c1 Implement GH-18550: Implement getElementsByClassName() (#19108)
Spec: https://dom.spec.whatwg.org/#ref-for-dom-element-getelementsbyclassname
2025-07-14 21:53:37 +02:00
Peter Kokot
114fc16266 GitHub: Remove ext/phar/php_phar.h (#19124)
This header is not installed anymore and not intended to be used as a
public header.
Related to: d7bdf902e5
2025-07-14 15:51:42 +02:00
Jakub Zelenka
b750aa8bfc [ci skip] Update NEWS and UPGRADING with OpenSSL libctx changes 2025-07-14 15:23:54 +02:00
Jakub Zelenka
d0c0a9abfd Introduce OpenSSL INI for selecting libctx (#18768)
Closes GH-18768

Co-authored-by: Gina Peter Banyard <girgias@php.net>
2025-07-14 15:16:14 +02:00
Dmitry Stogov
2beb44a80b Merge branch 'PHP-8.4'
* PHP-8.4:
  Revert "Update IR"
2025-07-14 14:28:55 +03:00
Dmitry Stogov
9abb0fb0c4 Revert "Update IR"
This reverts commit e8ae27bf8a.

Something wrong in irrducable loops habdling that causes ir_find_loop()
to stuck. See https://github.com/php/php-src/issues/19104
2025-07-14 14:27:05 +03:00
Peter Kokot
4d9fc506df Autotools, ext/gd: Ensure test program compiles without warnings (#19116)
In case compiler is configured in some strict way it might emit warnings
or even errors in the future if these aren't casted to void.
2025-07-13 17:17:14 +02:00
Peter Kokot
d40b603856 ext/gd: Make BMP always available (#19115)
- When building with bundled libgd, it has support for BMP
- When building with external libgd, at least 2.1.0 is required, which
  has BMP support.
- The HAVE_GD_PNG moved to PHP_GD_PNG Autoconf macro as it is always
  required when building with bundled libgd.
2025-07-13 15:25:53 +02:00
Peter Kokot
ba68cbefc5 ext/gd: Make TGA always available (#19105)
- When building with bundled libgd, it has support for TGA
- When building with external libgd, at least 2.1.0 is required, which
  has TGA support.
2025-07-13 11:45:44 +02:00
Yudai Takada
6e22d4c096 Refactor newline handling in zend_scan_escape_string to use HANDLE_NEWLINE macro (#19112) 2025-07-13 10:40:31 +02:00
Ilija Tovilo
a402edac1a [skip ci] Add fatal_error_backtraces to php.ini templates (GH-19099) 2025-07-12 19:28:48 +02:00
Ilija Tovilo
9460dbe906 Fix lineno for constructor property promotion errors
Fixes GH-19081
Closes GH-19100
2025-07-12 19:15:48 +02:00
David CARLIER
46213f879a ext/sockets: socket_addrinfo_lookup narrowing down socket family check to AF_INET/AF_INET6 only. (#19040) 2025-07-12 15:48:25 +01:00
Niels Dossche
a64cdd63f3 [ci skip] Update credits in NEWS 2025-07-12 10:03:30 +02:00
Niels Dossche
8712f4bf19 Fix OSS-Fuzz #427814452
Pipe compilation uses a temporary znode with QM_ASSIGN to remove
references. Assert compilation wants to look at the operand AST and
convert it to a string. However the original AST is lost due to the
temporary znode. To solve this we either have to handle this specially
in pipe compilation [1], or store the AST anyway somehow.
Special casing this either way is not worth the complexity in my
opinion, especially as it looks like a dynamic call anyway due to the
FCC syntax.

[1] Prototype (incomplete) at
    https://gist.github.com/nielsdos/50dc71718639c3af05db84a4dea6eb71
    shows this is not worthwhile in my opinion.

Closes GH-18965.

Co-authored-by: Ilija Tovilo <ilija.tovilo@me.com>
2025-07-12 09:51:27 +02:00
Niels Dossche
f11ea2ae13 Refactor dom_html_collection_named_item()
This factors out the specific objmap handling to virtual functions.
This is the last step in preparation for GH-18550.
2025-07-11 12:29:29 +02:00
Niels Dossche
a2d65354a0 dom: Rename get_named_item -> get_ns_named_item, and has_named_item -> has_ns_named_item 2025-07-11 12:29:29 +02:00
Niels Dossche
5cacae8f29 Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix GH-19094: Attaching class with no Iterator implementation to MultipleIterator causes crash
2025-07-11 12:28:47 +02:00
Niels Dossche
76b6b60b8c Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-19094: Attaching class with no Iterator implementation to MultipleIterator causes crash
2025-07-11 12:28:25 +02:00
Niels Dossche
71472268c0 Fix GH-19094: Attaching class with no Iterator implementation to MultipleIterator causes crash
Closes GH-19097.
2025-07-11 12:27:41 +02:00
Yudai Takada
28cd3761a1 Remove unnecessary semicolon in match rule (#19096) 2025-07-11 10:36:25 +02:00
Yudai Takada
0dc83c2b10 Fix typo in SAPI and ADD_SOURCES description in upgrade notes (#19095)
[ci skip]
2025-07-11 10:35:43 +02:00
Niels Dossche
4aa8c2fe5d dom: Remove unnecessary objmap ptr null checks (#19092) 2025-07-11 10:35:14 +02:00
Niels Dossche
e013b4a91e Make cloning DOM node lists, maps, and collections fail
This never worked and creates a broken object,
and on master can cause a crash with foreach.
It makes no sense to fix a behaviour that never worked, block it
instead.

Closes GH-19089.
2025-07-11 10:34:25 +02:00
Niels Dossche
f6380e4a38 Merge branch 'PHP-8.4'
* PHP-8.4:
  ext/soap/php_http.c: Fix memory leak of header value
2025-07-10 22:32:58 +02:00
Niels Dossche
de7a212630 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  ext/soap/php_http.c: Fix memory leak of header value
2025-07-10 22:32:52 +02:00
Gina Peter Banyard
85a49d4198 ext/soap/php_http.c: Fix memory leak of header value 2025-07-10 22:32:31 +02:00
Niels Dossche
5623e67fb6 Merge branch 'PHP-8.4'
* PHP-8.4:
  ext/gd: Drop useless and doubtful MSVC specific code (libgd/libgd@f1480ab)
2025-07-10 22:22:31 +02:00
Niels Dossche
5a45d71a11 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  ext/gd: Drop useless and doubtful MSVC specific code (libgd/libgd@f1480ab)
2025-07-10 22:22:26 +02:00
Demon
974526b244 ext/gd: Drop useless and doubtful MSVC specific code (libgd/libgd@f1480ab) 2025-07-10 22:22:01 +02:00
Niels Dossche
224f95f442 Merge branch 'PHP-8.4'
* PHP-8.4:
  Update NEWS for GH-19068
  ext/gd: Drop useless and doubtful MSVC specific code (libgd/libgd@f1480ab)
  Zend: fix undefined symbol 'execute_ex' on Windows ARM64 #19064; ext/gd: fix emmintrin.h not found on Windows ARM64
2025-07-10 22:15:43 +02:00
Niels Dossche
2fa0e55450 Update NEWS for GH-19068 2025-07-10 22:14:38 +02:00
Demon
12fa8c637f ext/gd: Drop useless and doubtful MSVC specific code (libgd/libgd@f1480ab) 2025-07-10 22:13:29 +02:00
Demon
2be3aa86f0 Zend: fix undefined symbol 'execute_ex' on Windows ARM64 #19064; ext/gd: fix emmintrin.h not found on Windows ARM64 2025-07-10 22:13:29 +02:00
Niels Dossche
c4183fba00 Fix GH-19070: setlocale($type, NULL) should not be deprecated
This restores the old behaviour.

Closes GH-19071.
2025-07-10 22:01:16 +02:00
Calvin Buckley
0d584c32c5 pdo_odbc: Don't fetch 256 byte blocks for long columns (#10809)
* pdo_odbc: Don't fetch 256 byte blocks for long columns

Fetching 256 byte blocks can confuse some drivers with conversion
routines. That, and it seems to me the round trips to and from a
database could be a major performance impact.

Instead, we try to fetch all at once, and continue fetching if a
driver somehow has more for us.

This has been tested with a problematic case with the Db2i driver
with stateful MBCS encodings.

See GH-10733 for discussion about this and issues it can resolve.

* change to separate by 256 bytes, when C->fetched_len == SQL_NO_TOTAL

change to separate by 256 bytes, when C->fetched_len == SQL_NO_TOTAL

changed from 256 byte to 2048 byte buf block.

* Make long column buffer size single define

Could be configurable maybe, but best to avoid magic numbers even for a
compile-time constant.

* Use ZendMM page size minus zend_string overhead

Change recommended by Christoph.

Probably a little better performance wise I have to guess.

* [skip ci] Update comment to mention constant

* Update UPGRADING for PDO_ODBC change

mention GH issues in UPGRADING too

* Update NEWS for PDO_ODBC change

---------

Co-authored-by: SakiTakamachi <saki@sakiot.com>
2025-07-10 13:03:11 -03:00
Kasey Jenkins
cea0918352 Fix empty_fcall_info C++ missing-field-initializers warning (GH-19084)
Closes GH-19085
2025-07-10 11:02:39 +02:00
DanielEScherzer
07f1cfd9b0 Deprecate producing output in a user output handler (#19067)
https://wiki.php.net/rfc/deprecations_php_8_4
2025-07-09 21:20:58 -07:00
Calvin Buckley
964a404451 Use C23 unreachable() when possible (#19077)
This is a macro defined in stddef, which is already included in this
header. Since this is a macro, we can just check for the define rather
than add any additional build system checks.

Fixes GH-18975
2025-07-09 11:27:25 -03:00
Tim Düsterhus
b43a7ac0e7 Zend: Make EG(fake_scope) a const zend_class_entry* (#19060) 2025-07-09 11:55:53 +02:00