codinghuang
5bda4cd25a
Support specifying start position in compile_string
...
Add additional zend_compile_position argument, which can be either
AT_SHEBANG, AT_OPEN_TAG or AFTER_OPEN_TAG. The previous behavior
corresponds to AFTER_OPEN_TAG.
Closes GH-7462.
2021-09-30 10:21:33 +02:00
Máté Kocsis
4483ecf5a9
Properly escape the default value of string properties and enum cases
2021-09-02 16:53:31 +02:00
Nikita Popov
32d48212ea
Support generating internal enum decl from stubs
2021-08-31 14:19:37 +02:00
Go Kudo
eaac77f4e7
Fix nested namespaced typed property in gen_stub.php ( #7418 )
...
Property escape namespaced class name in property types.
2021-08-31 11:56:39 +02:00
Nikita Popov
a374230c15
Add support for internal enums
...
This adds support for internal enums with the same basic approach
as userland enums. Enum values are stored as CONSTANT_AST and
objects created during constant updating at runtime. This means
that we need to use mutable_data for internal enums.
This just adds basic support and APIs, it does not include the
stubs integration from #7212 .
Closes GH-7302.
2021-07-27 09:19:14 +02:00
Máté Kocsis
fc56de113c
Add support for generating readonly properties via stubs ( #7297 )
2021-07-22 11:09:10 +02:00
Máté Kocsis
b382883696
Indent stubs inside global namespace blocks ( #7261 )
2021-07-20 10:23:58 +02:00
Máté Kocsis
fcd18757b2
Add reproducer for possible issue with object return type inheritance ( #6961 )
...
Fix early inheritance
Co-authored-by: Joe Watkins <krakjoe@php.net>
2021-05-10 12:52:59 +02:00
Máté Kocsis
803779e84b
Add support for generating properties with union type of multiple classes
...
Closes GH-6701
2021-02-16 15:50:13 +01:00
Máté Kocsis
bf0f6aaf18
Improve class entry generation
...
Related to GH-6701
2021-02-16 13:09:56 +01:00
Máté Kocsis
45fa7596dc
Add missing classes to stubs
2021-02-09 22:38:06 +01:00
Máté Kocsis
99b08ac281
Implicitly enable function entry generation when class entry generation is enabled
...
Closes GH-6675
2021-02-09 13:37:24 +01:00
Tyson Andre
5e06dad411
Properly render 2+ namespaces functions in build/gen_stub.php
...
Affects ZEND_NS_FE
Add test cases of the global function
Backported to php 8.0 from GH-6664
2021-02-06 14:17:14 -05:00
Tyson Andre
b4c6d5f799
Properly render 2+ namespaces functions in build/gen_stub.php
...
Affects both INIT_NS_CLASS_ENTRY and ZEND_NS_FE
Add test cases of the global function and namespaced values
Closes GH-6664
2021-02-06 14:09:25 -05:00
Máté Kocsis
1954e59758
Add support for generating class entries from stubs
...
Closes GH-6289
Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
2021-01-26 11:50:36 +01:00
Nikita Popov
c96d884d91
Avoid namespaced class symbol clashes in gen_stub
...
Add the namespace prefix (using underscores) to both the arginfo
name and the method declaration name.
2020-10-07 12:13:52 +02:00
Nikita Popov
9c710b1d11
Support "static" type in gen_stub
2020-10-07 11:34:14 +02:00
Nikita Popov
dfa6d1c22e
Support specifying linkage for generate-function-entries
...
The linkage can be specified as the argument to the
@generate-function-entries tag. Test this on zend_test.
2020-10-02 17:21:16 +02:00
Levi Morrison
94fd52dd09
Add Z_PARAM_ITERABLE and co
2020-09-03 07:03:12 -06: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
Nikita Popov
df2749da70
Tweak zend_test arginfo/zpp
2020-07-21 15:33:01 +02:00
Máté Kocsis
b18b2c8fe5
Add string or object ZPP macros
...
Closes GH-5788
2020-07-06 12:42:02 +02:00
Nikita Popov
c9b9f525a9
Include stub hash in generated arginfo files
...
The hash is used to check whether the arginfo file needs to be
regenerated. PHP-Parser will only be downloaded if this is actually
necessary.
This ensures that release artifacts will never try to regenerate
stubs and thus fetch PHP-Parser, as long as you do not modify any
files.
Closes GH-5739.
2020-06-24 09:55:19 +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
3fe49d81f8
Generate method entries from stubs for a couple of extensions
...
Closes GH-5368
2020-04-11 13:28:53 +02:00
Máté Kocsis
3709e74b5e
Store default parameter values of internal functions in arg info
...
Closes GH-5353. From now on, PHP will have reflection information
about default values of parameters of internal functions.
Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
2020-04-08 18:37:51 +02:00
Máté Kocsis
610815c0ce
Improve gen_stub.php
...
Closes GH-5350
Add support for generating deprecated function entries, as well as forward declaration
of function aliases.
2020-04-04 23:52:33 +02:00
Nikita Popov
02a685ead3
Fix stub for zend_terminate_string()
2020-04-03 18:21:40 +02:00
Nikita Popov
2bcc4ab8f4
Verify that all stubs have a return type
2020-04-03 17:59:30 +02:00
Nikita Popov
d2c92d7fd3
Stubs: Store information per-class
...
We'll need this if we want to generate method entries.
2020-04-03 16:20:47 +02:00
Nikita Popov
631c6e7f78
Add missing zend_test stubs
2020-02-25 11:18:15 +01:00
Nikita Popov
e99d5d3923
Add stubs for zend_test
2020-02-13 16:51:34 +01:00