Commit Graph

137478 Commits

Author SHA1 Message Date
Peter Kokot
a6d7d5234b
Autotools: Fix pdo_firebird shared build (#15371)
Follow-up of GH-15230:

- Redundant variables removed
- Redundant duplicate middle newlines removed
- PHP_CXX_COMPILE_STDCXX macro arguments quoted
- When extension is built as shared the PHP_ADD_SOURCES works
  differently, and PHP_ADD_SOURCES_X needs to be used so this can be
  used:

    ./configure --with-pdo-firebird=shared
2024-08-13 10:36:26 +02:00
Peter Kokot
65e96c1e5a
Autotools: Fix phpdbg build (#15373)
With 04a67cd86c the list of source files
are now added alphabetically. Previously the phpdbg_parser.c was added
before the phpdbg_lexer.c. Which caused the
"sapi/phpdbg/phpdbg_lexer.l:8:10: fatal error: 'phpdbg_parser.h' file
not found" error.

To make the order of source files irrelevant, the Makefile substitutions
needs to be fixed - the 3rd argument of PHP_ADD_MAKEFILE_FRAGMENT macro,
which is the substitution of the $(builddir) Make variable. The
$(builddir)/phpdbg_lexer.lo was previously substituted to an absolute
path. And the relative should be used, for Make to be able to find the
dependent target.
2024-08-13 10:35:16 +02:00
Peter Kokot
10ed74e3c0
Autotools: Check cli SAPI configure checks conditionally (#15370)
This checks cli SAPI system configuration based on whether the cli is
enabled like with other SAPIs and extensions.
2024-08-13 10:34:28 +02:00
Peter Kokot
3b24b853ec
Autotools: Sync CS in ext/pdo_firebird (#15372)
- Obsolete backticks replaced with the recommended $(...)
- AS_VAR_IF used
2024-08-13 10:33:57 +02:00
Peter Kokot
540b9f5bc7
Autotools: Wrap long texts with m4_text_wrap (#15368)
The m4_text_wrap macro wraps the text into a single space separated
string which is wrapped to not exceed the line lenght of 79 characters
by default.
2024-08-13 10:33:17 +02:00
David Carlier
d052d612d9
ext/sockets: adding SOCK_CLOEXEC/SOCK_NONBLOCK options.
targetted for socket_create_pair/socket_create, they re not considered
as socket type but to be ORed with these (to avoid socketpair2/socket2
likely), set O_CLOEXEC/O_NONBLOCK respectively on the file descriptors.

close GH-15322
2024-08-13 08:35:44 +01:00
Calvin Buckley
afc5738154
Show build provider and unify version information printing (#14657)
* Show build provider information in "php -v"

Vendors such as distributions can set the `PHP_BUILD_PROVIDER`
variable, that gets printed in phpinfo. However, I find that users check
`php -v` more often than phpinfo to see what PHP they're running. The
problem with this is that it does not show that build provider
information.

This change makes the build provider information printed on an
additional line of the version information.

* Put on same line so it works with or without env var

Unbreaks build without PHP_BUILD_PROVIDER set.

* change wording in provider version text

better grammatically; many different possibilities here though

* Unify SAPI version printing

This makes it so that all of the SAPIs share the same code for printing
version information. This is useful in case of any future changes to the
version information, such as i.e. adding build provider to the output.

* Make include for php_print_version explicit

* Preserve phpdbg version and output channel

php_printf doesn't have same semantics, as phpdbg_out could be on a
different output than stdout/err. Also add the phpdbg version (in case
it differs from PHP's, to keep similar output before this PR)

* remove size variables

we don't use them and CI doesn't like unused variables

* Fix format string insecurity
2024-08-12 23:24:41 -03:00
Simonov Denis
225034dbbc
pdo_firebird: Formatting time zone types
As a follow-up to the commit which introduced support for Firebird 4.0+
data types[1], we add support for formats for types with time zones.

Since this uses the newer Firebird C++ API, pdo_firebird now requires a
C++ compiler to be built.

[1] <https://github.com/php/php-src/pull/14897>

Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>

Closes GH-15230.
2024-08-13 01:25:48 +02:00
Christoph M. Becker
5478d4b2c1
Merge branch 'PHP-8.3'
* PHP-8.3:
  [ci skip] `yield /*comment*/ from` is no longer a parse error
2024-08-13 00:35:02 +02:00
Christoph M. Becker
7bb5a2ee43
[ci skip] yield /*comment*/ from is no longer a parse error
Closes GH-15276.
2024-08-13 00:33:58 +02:00
Christoph M. Becker
266192372c
Skip fb4_datatypes*.phpt for Firebird server < 4.0.0 (GH-15354)
Using a newer fbclient version with an older server is generally
supported, and as such we must not only skip these tests for older
fbclients, but also for older servers.

In lack of some readily available function, we're querying the server
to find its version.
2024-08-13 00:14:23 +02:00
Arnaud Le Blanc
81150187fb
Ensure proper alignment of zend_accel_shared_globals.interned_strings (#15359) 2024-08-12 21:43:43 +02:00
Peter Kokot
8c4f019cc6
Autotools: Sync CS in gd extension (#15364)
- Obsolete PHP_* variables checks removed (there was once the 'pdf'
  extension bundled in PHP that also had the same --with-*-dir configure
  options (3be17e3f26). When combined with
  the gd extension, options need to be executed conditionally; first one
  won), this is no longer relevant neither recommended practice to
  duplicate configure options inside the php-src context. Ideally,
  all configure options should be prefixed with an extension namespace
  --with-<extension-name>-<option> to be unique.
- AS_* macros used
2024-08-12 21:38:30 +02:00
Gina Peter Banyard
f5ae5ac804
ext/standard: Throw ValueErrors in str_getcsv() for invalid inputs (#15365)
This was forgotten when adjusting the behaviour of other CSV functions
2024-08-12 17:56:02 +01:00
Ilija Tovilo
a4772a0c47
[skip ci] Remove unclosed vim code folding 2024-08-12 18:50:38 +02:00
Gina Peter Bnayard
6114379ad2 ext/gmp: Refactor gmp_import_export_validate() 2024-08-12 17:30:10 +02:00
Gina Peter Bnayard
f8626638c4 ext/gmp: Use zend_string to GMP object function directly 2024-08-12 17:30:10 +02:00
Gina Peter Bnayard
d74b513f68 ext/gmp: Add test about manually (un)serializing 2024-08-12 17:30:10 +02:00
Gina Peter Banyard
0a23b0678d
Deprecate using "_" as a class name (#15360)
RFC: https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_using_a_single_underscore_as_a_class_name
2024-08-12 16:10:30 +01:00
Gina Peter Banyard
c818d944cf
ext/(standard|spl): Deprecate passing a non-empty string as the $enclosure parameter (#15362) 2024-08-12 16:09:56 +01:00
Ilija Tovilo
37c22c4c7e
Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix git check in verify generated files (GH-15363)
2024-08-12 16:21:35 +02:00
Ilija Tovilo
cbe73a158f
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix git check in verify generated files (GH-15363)
2024-08-12 16:20:24 +02:00
Ilija Tovilo
9be52dcd62
Fix git check in verify generated files (GH-15363)
Git 2.46.0 accidentally broke git diff --exit-code for files flagged with -diff.
Add the -a flag to restore the previous behavior. This issue is already fixed in
gits next branch.
2024-08-12 16:19:54 +02:00
Ayesh Karunaratne
81b49cd062
ext/curl: Add HTTP/3 constants (#15350)
This intends to supersede the two following PRs:
 - #12000 because it does not modify the stub file, but only update the
   arginfo file. It also proposes to merge to GA branches, and is
   currently marked as Requires RM Approval.
 - #12543 Essentially the same as this PR and from the same author, as
   this, but its about a year old and requires rebasing anyway.

This adds the `CURL_HTTP_VERSION_3` and `CURL_HTTP_VERSION_3ONLY`
constants on relevant versions (7.66 and 7.88 respectively).

It is possible to use HTTP/3 without having these constants declared,
but having them declared in PHP makes things more approachable and
"official".
2024-08-12 14:26:24 +01:00
Peter Kokot
6cb6cc6f74
Autotools: Refactor iconv implementation checks (#15357)
This uses AS_* macros and checks for an iconv implementation in a single
cache check block for easier configure log output and possible future
adjustments when iconv is built-in the C library (like on Alpine and
some other systems where it isn't recognized as such yet exactly).
2024-08-12 14:43:24 +02:00
Peter Kokot
d334382eb8
[skip ci] Fix typo s/dissasembly/disassembly 2024-08-12 14:37:22 +02:00
Kamil Tekiela
8ca8d7750d
Deprecate MYSQLI_REFRESH_* constants (#15358) 2024-08-12 13:24:32 +01:00
Peter Kokot
cdf0a9b9a0
Autotools: Use AS_CASE in ext/pdo_odbc (#15355) 2024-08-12 14:21:20 +02:00
Kamil Tekiela
e6ecd83ea5
Update arginfo for mysqli and spl_fixedarray (#15356) 2024-08-12 13:37:30 +02:00
Peter Kokot
9fcc1bca8a
Remove redundant middle newlines in "Autotools" related files
This syncs few minor left-overs in "Autotools" related files:
- redundant middle newlines removed (in man pages the duplicate newlines
  are also ignored and are not visible in the man page anyway)
- Minor mixed indentation synced

[skip ci]
2024-08-12 13:18:32 +02:00
Peter Kokot
634708a14f
Add pcre as a configure step dependency to fileinfo (#15349)
The pcre is a required dependency in fileinfo extenstion. This marks it
as a configure step dependency for consistency with other extensions
and to have extensions properly sorted in the generated
internal_functions* files.
2024-08-12 00:17:29 +02:00
Peter Kokot
693ec809b9
Autotools: Remove PDO dependency related errors (#15347)
Follow-up of GH-15344 (687eb9125a)

This removes the customized error messages in PDO extensions when PDO is
not enabled (--disable-all or --disable-pdo) in favor of the default
error done by PHP_ADD_EXTENSION_DEP.
2024-08-11 21:35:36 +02:00
Gina Peter Banyard
4f58d5b0df
ext/mysqli: Deprecate passing the parameter to mysqli_store_result() (#15311)
And deprecate the MYSQLI_STORE_RESULT_COPY_DATA constant.

RFC: https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_the_second_parameter_to_mysqli_store_result
2024-08-11 19:25:35 +01:00
Gina Peter Banyard
857ce2c9e0
ext/mysqli: Mark return type as zend_return (#15345) 2024-08-11 19:24:53 +01:00
Peter Kokot
bb35da336d
Autotools: Sync CS in extensions (#15343)
- Redundant double quotes removed
- AS_* macros used
- Few nits adjusted here and there
2024-08-11 17:42:26 +02:00
Peter Kokot
687eb9125a
Autotools: Remove dependency related errors (#15344)
- ext/dom
- ext/xsl

These use the PHP_ADD_EXTENSION_DEP macro which throws error when one of
the dependencies is disabled or not configured properly.

For example:
    ./configure --disable-all --enable-dom

or
    ./configure --disable-all --with-xsl

Will throw default PHP dependency error info, when using
PHP_ADD_EXTENSION_DEP.

These errors were once done when PHP_ADD_EXTENSION_DEP macro wasn't yet
available.
2024-08-11 17:39:31 +02:00
Gina Peter Bnayard
5d1db3dd56 ext/mysqli: Improve variable name and type 2024-08-11 17:27:09 +02:00
Gina Peter Bnayard
c2bdb31b6a ext/mysqli: Remove PHP 6 remnants 2024-08-11 17:27:09 +02:00
Gina Peter Bnayard
0c827f6b25 ext/mysqli: Use an assertion for condition that is checked by ZPP 2024-08-11 17:27:09 +02:00
Gina Peter Bnayard
efd33f57c7 ext/mysqli: mysqli_report() only ever returns true 2024-08-11 17:27:09 +02:00
Gina Peter Banyard
1950d661ea
ext/mysqli: Mark function pointer as returning zend_result (#15342) 2024-08-11 15:47:57 +01:00
Jorg Adam Sowa
c4eccf33e9
ext/session: session.save_handler - add tests fortwo uncovered cases (#15337) 2024-08-11 15:39:56 +01:00
Peter Kokot
f2e50eb61f
Autotools: Sync CS in ext/pcntl (#15341)
- AC_CHECK_TYPE long list of arguments split into a newline
- Long lists in AC_CHECK_DECLS can be split across multiple lines, even
  without m4_normalize, but the end quote needs to be done properly
  after the last item without space or newline. Here the m4_normalize
  ensures all trailing blanks are trimmed and having the possibility to
  put the ending quotes on newlines also
2024-08-11 15:12:37 +02:00
Gina Peter Bnayard
caae950ff7 ext/xml: Add an explicit test case about unsetting a handler with empty string 2024-08-11 15:00:27 +02:00
Peter Kokot
b0091c4172
Autotools: Sync CS in opcache extension (#15340)
- AS_* macros used
- Overquoted AC_RUN_IFELSE macros arguments reduced
- Redundant double quoted single variables assignments removed
- i*86 and x86* patterns joined into a single case
2024-08-11 14:51:27 +02:00
Gina Peter Bnayard
8c2ebc0a56 [skip ci] Add NEWS/UPGRADING entries for mysqli deprecations 2024-08-11 14:48:17 +02:00
Jorg Adam Sowa
6bf7b7220d
ValueError on null byte in session_name() (#15286) 2024-08-11 13:26:54 +01:00
jrfnl
cb8df212aa [skip ci] 8.4 | UPGRADING: add missing entry for DBA resource to object migration
Ref: 14329

P.S.: looks like 14282 also doesn't have a mention, but that PR doesn't appear to have an impact on userland - maybe a NEWS entry ?
2024-08-11 13:14:33 +02:00
jrfnl
51a557ee62 [skip ci] 8.4 | UPGRADING: various tweaks 2024-08-11 13:14:33 +02:00
Peter Kokot
a5f8cbd93d
Autotools: Refactor mysql_config checks in pdo_mysql (#15336)
- Scattered if blocks moved together as PDO_MYSQL_UNIX_ADDR is defined
  only when mysql_config is available
- Obsolete backticks command substitutions `...` replaced with the
  recommended $(...)
2024-08-11 12:18:27 +02:00