Arnaud Le Blanc
a11c8a3039
Limit stack size ( #9104 )
2022-12-16 17:44:26 +01:00
Máté Kocsis
dc54e04ed4
Merge branch 'PHP-8.2'
...
* PHP-8.2:
Only include the default constructor for non-abstract class synopses
2022-12-16 17:03:22 +01:00
Máté Kocsis
d832125b8e
Only include the default constructor for non-abstract class synopses
2022-12-16 17:02:35 +01:00
Máté Kocsis
8afc55870e
Merge branch 'PHP-8.2'
...
* PHP-8.2:
Replace another root XML element format to the "canonical" one
Remove the superfluous closing parentheses from class synopsis page includes
Always include the constructor on the class manual pages
Backport methodsynopsis role attributes changes from master
2022-12-16 13:21:39 +01:00
Máté Kocsis
6aa5e58414
Backport methodsynopsis role attributes changes from master
...
Commits https://github.com/php/php-src/commit/93605f286d11876da44d2ecd41c13d7e3f0aae66 and https://github.com/php/php-src/commit/d6651426f405342f74cdfe930448912ef68e23c4
2022-12-16 13:18:12 +01:00
Máté Kocsis
0fc60fab72
Always include the constructor on the class manual pages
2022-12-16 13:18:12 +01:00
Máté Kocsis
b4df038cee
Remove the superfluous closing parentheses from class synopsis page includes
2022-12-16 13:18:12 +01:00
Máté Kocsis
60cf9fbee0
Replace another root XML element format to the "canonical" one
2022-12-16 13:18:12 +01:00
Máté Kocsis
d6651426f4
Escape the role attribute of namespaced classes ( #9952 )
2022-11-15 18:13:29 +01:00
Máté Kocsis
93605f286d
Make the usage of the role attribute more clear ( #9901 )
...
Currently, the role attribute is mainly used to differentiate OO and procedural "aliases" when they are documented on the same page (e.g. https://www.php.net/manual/en/datetime.diff.php ). However, these function-method counterparts are not always aliases in fact according to the stubs (#9491 ). That's why sometimes the usage of the role attribute is ambiguous, thus syncing the manual with the stubs results in false positive diffs.
This change fixes the problem by a very obtrusive way: by changing the value of all role="oop" attributes to the actual class name, like role="DateTime", and by getting rid of all role="procedural" attributes as they became unnecessary. This way, class synopsis pages can clearly reference methods, and skip functions. Additionally, gen_stub.php will be able to generate the correct methodsynopsis role even though a single page describes multiple methods, like `DateTime/DateTimeImmutable/DateTimeInterface::diff()`.
2022-11-10 08:35:46 +01:00
Máté Kocsis
a14e125baf
Merge branch 'PHP-8.2'
...
* PHP-8.2:
Do not display the value of UNKNOWN constants in the manual (#9843 )
2022-10-30 14:58:58 +01:00
Máté Kocsis
721e604a69
Do not display the value of UNKNOWN constants in the manual ( #9843 )
2022-10-30 14:58:16 +01:00
Máté Kocsis
aba11b670c
Merge branch 'PHP-8.2'
...
* PHP-8.2:
Generate constant declarations with the CONST_CS flag for PHP 7.x
2022-10-10 11:13:00 +02:00
Máté Kocsis
69ef3247fd
Generate constant declarations with the CONST_CS flag for PHP 7.x
2022-10-10 11:12:20 +02:00
Máté Kocsis
c153ec877f
Merge branch 'PHP-8.2'
...
* PHP-8.2:
Improve string class constant code generation
2022-09-26 23:13:31 +02:00
Máté Kocsis
e4f2376919
Improve string class constant code generation ( #9577 )
...
Using strlen() will make sure that non-constant values can also be used.
2022-09-26 23:12:34 +02:00
Máté Kocsis
ab6d449b3a
Merge branch 'PHP-8.2'
...
* PHP-8.2:
Use PHP 7.4 syntax in gen_stub.php
2022-09-11 07:51:52 +02:00
Máté Kocsis
8b632749d7
Use PHP 7.4 syntax in gen_stub.php
2022-09-11 07:51:28 +02:00
Máté Kocsis
b2234a0f26
Merge branch 'PHP-8.2'
...
* PHP-8.2:
Require PHP 7.4 at least for running the build system
2022-09-10 18:33:50 +02:00
Máté Kocsis
4af695e908
Require PHP 7.4 at least for running the build system ( #9519 )
2022-09-10 18:31:43 +02:00
Nikita Popov
36fdc6fdc0
Check that all preprocessor conditions are terminated
2022-09-10 18:17:51 +02:00
Máté Kocsis
6904019f13
Merge branch 'PHP-8.2'
...
* PHP-8.2:
Validate if the refpurpose and the description is in sync (#9510 )
2022-09-09 11:55:09 +02:00
Máté Kocsis
e0422979f6
Validate if the refpurpose and the description is in sync ( #9510 )
2022-09-09 11:54:38 +02:00
Ilija Tovilo
ecc3fc180f
Use PDEATHSIG to kill cli-server workers if parent exists
...
Closes GH-9476
2022-09-08 10:48:20 +02:00
Máté Kocsis
ce058273ba
Add support for validation of missing method synopses ( #9491 )
2022-09-07 17:40:36 +02:00
Máté Kocsis
05aa3b3e0a
Upgrade PHP parser to 4.15.1
...
It contains some useful fixes
2022-09-06 14:09:47 +02:00
Máté Kocsis
c547fc183c
Add support for validation of missing class synopses ( #9472 )
2022-09-05 14:21:15 +02:00
Andreas Braun
f7d42f646b
Update gen_stub to avoid compile errors on duplicate function names
...
Closes GH-9406
2022-08-30 11:33:45 +02:00
Máté Kocsis
b4ec3e9bc0
Do not generate CONST_CS when registering constants ( #9439 )
2022-08-28 08:27:19 +02:00
Remi Collet
aa702c5459
add compat stuff for function attributes
2022-08-18 13:46:55 +02:00
Máté Kocsis
98b858e756
Fix GH-9183 Get rid of unnecessary PHPDoc param and return type checks ( #9203 )
2022-07-30 15:37:53 +02:00
Máté Kocsis
b56492be9c
Do not add inherited interface methods to the class synopsis page
...
These are not displayed currently in the manual so gen_stub.php should be adapted to this behavior.
2022-07-28 15:14:00 +02:00
Andreas Braun
3c016467c7
Escape \U and \u in generated stubs
...
This fixes an issue where a namespaced class beginning with "U" or "u"
would yield an invalid arginfo file due to the occurrence of a unicode
escape sequence, causing a compile error.
Co-authored-by: Guilliam Xavier <guilliamxavier@users.noreply.github.com >
Closes GH-9154.
2022-07-28 14:30:11 +02:00
Michael Voříšek
b0c0a2cfb4
Use -1 "precision" in gen_stub.php
...
Closes GH-8734.
2022-07-23 12:09:37 +02:00
George Peter Banyard
4457dba1fb
Add support for stubs to declare intersection type class properties ( #8751 )
2022-07-22 13:04:49 +01:00
Ilija Tovilo
41a5b46e7d
Fix RC debug of stub attribute ( #9082 )
2022-07-21 15:06:04 +02:00
Máté Kocsis
e328c68305
Rename @cname to @cvalue in stubs ( #9043 )
...
@cname currently refers to the constant name in C. However, it is not always a (constant) name, but sometimes a function invocation, so naming it as @cvalue would be more appropriate.
2022-07-19 15:11:42 +02:00
Remi Collet
af72d6e5d9
no need for attributes on legacy
2022-07-18 12:44:29 +02:00
Remi Collet
ee1d6188cf
cleanup unused
2022-07-18 12:40:28 +02:00
Remi Collet
55a88f36b6
add SensitiveParameter as known string and use it in arginfo
2022-07-18 11:43:33 +02:00
Remi Collet
6e24c16c4a
add compatibility for tentative-return-type
2022-07-12 15:22:49 +02:00
Máté Kocsis
227a8576d2
Fix parameter order in gen_stub.php
2022-07-12 13:08:08 +02:00
Tim Düsterhus
342e18f105
Support the actual #[\SensitiveParameter] attribute in stubs ( #8836 )
2022-07-12 12:43:44 +02:00
Máté Kocsis
0bddbab084
Make the ABI compatibility of generated arginfo files configurable ( #8931 )
2022-07-12 10:27:53 +02:00
Remi Collet
b45cd10238
Fix GH-8842 don't set sensitive param in legacy arginfo
2022-07-06 08:40:10 +02:00
Bob Weinand
9f29e2d7e9
Allow for arbitrary (class) attributes in stubs
...
This can be easily extended to other types of attributes.
Closes #8839 .
2022-07-05 18:23:05 +02:00
Tim Düsterhus
ff472ce6fc
Support the #[\AllowDynamicProperties] attribute in stubs ( #8776 )
...
* Support the `#[\AllowDynamicProperties]` attribute in stubs
* Use `#[\AllowDynamicProperties]` attribute in stubs
* Disallow applying both `@strict-properties` and `#[\AllowDynamicProperties]`
2022-06-21 09:28:57 +02:00
Yurun
5cf2659fa5
Replace the use of ZVAL_BOOL() with ZVAL_TRUE() or ZVAL_FALSE() where the value is fixed ( #8815 )
2022-06-20 13:34:44 +01:00
Máté Kocsis
49d3dde211
Declare true return types ( #8759 )
2022-06-18 22:06:50 +02:00
Pierrick Charron
1bcd8d394a
Update gen_stub to support #if around classes
2022-06-13 16:34:12 -04:00