1
0
mirror of https://github.com/php/php-src.git synced 2026-04-21 06:51:18 +02:00
Commit Graph

61845 Commits

Author SHA1 Message Date
Arnaud Le Blanc 298c1ab92e Merge branch 'PHP-8.1' 2022-05-13 12:48:51 +02:00
Arnaud Le Blanc 332bd03782 Do not optimize out ini_get() when the entry does not exist during compilation (#8507)
The entry may exist later if dl is enabled

Fixes GH-8466
2022-05-13 12:35:00 +02:00
Máté Kocsis 8b991b4ae4 Add static return type for DateTime*::createFrom*() when possible
Fix GH-8544
2022-05-13 12:13:48 +02:00
Máté Kocsis 37b3092820 Fix more specific return type hints for some ext/date methods
Ideally, these methods should have been declared with a static return type, so let's add a PHPDoc type hint + a TODO for fixing the issue in the future.
2022-05-13 11:18:26 +02:00
Pavel Djundik 12702a2047 Add "N" and "o" format specifiers to idate() 2022-05-13 09:36:43 +01:00
Dmitry Stogov f9483708c7 Merge branch 'PHP-8.1'
* PHP-8.1:
  Add JIT guards for INIT_FCALL instructions and functions that may be modified
2022-05-12 18:46:12 +03:00
Dmitry Stogov 6c25413183 Add JIT guards for INIT_FCALL instructions and functions that may be modified
For methods we reuse mechanism of polymorphic calls.
For regular function we invalidate the whole root trace.

This fixes https://github.com/php/php-src/issues/8461
2022-05-12 18:44:12 +03:00
Christoph M. Becker d2bb59cc66 Test standard mail and imap on Windows CI
We setup the currently latest version of hMailServer[1] as mail server,
and configure according to imap_include.inc.  To not require further
configuration, we adapt mail_skipif.inc and mail_include.inc to match
that configuration.  However, we also change the default domain to the
reserved `example.com`.

We also update the standard mail tests to use the `--EXTENSIONS--`
section (instead of skipping the tests if ext/imap is not available).

Finally, we fix bug80751.phpt to expect the configured To and Cc mail
addresses.

[1] <https://www.hmailserver.com/>

Closes GH-8357.
2022-05-12 14:58:22 +02:00
Christoph M. Becker 81d1a1b47b Update bug tracker links
The new php-src bugtracker is on Github.

Closes GH-8277.
2022-05-12 14:55:11 +02:00
Max Kellermann c732549200 ext/opcache/ZendAccelerator: fix accel_deactivate_now() prototype (#8541)
Fixes -Wstrict-prototypes warning introduced by commit 04a4864b65
2022-05-12 13:19:30 +02:00
Derick Rethans 1eab5b7970 GH-8458: DateInterval::createFromDateString does not throw non-relative items are present 2022-05-11 13:52:12 +01:00
Christoph M. Becker 97ea6ad0e6 Test snmp on Windows CI
We use the snmpd which is now bundled with the net-snmp dependency, and
the MIBS which are also shipped with it.

We also fix the tests/snmpd.conf, and mark two failing tests as XFAIL.

Closes GH-8503.
2022-05-11 13:24:23 +02:00
Dmitry Stogov 89fa77516c Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix type inference
2022-05-11 12:40:16 +03:00
Dmitry Stogov 84c1e99ecf Fix type inference
This fizes oss-fuzz #47044
2022-05-11 12:39:26 +03:00
Dmitry Stogov 2495459e50 Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix type inference
2022-05-11 12:10:00 +03:00
Dmitry Stogov f1fc58ed8d Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix type inference
2022-05-11 12:09:53 +03:00
Dmitry Stogov 3f1e1b9ddf Fix type inference
This fixes oss-fuzz #47049
2022-05-11 12:09:11 +03:00
Christoph M. Becker 3cb3ee6c1e Drop useless network/syslog_basic.phpt (#8526)
This test asserts that `syslog()` returns true, but that is the case
anyway[1].  Since there is already misc/syslog_basic.phpt, the test has
no further raison d'être.

[1] <https://github.com/php/php-src/blob/d4e24e72afc269f392eabd74abeb6ea86894740d/ext/standard/basic_functions.stub.php#L697-L698>
2022-05-10 17:23:58 +01:00
Ollie Read f590782b60 Add ReflectionMethod::hasPrototype method
Closes GH-8487.
2022-05-09 16:48:54 +02:00
Christoph M. Becker 6db78f3ed9 Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix test wrt. deprecation of float to int conversions
2022-05-09 14:07:54 +02:00
Christoph M. Becker e9e2cf0230 Fix test wrt. deprecation of float to int conversions
Instead of passing `1073746742.75` to an int parameter, we just do the
calculation upfront (and round up), since the actual calculation does
not matter here anyway.
2022-05-09 14:05:57 +02:00
Nicolas Grekas be11bcb0b1 Add ReflectionFunction::isAnonymous()
Closes GH-8499.
2022-05-09 12:56:10 +02:00
Christoph M. Becker 7e272b9a10 Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix mysqli tests wrt. MySQL 8.0.28
2022-05-09 10:57:52 +02:00
Christoph M. Becker 8e688e0cf2 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix mysqli tests wrt. MySQL 8.0.28
2022-05-09 10:57:30 +02:00
Christoph M. Becker a7a590211e Fix mysqli tests wrt. MySQL 8.0.28
As of MySQL 8.0.28, `utf8mb3` charset is reported by the server, but
mysqlnd doesn't support it yet.  As a stop-gap measure, we ignore that
charset for now.

Closes GH-8480.
2022-05-09 10:55:32 +02:00
Christoph M. Becker c2ca9cd73f Don't unnecessarily skip mb related tests
Apparently, these tests have been overlooked when we switched to using
the `--EXTENSIONS--` section.  That caused to skip these tests on
AppVeyor.

Closes GH-8504.
2022-05-06 15:48:21 +02:00
Christoph M. Becker c9787b4785 Fix skip clause
The function required is called `mb_ereg_search()`.
2022-05-06 15:41:10 +02:00
Arnaud Le Blanc 0a5a761104 Merge branch 'PHP-8.1' 2022-05-06 15:29:21 +02:00
Arnaud Le Blanc f07a08df5c Fix unregistering ini entries of dynamically loaded extension (#8435)
Fixes GH-8185
2022-05-06 15:25:44 +02:00
Derick Rethans 5164f60c88 Merge branch 'PHP-8.1' 2022-05-05 15:24:14 +01:00
Derick Rethans 7670ee4342 Merge branch 'PHP-8.0' into PHP-8.1 2022-05-05 15:24:10 +01:00
Derick Rethans 92f8f19d50 Fixed GH-8471: Segmentation fault when converting immutable and mutable DateTime instances created using reflection 2022-05-05 12:10:50 +01:00
Ilija Tovilo 9a90bd7054 Deprecate ${} string interpolation
https://wiki.php.net/rfc/deprecate_dollar_brace_string_interpolation
2022-05-05 10:14:56 +02:00
Christoph M. Becker 710294c9a5 Fix zend_test tests
The `--EXTENSIONS--` directive isn't properly supported prior to PHP
8.1.0, so we use the classic `--SKIPIF--` instead.
2022-05-04 11:29:08 +02:00
Derick Rethans d54bcbb43b Add DatePeriod's __serialize and __unserialize methods (#8464) 2022-05-03 22:06:17 +01:00
Máté Kocsis da857c94a4 Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix get_function_or_method_name when included file is scoped
2022-05-03 21:38:32 +02:00
Máté Kocsis 510061b595 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix get_function_or_method_name when included file is scoped
2022-05-03 21:36:42 +02:00
vajexal 74924ada93 Fix get_function_or_method_name when included file is scoped (#8467) 2022-05-03 21:34:01 +02:00
Máté Kocsis fc04a6ebdd Throw when calling ReflectionAttribute::__construct()
ReflectionAttribute::__construct() accepted any number of parameters until now, because parameter validation was missing. Even though this was unlikely to be an issue in practice (since the method is private), the problem is fixed by always throwing an exception.
2022-05-03 21:23:22 +02:00
Máté Kocsis ef5478b823 Reorder param parsing and reflection object retrieval 2022-05-03 20:34:00 +02:00
Christoph M. Becker 59272266ee Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix test for curl 7.83.0
2022-05-03 15:08:43 +02:00
Christoph M. Becker 722e9b9fa5 Fix test for curl 7.83.0
libcurl 7.83.0 removed some trailing exclamation marks from error
messages[1]; we have to cater to that.

[1] <https://github.com/curl/curl/commit/6968fb9d54dc3a1aaa1b16088f038eaf5dd8b2d7>

(cherry picked from commit a4179e4c92)
2022-05-03 15:07:50 +02:00
Christoph M. Becker e5d9859b50 Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix GH-8235: iterator_count() may run indefinitely
2022-05-03 12:59:59 +02:00
Christoph M. Becker e004e1a93b Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix GH-8235: iterator_count() may run indefinitely
2022-05-03 12:59:39 +02:00
Christoph M. Becker ad7b9f4e50 Fix GH-8235: iterator_count() may run indefinitely
We need to prevent integer overflow to eventually stop the iteration.

A test case doesn't appear sensible for this, because even on 32bit
architectures a respective test easily runs for a few minutes.

Closes GH-8447.
2022-05-03 12:57:58 +02:00
Christoph M. Becker e7a79719cc Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix PDO URI test
2022-05-03 12:44:32 +02:00
Christoph M. Becker 7612ea8121 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix PDO URI test
2022-05-03 12:43:14 +02:00
Michael Voříšek 136ef6f129 Fix PDO URI test
Especially for remote servers, the respective part of the test may fail
for a lot of different reasons; instead of trying to catch all, we
rewrite to not fail, still testing for the contained NUL byte.

Closes GH-8451.
2022-05-03 12:12:41 +02:00
Remi Collet 6672a5ecfe bump zip version 2022-05-02 15:18:02 +02:00
Martin Rehberger 62a650ab7d bug: Fix type for $index in ZipArchive::replaceFile 2022-05-02 14:22:17 +02:00