Ilija Tovilo
8df557ac42
[RFC] Asymmetric visibility v2 (GH-15063)
...
Co-authored-by: Larry Garfield <larry@garfieldtech.com >
2024-08-27 02:04:48 +02:00
Niels Dossche
baac01f594
Improve virtual property error message
...
Co-authored-by: Ilija Tovilo <ilija.tovilo@me.com >
2024-08-26 21:17:49 +02:00
Kamil Tekiela
c5bce0d8a2
Deprecate disabling use_only_cookies ( #13578 )
2024-08-24 16:33:45 +02:00
Máté Kocsis
8d12f666ae
Fix registration of internal readonly child classes ( #15459 )
...
Currently, internal classes are registered with the following code:
INIT_CLASS_ENTRY(ce, "InternalClass", class_InternalClass_methods);
class_entry = zend_register_internal_class_ex(&ce, NULL);
class_entry->ce_flags |= ...;
This has worked well so far, except if InternalClass is readonly. It is because some inheritance checks are run by zend_register_internal_class_ex before ZEND_ACC_READONLY_CLASS is added to ce_flags.
The issue is fixed by adding a zend_register_internal_class_with_flags() zend API function that stubs can use from now on. This function makes sure to add the flags before running any checks. Since the new API is not available in lower PHP versions, gen_stub.php has to keep support for the existing API for PHP 8.3 and below.
2024-08-24 12:36:54 +02:00
Peter Kokot
2e3132b3fd
Autotools: Sync CS in ext/standard ( #15560 )
...
- Overquoted arguments reduced
- Added missing quotes in algorithms checks
- Synced indentations for algorithms checks
2024-08-23 22:30:09 +02:00
Gina Peter Banyard
35fbb0061d
main/network: Use more appropriate types ( #15511 )
...
* main/network: Use more appropriate types
And check directly against 0 for success for functions not returning a zend_result
* Remove redundant declaration in file.h
Not sure why it even is here
2024-08-22 12:48:28 +01:00
Gina Peter Bnayard
5853cdb73d
Use "must not" instead of "cannot" wording
2024-08-21 21:12:17 +01:00
Gina Peter Bnayard
997199e938
ext/standard/string.c: use standard wording for ValueError in str_pad()
2024-08-21 21:12:17 +01:00
Gina Peter Bnayard
10738141d7
ext/standard/exec.c: Use ZPP path modifier to check for nul bytes
2024-08-21 21:12:17 +01:00
Gina Peter Bnayard
e7c4d54d65
Use new helper function for "cannot be empty" ValueErrors
2024-08-21 21:12:17 +01:00
Gina Peter Bnayard
9147687b6d
ext/standard/file.c: Use more appropriate types
2024-08-21 13:06:18 +01:00
Gina Peter Bnayard
369eeb73ca
ext/standard/file.c: Use RETURN_BOOL() instead of if-else
2024-08-21 13:06:18 +01:00
Christoph M. Becker
d4263ddc40
Fix rename_variation12*.phpt parallel test conflicts (GH-15518)
...
For rename_variation12.phpt this is actually not necessary, since there
is no rename_variation11.phpt, but we still fix it to be in sync with
rename_variation12-win32.phpt which actually is prone to parallel
conflicts.
Since we already ran CI in the PR, we can now [skip ci].
2024-08-21 13:25:16 +02:00
Gina Peter Banyard
3059adae06
ext/standard: Improve checking of allowed_classes option ( #15267 )
...
* ext/standard: Add some unserializing tests
* ext/standard: Add proper type checking for values of the allowed_classes option array
* ext/standard: Check that class names are somewhat sensible for the allowed_classes option array
* Indicate type of value
* Add test for Stringable objects
2024-08-20 15:24:25 +01:00
Gina Peter Bnayard
775ca03eb8
ext/standard/crc32: Use zend_result return type and remove unused header
2024-08-20 14:18:50 +02:00
Gina Peter Bnayard
ebfef2505d
ext/standard/mail.c: Move php_mail_header_value_error_type enum out of header
2024-08-18 19:39:32 +02:00
Gina Peter Bnayard
a171b20c7c
ext/standard/mail.c: Move macros out of the header
2024-08-18 19:33:02 +02:00
Gina Peter Bnayard
312c919a2d
ext/standard/mail.c: change return type of php_mail() to bool
2024-08-18 19:32:33 +02:00
Gina Peter Bnayard
962aba3b12
ext/standard/mail.c: Reduce scope of some variable declarations
2024-08-18 19:32:20 +02:00
Gina Peter Banyard
c6e1e307a3
ext/standard: Throw a RequestParseBodyException instead of InvalidArgumentException ( #15468 )
...
Especially as this exception is thrown when there isn't an issue with an argument
2024-08-18 18:21:25 +01:00
Gina Peter Bnayard
3813ad10dc
Remove unused ext/standard/basic_functions.h header inclusions
...
Those were probably included back in the day for the php_uint32 typedef
2024-08-18 18:20:22 +01:00
Gina Peter Bnayard
3e05c86c35
ext/standard: Remove deprecated php_uint32 and php_int32 typedefs
...
Use the standard uint32_t and int32_t types instead.
2024-08-18 18:20:22 +01:00
Gina Peter Banyard
059fe6c28b
ext/standard/php_string.h: Remove declarations that do not have an implementation ( #15402 )
...
This was overlooked, by my younger self, in GH-8195.
2024-08-14 20:04:51 +01:00
Christoph M. Becker
390088bf55
Remove detection of unsupported Windows versions (GH-15399)
...
Windows 2008 and Vista are no longer supported as of PHP 7.2.0, and
Windows 2008 R2 and Windows 7 are no longer supported as of PHP 8.3.0.
Therefore we remove the respective detection code, and assert that
these versions can no longer be used.
2024-08-14 19:52:47 +02:00
Gina Peter Banyard
74bf894950
ext/standard/info.c: Throw ValueErrors on invalid inputs to php_uname() ( #15385 )
2024-08-14 13:20:26 +01:00
Gina Peter Banyard
a79c70f574
[RFC] Convert exit (and die) from language constructs to functions ( #13483 )
...
RFC: https://wiki.php.net/rfc/exit-as-function
2024-08-14 12:44:12 +01:00
Gina Peter Banyard
02177848e4
Replace uses of php_dirname() with zend_dirname() ( #15393 )
...
This removes some needs to include the php_string.h header
2024-08-14 12:35:47 +01:00
Gina Peter Bnayard
0b8fbacd58
ext/standard/info.c: Remove unreachable conditional branch
2024-08-13 22:26:14 +02:00
Gina Peter Bnayard
d63caf006b
ext/standard/info.c: Minor refactoring to php_get_uname()
2024-08-13 15:57:26 +01:00
Gina Peter Bnayard
ac7ed28573
ext/standard/info.c: Minor refactoring to php_get_windows_name()
2024-08-13 15:57:26 +01:00
Gina Peter Bnayard
e0f6e3de34
ext/standard/info.c: Make some functions static
2024-08-13 14:10:06 +02:00
Gina Peter Bnayard
5078eb080e
ext/standard/info.c: Use size_t type where appropriate
2024-08-13 14:10:06 +02:00
Gina Peter Bnayard
739805d099
ext/standard/info.c: Removed php_info_html_esc()
2024-08-13 14:10:06 +02:00
Gina Peter Bnayard
67a15cf457
ext/standard/head.c: Change return type of php_header() to bool
2024-08-13 14:10:06 +02:00
Gina Peter Bnayard
2297e50772
ext/standard/head.c: Remove some useless casts
...
The field type is size_t
2024-08-13 14:10:06 +02:00
Gina Peter Bnayard
91aca96a8e
ext/standard/filters.c: Use bool type where possible for persistent field/param
2024-08-13 14:10:06 +02:00
Gina Peter Bnayard
9cfe9e10ba
ext/standard/filters.c: Use zend_result return type instead of int
2024-08-13 14:10:06 +02:00
Gina Peter Bnayard
2baadf3807
ext/standard/filters.c: Voidify php_conv_base64_decode_ctor()
...
It always returned SUCCESS
2024-08-13 14:10:06 +02:00
Gina Peter Bnayard
54cc76fdb4
ext/standard/filters.c: Remove some register keywords
2024-08-13 14:10:06 +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
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
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
Gina Peter Banyard
edc88ee629
ext/standard: Minor refactoring to URL scanner code ( #15321 )
2024-08-10 20:12:54 +01:00
Christoph M. Becker
9c537de8a5
Fix some -Wimplicit-function-declaration errors on Windows (GH-15325)
...
While clang is picky about these, MSVC doesn't seem to care and would
only report the calls to undeclared functions as errors during link
time. Still, obviously, MSVC is fine with having the declarations
during compile time.
2024-08-10 16:25:28 +02:00
David Carlier
d5c7f3b0e6
ext/standard: enabling feature detection auxiliary vector on OpenBSD.
...
close gh-15175
2024-08-10 12:36:10 +01:00
Gina Peter Banyard
1e3d918936
ext/core: Deprecate passing E_USER_ERROR to trigger_error() ( #15308 )
...
RFC: https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_passing_e_user_error_to_trigger_error
2024-08-09 15:51:07 +01:00
Quentin Dreyer
7b32a145d9
Fix GH-15155: Keep stream context in filtered streams
...
Closes GH-15156
2024-08-06 16:42:33 +01:00
David CARLIER
b9da6cb3a2
ext/standard: disable one ipv2long test. ( #15200 )
...
atypical leading zeros are accepted on this platform.
2024-08-06 12:26:19 +01:00
Peter Kokot
125190186e
Autotools: Check for cross_compiling=yes ( #15238 )
...
The cross_compiling variable can initially be "yes", "no", or
"maybe" (when only --host option is added). Autoconf otherwise after
AC_PROG_CC resets it to "no" in such case but to be sure, this
checks for value "yes" instead. The HAVE_FNMATCH template can be also
set after the AC_DEFINE as autoheader scans the templates overall the
source code.
2024-08-05 08:52:09 +02:00
Tim Düsterhus
49d0d7bcd7
standard: Stop using php_combined_lcg() in uniqid() ( #15217 )
...
Fall back to the fallback generator if the CSPRNG fails instead. This removes
the last internal user of `php_combined_lcg()`.
2024-08-04 18:26:40 +02:00