1
0
mirror of https://github.com/php/doc-en.git synced 2026-03-23 23:32:18 +01:00

59 Commits

Author SHA1 Message Date
Tim Düsterhus
ce98b568f8 Add &warn.deprecated.function-*; to all deprecated functions 2025-10-04 16:28:55 +02:00
Tim Düsterhus
42d5fb01e0 Update function attributes
Generated with:

     build/gen_stub.php --replace-methodsynopses **.stub.php ../phpdoc/en/

And then manually picked the changes.
2025-10-04 16:04:02 +02:00
philip
c4aabaa0b9 Clarifies the following:
* ReflectionClass::setStaticPropertyValue() can only set public static properties.
* ReflectionProperty::setValue() can set public, private, and protected properties.
* ReflectionClass::setStaticPropertyValue() now throws a fatal error when trying to
  set private or protected properties; previously (before 7.4) it threw a ReflectionException.
Also updated examples and text accordingly.
This closes https://github.com/php/doc-en/issues/2987
2025-02-28 19:41:15 -08:00
Mikhail Alferov
79c0572a57 ReflectionProperty Fix typo, CS nits (#4481)
* getrawvalue.xml Fix typo, and add a newlines for more readable output

* getsettabletype.xml Cs nits

* hashook.xml Remove the extra dot
2025-02-22 19:29:43 +00:00
Mikhail Alferov
366a10b130 gethook.xml Remove the extra dot (#4480) 2025-02-22 08:15:25 -08:00
ADmad
49ef347a18 Change print to echo 2025-02-22 14:34:36 +00:00
ADmad
a16ad380e5 Add output for examples of ReflectionProperty methods. 2025-02-22 14:34:36 +00:00
Larry Garfield
e0e74c05cb Hooks reflection (#4110)
* Add reflection stubs for property hooks

* Document getHook().

* Document hasHook()

* Document getSettableType()

* Document getHooks()

* Document hasHooks()

* Document isFinal()

* Document isPrivateSet() and isProtectedSet()

* Document setRawValue()

* Document getRawValue()

* Document isVirtual()

* Document PropertyHookType.

* Document isAbstract()

---------

Co-authored-by: Gina Peter Banyard <girgias@php.net>
2025-02-21 19:16:44 +00:00
Alexandre Daubois
969db61a5f Add ReflectionProperty::isDynamic() (#4292) 2024-12-21 00:49:29 +00:00
Gina Peter Banyard
6d25b8ee66 PHP-8.4: Changelogs for __toString methods that return doc comment 2024-11-12 23:09:52 +00:00
Gina Peter Banyard
790f63af65 PHP 8.4: Document reflection changes (#4037) 2024-11-12 14:36:24 +00:00
Arnaud Le Blanc
c0fa5077c8 Document lazy objects (#3975) 2024-11-04 14:37:18 +00:00
Larry Garfield
16f66c05a4 Asymmetric Visibility and Final properties (#3828)
* Document asymmetric property visibility.

* Document the change in implicit visibility for readonly.

* Document final properties.

* Note that isPublic/Protected/Private is only in reference to the main visibility.

* Use more note tags.

* Remove unnecessary para tags.

Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
2024-10-15 19:49:15 +01:00
Mikhail Alferov
c1aba02c47 Fixed function argument in example (#3267)
In strict mode: Fatal error: Uncaught TypeError: var_export(): Argument #2 ($return) must be of type bool, int given
2024-03-17 18:04:12 +00:00
Andrew Lyons
0a8a502764 [PHP 8.3]: The ReflectionProperty::setValue $object is now required. (#2923) 2023-11-07 16:48:39 +00:00
Kyle
c20aa1db4e Document ReflectionProperty::setValue PHP 8.3 deprecation (#2594) 2023-10-06 17:31:26 +01:00
Tim Starling
ca840c9a6d Reflection: fix some "undocumented" methods, and some other edits for consistency (#2516)
* If a method has a refpurpose, description, parameters and return
  values, it's documented, there's no need for the warning box.
* Add description where there was none. It is usually very similar
  to the refpurpose.
* Document ReflectionZendExtension::__construct(), and update
  ReflectionExtension::__construct() for consistency.
* In ReflectionFunction::__toString()
* Remove some references to deprecated export() methods.
* Add example for ReflectionParameter::__toString().
2023-06-16 02:14:23 +01:00
iggyvolz
9f89eee340 Constructor promotion does not promote default values
Closes GH-1621.
2023-01-18 15:42:53 +01:00
Ollie Read
fadab82e11 Missing getAttributes documentation
Closes GH-1567.
2023-01-16 16:56:52 +01:00
Máté Kocsis
ec2fe9a592 Update ext/reflection role attributes (#1979) 2022-12-11 20:53:33 +01:00
Christoph M. Becker
12dce4f0cc ReflectionProperty::(g|s)etValue() no longer needs ::setAccessible()
This integrates user note 127516.
2022-09-07 12:15:39 +02:00
George Peter Banyard
967b4787ba Remove return value section for Reflection constructors 2022-04-08 00:45:55 +01:00
Kamil Tekiela
ab58951f68 Remove &warn.undocumented.func; from Reflection
Removed from all the places where it wasn't stricly necessary.

Closes GH-1217.
2022-03-29 16:49:06 +02:00
Yoshinari Takaoka
49eff29e8e replaced class with method.
Because these classes are NOT originally `final` class in PHP 8.0.
https://github.com/php/php-src/blob/PHP-8.0/ext/reflection/php_reflection.stub.php
2021-12-03 00:51:27 +09:00
Sergey Panteleev
83b6431800 [PHP 8.1] Remove final modifier from __clone() (#1131)
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
2021-12-02 15:16:08 +03:00
Yoshinari Takaoka
d73c3dcbd6 [PHP 8.1] Document readonly properties. (#1047)
* [PHP 8.1] Document readonly properties.

* added ReflectionProperty::isReadOnly method.

* Apply suggestions from code review

Co-authored-by: Sergey Panteleev <sergey@php.net>

* Update language/oop5/properties.xml

Co-authored-by: Nikita Popov <nikita.ppv@googlemail.com>

* Update language/oop5/properties.xml

Co-authored-by: Nikita Popov <nikita.ppv@googlemail.com>

* added link to readonly-properties docs.

Co-authored-by: Sergey Panteleev <sergey@php.net>
Co-authored-by: Nikita Popov <nikita.ppv@googlemail.com>
2021-11-27 13:00:13 -06:00
Christoph M. Becker
7b6a20ed5d Reflection(Property|Method)::setAccessible() no longer has effect
Cf. <https://wiki.php.net/rfc/make-reflection-setaccessible-no-op>.
2021-11-26 21:03:53 +01:00
Kim Hallberg
327a44719a Fix 81385: ReflectionProperty::isPromoted() is missing from documentation
Closes GH-937.
2021-10-20 11:11:30 +02:00
Máté Kocsis
b0b19b6618 Generate methodsynopses based on stubs for recent changes (#903) 2021-10-01 17:23:05 +02:00
jrfnl
67a54da71f ReflectionProperty: fix a few references to wrong class name(s)
These methods only exist on the `ReflectionProperty` class, not on `ReflectionClass`.
2021-07-02 13:38:11 +01:00
Yoshinari Takaoka
969080b592 Added ReflectionAttribute related Documentation. (#588)
* Added ReflectionAttribute related Documentation.

* Update reference/reflection/reflectionattribute/isrepeated.xml

Co-authored-by: Benjamin Eberlei <kontakt@beberlei.de>

* Update reference/reflection/reflectionattribute/isrepeated.xml

Co-authored-by: Benjamin Eberlei <kontakt@beberlei.de>

* Update reference/reflection/reflectionattribute/newinstance.xml

Co-authored-by: Benjamin Eberlei <kontakt@beberlei.de>

* Update reference/reflection/reflectionattribute/newinstance.xml

Co-authored-by: Benjamin Eberlei <kontakt@beberlei.de>

* Update reference/reflection/reflectionclass/getattributes.xml

Co-authored-by: Benjamin Eberlei <kontakt@beberlei.de>

* Update reference/reflection/reflectionclassconstant/getattributes.xml

Co-authored-by: Benjamin Eberlei <kontakt@beberlei.de>

* Update reference/reflection/reflectionfunctionabstract/getattributes.xml

Co-authored-by: Benjamin Eberlei <kontakt@beberlei.de>

* Update reference/reflection/reflectionparameter/getattributes.xml

Co-authored-by: Benjamin Eberlei <kontakt@beberlei.de>

* Update reference/reflection/reflectionproperty/getattributes.xml

Co-authored-by: Benjamin Eberlei <kontakt@beberlei.de>

Co-authored-by: Benjamin Eberlei <kontakt@beberlei.de>
2021-06-04 20:20:42 +09:00
Christoph M. Becker
6f41560bf1 Fix #81065: Changes to Reflection modifiers not documented 2021-05-23 14:46:27 +02:00
Yoshinari Takaoka
d3191e2f3c replaced deprected warning with deprecated-removed one. 2021-05-02 14:18:03 +09:00
Sergey Panteleev
f9c4a68ef4 Removed references to PHP 5, PHP 7.0 (#548) 2021-04-26 11:46:55 +03:00
Anna Filina
cc422ba8c7 Fix #55026: Document access to protected/private members using reflection
Closes GH-325.
2021-01-12 12:57:40 +01:00
George Peter Banyard
a2afb71b63 Extend ReflectionProperty::hasDefaultValue() example
Closes GH-295.
2021-01-08 00:14:21 +01:00
Máté Kocsis
98df2cf9a9 Generate reflection methodsynopses based on stubs
We also document the new `$filter` parameter for the `ReflectionClass`
methods `::getConstants()` and `::getReflectionConstants()` and the
respective constants.

Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>

Closes GH-298.
2020-12-31 17:03:54 +01:00
Christoph Michael Becker
d960106581 Document ReflectionProperty::getDefaultValue and ::hasDefaultValue
Patch provided by Benjamin Eberlei <kontakt@beberlei.de>.


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@351090 c90b9560-bf6c-de11-be94-00142212c4b1
2020-10-30 16:38:02 +00:00
Christoph Michael Becker
41445b3d77 Mark up nullable types as union types
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@351076 c90b9560-bf6c-de11-be94-00142212c4b1
2020-10-30 10:47:17 +00:00
Christoph Michael Becker
a465b89916 Reflection*::export is deprecated as of PHP 7.4.0
Seems we're overdue actually documenting these methods.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@350501 c90b9560-bf6c-de11-be94-00142212c4b1
2020-09-03 08:59:26 +00:00
Christoph Michael Becker
c4c885db2f Fix #78936: Reflection methods for typed properties not documented
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@348478 c90b9560-bf6c-de11-be94-00142212c4b1
2019-12-09 15:22:24 +00:00
Christoph Michael Becker
1c1b29f597 Fix #65011: ReflectionProperty::getDocComment() fails for multiple variable declarations
We add an example to clarify the behavior.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@345251 c90b9560-bf6c-de11-be94-00142212c4b1
2018-06-30 12:42:20 +00:00
Andrey Andreev
584095e7e8 Consistent description of getModifiers() in ReflectionClass, ReflectionMethod, ReflectionProperty
(relevant for the 'seealso' section on Reflection::getModifierNames())

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@342105 c90b9560-bf6c-de11-be94-00142212c4b1
2017-03-13 09:28:54 +00:00
Thomas Punt
d640c0f5e1 Quick cleanup
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@338414 c90b9560-bf6c-de11-be94-00142212c4b1
2016-01-06 20:13:41 +00:00
Thomas Punt
4d8bee3f1d Finish documenting ReflectionProperty::getDocComment
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@338413 c90b9560-bf6c-de11-be94-00142212c4b1
2016-01-06 20:03:57 +00:00
Christoph Michael Becker
d6d57b5f93 we can do better than in previous commit
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@337486 c90b9560-bf6c-de11-be94-00142212c4b1
2015-08-15 16:32:55 +00:00
Christoph Michael Becker
5399e97fab improved ReflectionProperty::isDefault() docs
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@337485 c90b9560-bf6c-de11-be94-00142212c4b1
2015-08-15 16:29:14 +00:00
Christoph Michael Becker
878a454b06 The isDefault method for ReflectionProperty is unclear in the description. This patch aims to clarify the wording.
-- 
Provided by anonymous 61022 (james@asgrim.com)

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@337484 c90b9560-bf6c-de11-be94-00142212c4b1
2015-08-15 16:15:48 +00:00
Maciek Sokolewicz
68b5b97731 fixed various english grammar/spelling mistakes (patches by cmb)
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@336240 c90b9560-bf6c-de11-be94-00142212c4b1
2015-03-29 18:38:13 +00:00
Peter Cowburn
d384c3f8e2 "See also" List extended to easily find the methods for other visibilities and static
-- 
Provided by anonymous 46594

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@334176 c90b9560-bf6c-de11-be94-00142212c4b1
2014-07-07 12:27:00 +00:00