summaryrefslogtreecommitdiff
path: root/build/gen_stub.php
Commit message (Collapse)AuthorAgeFilesLines
* Add support for generating properties with union type of multiple classesMáté Kocsis2021-02-161-8/+22
| | | | Closes GH-6701
* Generate class entries from stubs for ldap, libxml, mbstring and mysqliMáté Kocsis2021-02-161-2/+3
| | | | Closes GH-6684
* Improve class entry generationMáté Kocsis2021-02-161-4/+4
| | | | Related to GH-6701
* Implicitly enable function entry generation when class entry generation is ↵Máté Kocsis2021-02-091-1/+3
| | | | | | enabled Closes GH-6675
* Properly render 2+ namespaces functions in build/gen_stub.phpTyson Andre2021-02-061-2/+3
| | | | | | | | Affects both INIT_NS_CLASS_ENTRY and ZEND_NS_FE Add test cases of the global function and namespaced values Closes GH-6664
* Add support for generating class entries from stubsMáté Kocsis2021-01-261-22/+473
| | | | | | Closes GH-6289 Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
* gen_stub: Also verify implementation-aliasNikita Popov2021-01-191-1/+1
| | | | | | | | This makes --verify also check @implementation-alias. Failures are ignored using @no-verify instead. Some mistakes have been made that would have been caught by this... Closes GH-6615.
* gen_stub: Don't use $aliasMap during verificationNikita Popov2021-01-181-1/+6
| | | | | | | | | Some functions have multiple aliases, while the $aliasMap can only record one. Methodsynopsis generation probably shouldn't use it either, but at least that case seems to only be interested in whether there is an alias at all.
* gen_stub: Compare phpdoc return type in --verifyNikita Popov2021-01-181-5/+6
|
* gen_stub: Allow additional text after @returnNikita Popov2021-01-181-1/+1
| | | | In case the stub file also contains documentation.
* gen_stub: Automatically add function name to exceptionsNikita Popov2021-01-181-106/+109
| | | | | This makes sure that it's present even on exceptions from deeper down the stack, where we can't add it manually.
* Add support for union types for internal functionsNikita Popov2021-01-121-26/+34
| | | | | | | | | This closes the last hole in the supported types for internal function arginfo types. It's now possible to represent unions of multiple classes. This is done by storing them as TypeA|TypeB and PHP will then convert this into an appropriate union type list. Closes GH-6581.
* Fix refentry attribute replacingMáté Kocsis2020-12-301-2/+2
|
* Add support for generating methodsynopses from stubsMáté Kocsis2020-12-281-45/+560
| | | | Closes GH-6367
* Fix parameter stats generationNikita Popov2020-10-261-1/+1
| | | | [ci skip]
* Require stubs to declare return types for magic methods when possibleMáté Kocsis2020-10-231-9/+9
| | | | Closes GH-6376
* Verify parameter names of function aliasesMáté Kocsis2020-10-161-26/+185
| | | | Closes GH-6335
* Avoid namespaced class symbol clashes in gen_stubNikita Popov2020-10-071-30/+52
| | | | | Add the namespace prefix (using underscores) to both the arginfo name and the method declaration name.
* Support "static" type in gen_stubNikita Popov2020-10-071-0/+9
|
* Add @generate-legacy-arginfo tagNikita Popov2020-10-051-1/+5
|
* Improve gen_stub.php - drop --legacy option, generate file is exists - add ↵Remi Collet2020-10-051-9/+19
| | | | --help option - add debug "Saved ..." message
* Support specifying linkage for generate-function-entriesNikita Popov2020-10-021-5/+10
| | | | | The linkage can be specified as the argument to the @generate-function-entries tag. Test this on zend_test.
* Add partial namespace support to gen_stubNikita Popov2020-10-021-73/+125
|
* Add gen_stub --legacy flagNikita Popov2020-10-021-2/+18
| | | | | | | | | This flag generates an arginfo file that discards all type and default value information. As such, it is compatible with old (and very old) PHP versions. Intended for use by extensions to generate one arginfo file for PHP 8 and one for older versions.
* Add option to print parameter name stats to gen_stubNikita Popov2020-09-241-9/+35
|
* Add support for `@implementation-alias` in stubsMáté Kocsis2020-09-211-1/+8
| | | | Closes GH-6170
* Add Z_PARAM_ITERABLE and coLevi Morrison2020-09-031-0/+2
|
* Check for duplicate names in gen_stub.phpTyson Andre2020-08-241-0/+6
| | | | | | | | | | | With named arguments in php 8.0, it's important that php's modules or PECL extensions using gen_stub.php don't generate functions with duplicate names. Warn if a parameter name is repeated, even if the last occurrence is a variadic parameter Closes GH-6035
* Remove custom hacks from gen_stub.php after PHP-Parser upgradeMáté Kocsis2020-08-231-5/+1
|
* Update PHP-Parser from 4.3.0 to 4.9.0Tyson Andre2020-08-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | PHP-Parser 4.3.0 failed to recognize that the `match` keyword could be used as a class constant name. 4.9.0 also adds support for keywords in namespaced names. See https://github.com/nikic/PHP-Parser/releases So forcing regeneration of spl_iterators.stub.php failed. PECL extensions using gen_stub.php would also be affected by the same issue. ``` ext/spl/spl_iterators.stub.php public function __construct(Iterator $iterator, string $regex, int $mode = self::MATCH, int $flags = 0, int $preg_flags = 0) {} ``` Testing: I successfully regenerated stubs by setting forceRegeneration to true and running `touch **/*.stub.php; make`. The stubs did not change, as expected. Closes GH-6036
* Check missing parameter types in stubsMáté Kocsis2020-08-131-4/+23
| | | | [skip ci] Closes GH-5627
* Support class+mask union for internal argumentNikita Popov2020-07-241-7/+14
|
* Add support for forcing regeneration of arginfo filesMáté Kocsis2020-07-021-16/+16
| | | | Closes GH-5795
* Check that "tokenizer" extension is available in gen_stub.phpNikita Popov2020-07-021-0/+4
|
* Include stub hash in generated arginfo filesNikita Popov2020-06-241-28/+48
| | | | | | | | | | | | 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.
* Annotate internal functions with the mixed typeMáté Kocsis2020-05-251-2/+13
| | | | Closes GH-5618
* manage ZEND_DEP_FALIAS in gen_stubRemi Collet2020-04-291-0/+7
|
* Make gen_stub parallelism safeNikita Popov2020-04-211-8/+29
| | | | | If PHP-Parser is not yet installed, make sure we don't try to install it N times in parallel.
* Make gen_stub.php compatible with PHP 7.1 againNikita Popov2020-04-141-2/+2
| | | | Not worth bumping requirements over this...
* Generate method entries for ext/domMáté Kocsis2020-04-131-1/+1
| | | | Closes GH-5374
* Fix an undefined class error running gen_stub in php8Tyson Andre2020-04-111-15/+15
| | | | | | | | | | | | For whatever reason, php 8 would not have loaded the subsequent classes when running `php build/gen_stub.php path/to/filename.php`. I assume it didn't load the classes immediately because there's a possibility the code before it would throw. (Probably because __toString was added recently and prevents early binding) Also, fix a typo Closes GH-5369
* Generate method entries from stubs for a couple of extensionsMáté Kocsis2020-04-111-7/+7
| | | | Closes GH-5368
* Add support for generating method entries from stubsMáté Kocsis2020-04-111-48/+224
| | | | Closes GH-5363
* Store default parameter values of internal functions in arg infoMáté Kocsis2020-04-081-15/+50
| | | | | | | 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>
* Move variable declaration closer to its usageMáté Kocsis2020-04-051-1/+1
|
* Improve gen_stub.phpMáté Kocsis2020-04-041-8/+22
| | | | | | Closes GH-5350 Add support for generating deprecated function entries, as well as forward declaration of function aliases.
* Annotate function aliases in stubsMáté Kocsis2020-04-041-0/+0
|
* Verify that all stubs have a return typeNikita Popov2020-04-031-7/+56
|
* Stubs: Store information per-classNikita Popov2020-04-031-13/+37
| | | | We'll need this if we want to generate method entries.
* Generate function entries from stubsNikita Popov2020-04-031-40/+147
| | | | | | | If @generate-function-entries is specified in the stub file, also generate function entries for the extension. Currently limited to free functions only.