summaryrefslogtreecommitdiff
path: root/ext/reflection/php_reflection.stub.php
Commit message (Collapse)AuthorAgeFilesLines
* Implement enumsIlija Tovilo2021-03-171-0/+37
| | | | | | | | RFC: https://wiki.php.net/rfc/enumerations Co-authored-by: Nikita Popov <nikita.ppv@gmail.com> Closes GH-6489.
* Used typed properties for reflection $name and $classNikita Popov2021-02-151-22/+10
| | | | | These are read-only properties, and Reflection makes sure to assign only strings.
* Generate class entries from stubs for phar, posix, pspell, readline, ↵Máté Kocsis2021-02-151-1/+31
| | | | | | reflection, session, shmop Closes GH-6692
* Fix ReflectionClass::getConstants() stubChristoph M. Becker2021-01-011-1/+1
| | | | | | | If `zval_update_constant_ex()` fails, an exception has already been thrown, so we clarify that in the implementation as well. Closes GH-6557.
* Revert "Make ReflectionUnionType final"Nikita Popov2020-10-261-1/+1
| | | | | | | This reverts commit ef6adb4e27853eb19bf50bad6486311920d6af7b. Per Ondrej's comment, this is already being used by BetterReflection adaptors, ugh.
* Make ReflectionUnionType finalMáté Kocsis2020-10-251-1/+1
| | | | Closes GH-6384
* Require stubs to declare return types for magic methods when possibleMáté Kocsis2020-10-231-10/+10
| | | | Closes GH-6376
* Make the $filter parameter of ReflectionClass::get*Constants() nullableMáté Kocsis2020-09-291-2/+2
|
* Reflection param renames amendmentMáté Kocsis2020-09-291-4/+4
| | | | Closes GH-6230
* Add support for `@implementation-alias` in stubsMáté Kocsis2020-09-211-8/+8
| | | | Closes GH-6170
* Check `ReflectionReference::fromArrayElement` with union typesGabriel Caruso2020-09-151-2/+1
| | | | | | | ReflectionReference::fromArrayElement(array $array, int|string $key): ?ReflectionReference is going to be its official signature for PHP 8.0. Closes GH-5651
* Refactor ReflectionMethod::__construct()Máté Kocsis2020-09-111-2/+1
| | | | Closes GH-6098
* Use ZPP instead of custom type checksMáté Kocsis2020-09-041-2/+1
| | | | We can add these types as a native type declaration to stubs as a side-effect. Closes GH-6068
* Add a few missing parameter types in stubsMáté Kocsis2020-07-301-4/+4
| | | | Related to GH-5627
* Cleanup argument handling in ext/reflectionMáté Kocsis2020-07-241-27/+16
| | | | Closes GH-5850
* Make ReflectionGenerator finalNikita Popov2020-07-211-1/+1
| | | | This class is not safe against malicious extension / instantiation.
* ReflectionMethod::invoke() object is not optionalNikita Popov2020-07-061-1/+1
|
* Implement Attribute Amendments.Martin Schröder2020-06-291-0/+2
| | | | | | | | | RFC: https://wiki.php.net/rfc/attribute_amendments Support for attribute grouping is left out, because the short attribute syntax RFC will likely make it obsolete. Closes GH-5751.
* Add $filter parameter for ReflectionClass::(getConstants|getReflectionConstants)Gabriel Caruso2020-06-071-2/+2
| | | | | | | | | | | | | | | | This solves [#79628](https://bugs.php.net/79628). Similar to `ReflectionClass::getMethods()` and `ReflectionClass::getProperties()`, this new `$filter` argument allows the filtering of constants defined in a class by their visibility. For that, we create three new constants for `ReflectionClassConstant`: * `IS_PUBLIC` * `IS_PROTECTED` * `IS_PRIVATE` Closes GH-5649.
* Implement "Constructor Promotion" RFCNikita Popov2020-06-051-0/+4
| | | | | | RFC: https://wiki.php.net/rfc/constructor_promotion Closes GH-5291.
* Add AttributesBenjamin Eberlei2020-06-041-0/+26
| | | | Co-authored-by: Martin Schröder <m.schroeder2007@gmail.com>
* Annotate internal functions with the mixed typeMáté Kocsis2020-05-251-2/+2
| | | | Closes GH-5618
* Deprecate old ReflectionParameter type declaration APIsNikita Popov2020-05-111-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | This deprecates: ReflectionParameter::isArray() ReflectionParameter::isCallable() ReflectionParameter::getClass() These APIs have been superseded by ReflectionParameter::getType() since PHP 7.0. Types introduced since that time are not available through the old APIs, and their behavior is getting increasingly confusing. This is how they interact with PHP 8 union types: * isArray() will return true if the type is array or ?array, but not any other union type * Same for isCallable(). * getClass() will return a class for T|int etc, as long as the union only contains a single type. T1|T2 will return null. This behavior is not particularly reasonable or useful, and will get more confusing as new type system extensions are added. Closes GH-5209.
* Use int|string Fast ZPP macro in ReflectionGeorge Peter Banyard2020-05-061-3/+2
| | | | | | | Moreover, throw a more appropriate ValueError in case the integer position provided is less than 0. Closes GH-5513
* Completely remove disabled functions from function tableNikita Popov2020-04-301-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, disabling a function only replaces the internal function handler with one that throws a warning, and a few places in the engine special-case such functions, such as function_exists. This leaves us with a Schrödinger's function, which both does not exist (function_exists returns false) and does exist (you cannot define a function with the same name). In particular, this prevents the implementation of robust polyfills, as reported in https://bugs.php.net/bug.php?id=79382: if (!function_exists('getallheaders')) { function getallheaders(...) { ... } } If getallheaders() is a disabled function, this code will break. This patch changes disable_functions to remove the functions from the function table completely. For all intents and purposes, it will look like the function does not exist. This also renders two bits of PHP functionality obsolete and thus deprecated: * ReflectionFunction::isDisabled(), as it will no longer be possible to construct the ReflectionFunction of a disabled function in the first place. * get_defined_functions() with $exclude_disabled=false, as get_defined_functions() now never returns disabled functions. Fixed bug #79382. Closes GH-5473.
* Generate method entries for ext/session and ext/reflectionMáté Kocsis2020-04-131-2/+15
| | | | Closes GH-5376
* Fix nullable types in PHPDocMáté Kocsis2020-04-121-15/+15
|
* Remove most uses of _default_get_name()Nikita Popov2020-04-071-5/+5
| | | | | | Instead fetch the name from the respective structure. The only place where this is still used is ReflectionClassConst, as zend_class_const does not store the name.
* Eliminate uses of _default_load_name()Nikita Popov2020-04-071-4/+4
| | | | | | Instead fetch the name from the function/class/property, as appropriate. This makes us independent of the property, and eliminates error conditions related to it.
* Verify that all stubs have a return typeNikita Popov2020-04-031-0/+9
|
* Define Stringable with __toString():string methodNicolas Grekas2020-03-021-22/+11
|
* Remove the deprecated reflection export methodsMáté Kocsis2020-02-191-20/+0
| | | | Closes GH-5188
* Revert "Replace @param annotations with type declarations"Christoph M. Becker2020-02-171-5/+13
| | | | This reverts commit c31029f335ca1b453af799805c43c37e959ad555.
* Replace @param annotations with type declarationsChristoph M. Becker2020-02-161-13/+5
|
* Always invoke zpp in ReflectionProperty::getValue/isInitializedNikita Popov2020-02-101-1/+1
| | | | | | Make sure we still perform a zpp check for the static case, and also always enforce that the parameter is ?object. Otherwise we violate the specified signature.
* Rename reflection stub fileNikita Popov2020-02-101-0/+647
Where possible, the stub file should match the name of the C file, so that the build system integration automatically recompiles it.