Commit Graph

15 Commits

Author SHA1 Message Date
Nikita Popov
814a932734 Add ZEND_ACC_NOT_SERIALIZABLE flag
This prevents serialization and unserialization of a class and its
children in a way that does not depend on the zend_class_serialize_deny
and zend_class_unserialize_deny handlers that will be going away
in PHP 9 together with the Serializable interface.

In stubs, `@not-serializable` can be used to set this flag.

This patch only uses the new flag for a handful of Zend classes,
converting the remainder is left for later.

Closes GH-7249.
Fixes bug #81111.
2021-07-19 15:59:11 +02:00
Nikita Popov
008bfcc7ba Use NO_DYNAMIC_PROPERTIES for Closure
Instead of manually implementing this, use the standard mechanism.
This has minor behavior changes (e.g. doing an isset() will now
return false instead of throwing) which are more in line with
typical behavior.
2021-05-14 14:48:56 +02:00
Máté Kocsis
6ce70447ac
Generate zend class entries based on stubs
Closes GH-6685
2021-02-14 23:18:28 +01:00
Máté Kocsis
7aa2d3519b
Zend parameter renames amendment
Closes GH-6228
2020-09-29 11:04:09 +02:00
Nikita Popov
8e0789a21c Use proper parameter type in Closure::bindTo() signature 2020-09-21 14:46:10 +02:00
Máté Kocsis
b15885b522
Separate Closure::bind() implementations
Closure::bind() and Closure::bindTo() are currently reported as aliases in stubs because they have a single implementation. They are not aliases in fact though, they just use zend_parse_method_parameters() cleverly.

Thus, let's separate their implementation so that we don't have to alias Closure::bindTo() anymore. This will also have the advantage that the two ZPP implementations become more clear.

Closes GH-6169
2020-09-19 20:14:22 +02:00
Nikita Popov
befe10fd21 Fix bug #78770
Refactor the zend_is_callable implementation to check callability
at a particular frame (this is an implementation detail for now,
but could be exposed in the API if useful). Pick the first parent
user frame as the one to check.
2020-08-14 10:24:06 +02:00
Máté Kocsis
0d330e1a02
Add a few missing parameter types in stubs
Related to GH-5627
2020-07-30 14:26:45 +02:00
Máté Kocsis
5770b66722
Cleanup argument handling of Zend functions and methods
Closes GH-5847
2020-07-21 14:47:03 +02:00
Máté Kocsis
b3718430de
Annotate internal functions with the mixed type
Closes GH-5618
2020-05-25 17:30:57 +02:00
Máté Kocsis
d1d3a4afd5
Generate method entries for Closure 2020-05-19 14:19:37 +02:00
Máté Kocsis
ca006e54e3
Add missing visibility modifiers in stubs 2020-04-11 10:23:51 +02:00
Nikita Popov
2bcc4ab8f4 Verify that all stubs have a return type 2020-04-03 17:59:30 +02:00
Nikita Popov
0cec268d15 Support single class unions in gen stubs 2019-11-15 17:19:26 +01:00
Christoph M. Becker
273731fb76 Add Zend class/interface arginfo stubs
We also change `Generator::throw()` to expect a `Throwable` in the
first place, and we now throw a TypeError instead of returning `false`
from `Exception::getTraceAsString()`.
2019-10-15 16:21:00 +02:00