Commit Graph

126867 Commits

Author SHA1 Message Date
Nikita Popov
85acad5688 Merge branch 'PHP-8.1'
* PHP-8.1:
  Add string return type to __toString() of internal classes
2021-11-09 10:21:16 +01:00
Nikita Popov
277caa1db0 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Add string return type to __toString() of internal classes
2021-11-09 10:20:36 +01:00
Nikita Popov
a551b08307 Add string return type to __toString() of internal classes
Same as with userland classes, automatically add a string return
type to __toString() methods in internal classes, so the signature
is compatible with Stringable.
2021-11-09 10:17:26 +01:00
Dmitry Stogov
fc60f2cce4 Merge branch 'PHP-8.1'
* PHP-8.1:
  Tracing JIT: Fixed missed type store in deoptimization code
2021-11-09 00:56:42 +03:00
Dmitry Stogov
eda9d7ac22 Tracing JIT: Fixed missed type store in deoptimization code 2021-11-09 00:55:40 +03:00
Dmitry Stogov
b7f19f2674 Merge branch 'PHP-8.1'
* PHP-8.1:
  Fixed incorrect reference counter inference
2021-11-08 20:55:09 +03:00
Dmitry Stogov
9bd490dc33 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fixed incorrect reference counter inference
2021-11-08 20:54:45 +03:00
Dmitry Stogov
535a0553e8 Fixed incorrect reference counter inference 2021-11-08 20:54:17 +03:00
Dmitry Stogov
85aa735bc7 Merge branch 'PHP-8.1'
* PHP-8.1:
  JIT: Fixed incorrect guard elimination
2021-11-08 20:09:40 +03:00
Dmitry Stogov
9db900926c Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  JIT: Fixed incorrect guard elimination
2021-11-08 20:09:01 +03:00
Dmitry Stogov
8fe808207f JIT: Fixed incorrect guard elimination 2021-11-08 20:08:39 +03:00
Nikita Popov
e506564e08 Merge branch 'PHP-8.1'
* PHP-8.1:
  Drop pi nodes for both old/new pred in replace_predecessor
2021-11-08 14:58:42 +01:00
Nikita Popov
e5c2ad45dd Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Drop pi nodes for both old/new pred in replace_predecessor
2021-11-08 14:57:16 +01:00
Nikita Popov
53df29bc29 Drop pi nodes for both old/new pred in replace_predecessor
We also need to drop pi nodes for new_pred here, as the pi node
restriction for new_pred is not necessarily true for control
coming from old_pred as well.

Fixes oss-fuzz #40782.
2021-11-08 14:56:42 +01:00
Dmitry Stogov
f823999d49 Merge branch 'PHP-8.1'
* PHP-8.1:
  Don't call _zend_hash_index_find() for packed arrays
2021-11-08 13:14:11 +03:00
Dmitry Stogov
03f149799a Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Don't call _zend_hash_index_find() for packed arrays
2021-11-08 13:13:48 +03:00
Dmitry Stogov
e868ded6ef Don't call _zend_hash_index_find() for packed arrays 2021-11-08 13:13:23 +03:00
Nikita Popov
76df12cff0 Merge branch 'PHP-8.1'
* PHP-8.1:
  Combine variance obligation processing and error reporting
2021-11-08 10:42:41 +01:00
Nikita Popov
b969ce3b98 Combine variance obligation processing and error reporting
I don't believe there's a reason anymore to first resolve all
delayed variance obligations, and then report errors if any are
left.  We can report errors directly when resolving obligations.
2021-11-08 10:42:03 +01:00
Derick Rethans
369ab3b53e Merge branch 'PHP-8.1' 2021-11-08 09:40:41 +00:00
Derick Rethans
904933e918 Fixed bug #81458: Regression: Incorrect difference after timezone change 2021-11-08 09:40:27 +00:00
Dmitry Stogov
dc06c0efc9 Merge branch 'PHP-8.1'
* PHP-8.1:
  JIT: Fixed incorrect guard elimination
2021-11-08 12:29:12 +03:00
Dmitry Stogov
b1b6440d84 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  JIT: Fixed incorrect guard elimination
2021-11-08 12:29:03 +03:00
Dmitry Stogov
7bf63243e1 JIT: Fixed incorrect guard elimination 2021-11-08 12:28:36 +03:00
Nikita Popov
53332b7f66 Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix bug #78647
2021-11-08 10:00:07 +01:00
Nikita Popov
a38f4f9881 Fix bug #78647
We can't take ownership of the delayed autoload table here. It is
important that pending classes get loaded before resolving variance
of any nested classed, as they might actually be lower in the
hierarchy.
2021-11-08 09:59:33 +01:00
Máté Kocsis
fdf63bfef3
Merge branch 'PHP-8.1'
* PHP-8.1:
  Add more specific array return type hints for various extensions - part 1
2021-11-07 08:48:49 +01:00
Máté Kocsis
d02b9b953d
Add more specific array return type hints for various extensions - part 1
ext/bz2, ext/calendar, ext/dba, ext/enchant

Closes GH-7432
2021-11-07 08:46:25 +01:00
George Peter Banyard
7db32add9b
Refactor dba_(p)open() to be more sensible (#7610)
Actually use ZPP
Throw ValueErrors for invalid values
Use dedicated struc members for file permission and map size instead of a zval stack
2021-11-06 23:09:40 +00:00
George Peter Banyard
a6cc76eeb8
Remove XFAIL
This was fixed in PHP 7 according to https://bugs.php.net/bug.php?id=61390 (which the linked commit points to)
2021-11-06 20:50:07 +00:00
Kamil Tekiela
9b433c2398
Fix SKIP in mysqli tests 2021-11-06 20:46:04 +00:00
Nikita Popov
ee2cec186c Merge branch 'PHP-8.1'
* PHP-8.1:
  Partially address bug #78647
2021-11-05 17:07:14 +01:00
Nikita Popov
a2fe8d48b1 Partially address bug #78647
Produce a sensible error message for the case where inheritance
should fail. There is still a remaining issue that we sometimes
fail inheritance while we should not.
2021-11-05 17:05:55 +01:00
Nikita Popov
fdf0455ff3 Merge branch 'PHP-8.1'
* PHP-8.1:
  Promote incorrect bzerr stream type to TypeError
2021-11-05 11:14:18 +01:00
Nikita Popov
c19c380323 Promote incorrect bzerr stream type to TypeError
This restores the signature we originally promised for PHP-8.0,
without the spurious false return type.
2021-11-05 11:13:08 +01:00
Nikita Popov
31fe384a7b Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix stubs for bzerr* functions
2021-11-05 11:10:39 +01:00
Nikita Popov
543bc88646 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix stubs for bzerr* functions
2021-11-05 11:09:57 +01:00
Nikita Popov
9b2a3c1c4f Fix stubs for bzerr* functions
These can return false if the stream is not a bz2 stream. Also
emit a warning in this case, this should not be failing silently.
2021-11-05 11:09:20 +01:00
Nikita Popov
edc02d2d94 Merge branch 'PHP-8.1'
* PHP-8.1:
  Implement Stringable automatically for internal classes
2021-11-05 10:24:07 +01:00
Nikita Popov
b0ec6223e2 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Implement Stringable automatically for internal classes
2021-11-05 10:23:23 +01:00
Nikita Popov
b302bfabe7 Implement Stringable automatically for internal classes
Requiring all internal classes (including those from 3rd-party
extensions) to implement Stringable if they provide __toString()
is too error prone. Case in point, our _ZendTestClass test class
was not doing so, resulting in preloading test failures after
recent changes.

Instead we automatically implement Stringable, the same as we do
for userland classes. We still allow explicit implementations,
but ignore them (normally they would result in an error due to
duplicate interface implementation). Finally, we need to be
careful about not trying to implement Stringable on Stringable
itself.

In some cases this changes the interface order, in particular the
automatic Stringable implementation will now come first.
2021-11-05 10:22:04 +01:00
Nikita Popov
2d38f701e0 Merge branch 'PHP-8.1'
* PHP-8.1:
  Don't implement Stringable on traits
2021-11-05 09:48:33 +01:00
Nikita Popov
4bdb271894 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Don't implement Stringable on traits
2021-11-05 09:48:28 +01:00
Nikita Popov
d478ae73b1 Don't implement Stringable on traits
Traits do not support interfaces, so we should not implement
Stringable on them.

Also check the __toString() return type in the same way other
magic methods do, otherwise we would now miss the check in the
trait case.
2021-11-05 09:42:58 +01:00
Nikita Popov
ce62a98534 Merge branch 'PHP-8.1'
* PHP-8.1:
  Remove unnecessary assertion
2021-11-04 17:01:04 +01:00
Nikita Popov
e291dcd836 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Remove unnecessary assertion
2021-11-04 17:00:58 +01:00
Nikita Popov
7e67366a9b Remove unnecessary assertion
zend_class_implements_interface works fine if the "class" is an
interface, so simply drop this assertion. This avoids the need to
special case this situation.
2021-11-04 17:00:17 +01:00
Nikita Popov
aefe802e05 Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix bug #81591: ignore_repeated_errors broken
2021-11-04 16:25:24 +01:00
Nikita Popov
6ebabaa50c Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix bug #81591: ignore_repeated_errors broken
2021-11-04 16:25:18 +01:00
Nikita Popov
4c171ed5eb Fix bug #81591: ignore_repeated_errors broken
We should suppress the error if the message is the same, not if
it's different. Apparently we had no test coverage for these
options.
2021-11-04 16:23:55 +01:00