1
0
mirror of https://github.com/php/php-src.git synced 2026-04-21 15:08:16 +02:00
Commit Graph

511 Commits

Author SHA1 Message Date
Nikita Popov 53ae2b17f3 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  fix #81656: GCC-11 silently ignores -R
2021-12-05 21:06:50 +01:00
Michael Wallner 1f38c003d2 fix #81656: GCC-11 silently ignores -R
Closes GH-7688.
2021-12-05 21:06:28 +01:00
Dmitry Stogov 72f8dbb312 Fixed bug #81634 (ZEND_ENABLE_STATIC_TSRMLS_CACHE produces extensionswith the STATIC_TLS flag) 2021-11-24 20:43:30 +03:00
Máté Kocsis baac970817 Add the --generate-optimizer-info option to the help of gen_stub.php 2021-11-17 10:56:27 +01:00
Nikita Popov 68ca3879d7 Fix generation of property with class union type
The generated type was missing the UNION bit. Add a ZEND_TYPE_INIT_UNION
macro to hide the implementation details.
2021-11-15 11:04:48 +01:00
Nikita Popov dd0ec7a554 Update PHP-Parser version in gen_stub
This should address the octal issue encountered in #7610.
2021-11-03 12:41:26 +01:00
Remi Collet 371a268a0a Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  remove closing bracket in bad place
2021-10-15 16:46:58 +02:00
Remi Collet 9f98bc58c7 remove closing bracket in bad place 2021-10-15 16:46:35 +02:00
Derick Rethans 544aebb102 Merge branch 'PHP-8.0' into PHP-8.1 2021-10-07 17:03:32 +01:00
Derick Rethans 7426b2277d Merge branch 'PHP-7.4' into PHP-8.0 2021-10-07 17:03:12 +01:00
Derick Rethans 89dfe49321 Bump config.guess/config.sub in all supported branches to support Apple Silicon 2021-10-07 17:02:39 +01:00
Derick Rethans ec75116744 Merge branch 'PHP-8.0' into PHP-8.1 2021-10-07 17:00:21 +01:00
Derick Rethans 8e61a3e3ac Merge branch 'PHP-7.4' into PHP-8.0 2021-10-07 16:59:47 +01:00
Derick Rethans cd0c32e7fb Bump config.guess/config.sub in all supported branches to support Apple Silicon 2021-10-07 16:59:00 +01:00
Máté Kocsis 8168d312f9 Fix a few more classsynopsis generation issues
Closes GH-7480
2021-09-22 23:09:43 +02:00
Máté Kocsis ea9f943d33 Change gen-stub.php to gen_stub.php in help text 2021-09-12 17:09:56 +02:00
Máté Kocsis 73063db5c8 Fix documentation generation when legacy arginfo is generated
When legacy arginfo is generated, all the type info gets lost. Since this task is performed before any other additional functionalities of gen_stub.php (e.g. verification, method synopsis and class synopsis generation), these fail as they would require the missing type information.

The issue is fixed by deep cloning the file info objects (albeit only their affected properties), so that we use those for legacy arginfo generation, leaving the original ones untouched.
2021-09-12 11:42:22 +02:00
Máté Kocsis 4c9892d1e3 Fix class synopsis generation for interfaces
We have to generate <ooclass> elements for interfaces (rather than <oointerface>) in a number of places: directly inside the <classsynopsis> element and in the extends list.
2021-09-08 12:23:00 +02:00
Máté Kocsis f588764292 Improve class synopsis root element generation
Besides classrefs, we also have exceptionrefs. Also, the 4th capture group replacement used to be unintentionally duplicated.
2021-09-08 10:40:14 +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
Máté Kocsis edf2947a5d Remove unused variable from property generation code 2021-08-31 14:44:41 +02:00
Máté Kocsis 39ede67e17 Fix typo in method name in gen_stub.php 2021-08-31 14:43:11 +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 52d3af1790 Minor cleanup in gen_stubs
Unshare the stmt flag handling code, as this does not always
generalize (e.g. to enum cases, which have no visibility or flags
at all).
2021-08-31 11:44:14 +02:00
Nikita Popov c1c1822e8c Fix type hint in gen_stub.php
There is no ClassType class, only SimpleType.

[ci skip]
2021-08-31 10:11:15 +02:00
Máté Kocsis a57b713d66 Fix typo in gen_stub.php 2021-08-30 16:09:10 +02:00
Máté Kocsis c19e4b9997 Generate optimizer func info from stubs for ext/standard - part 3 (#7426) 2021-08-30 15:56:47 +02:00
Máté Kocsis 8e6e9838b0 Add support for generating MAY_BE_ARRAY_OF_REF func info flag (#7416) 2021-08-30 13:50:34 +02:00
Nikita Popov fab1222128 Ensure stub files are processed in predictable order
The zend_func_infos.h file was generated in a different order for
me.
2021-08-30 10:28:22 +02:00
dixyes e4c23fa16b Add haiku shared objects support in libtool 2021-08-27 16:44:10 +02:00
Derick Rethans 802316301d Merge branch 'PHP-7.4' into PHP-8.0 2021-08-25 16:00:14 +01:00
Derick Rethans 3677db6386 Backport speling fix
This change was originall only done for 'master'. Xdebug bundles this file as
it requires it, but PHP 7.2/7.3 don't have it bundled. By doing "phpize" with
master, it updates the file introducing a local diff. By fixing it in older
versions, that problem goes away.
2021-08-25 15:58:28 +01:00
Peter Cowburn 36e88a0066 Use &Properties; entity in xpointer for inherited properties in class synopses (#7400)
This changes ClassInfo::createIncludeElement() such that it takes the $query
argument as-is for the xpointer attribute value. Special characters, like
" and &, are used as-is so be careful not to break the resulting XML.
2021-08-25 12:14:03 +02:00
Máté Kocsis 4a7a414735 Fix callable and iterable handling 2021-08-25 10:37:43 +02:00
Máté Kocsis d0897b3602 Clean up function map production slightly
There's no need to iterate over $fileInfos again while generating the class map
2021-08-24 19:30:00 +02:00
Máté Kocsis e35a7fe919 Fix function map production 2021-08-24 18:45:31 +02:00
Máté Kocsis 2141bee69d Add more specific array type hints 2021-08-24 18:40:36 +02:00
Máté Kocsis b1822899fc Add support for generating optimizer function info from stubs (#7367) 2021-08-24 16:35:33 +02:00
Máté Kocsis 076f2899ba Add support for replacing class synopses based on stubs (#7340) 2021-08-13 15:03:31 +02:00
Máté Kocsis ac17b3646d Add support for generating classynopses from stubs
Closes GH-7310
2021-08-02 17:56:22 +02:00
Kamil Tekiela cd0cd3d31e Fix typos (#7327) 2021-08-01 18:03:30 +01: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 23b1c4a982 Migrate to PHP-Parser 4.12.0 and regenerate some arginfos 2021-07-22 09:40:16 +02:00
Nikita Popov 814a932734 Add ZEND_ACC_NOT_SERIALIZABLE flag
This prevents serialization and unserialization of a class and its
children in a way that does not depend on the zend_class_serialize_deny
and zend_class_unserialize_deny handlers that will be going away
in PHP 9 together with the Serializable interface.

In stubs, `@not-serializable` can be used to set this flag.

This patch only uses the new flag for a handful of Zend classes,
converting the remainder is left for later.

Closes GH-7249.
Fixes bug #81111.
2021-07-19 15:59:11 +02:00
Máté Kocsis 553574165a Add support for the never type in gen_stub.php 2021-07-14 15:21:15 +02:00
Máté Kocsis 0192fd20cc Merge branch 'PHP-8.0' 2021-07-12 10:32:07 +02:00
Máté Kocsis 80e5ad5a29 Various ext/spl stub fixes
Closes GH-7215
2021-07-12 10:27:05 +02:00
Tyson Andre e748dcacad Allow build/gen_stub.php to process multiple CLI file args (#7179)
E.g. `build/gen_stub.php *.stub.php` will generate `*_arginfo.h`
from multiple files.

Previously, gen_stub.php would silently ignore files after the first file.

Invoking gen_stub.php with no arguments will continue to process the entire
directory.
2021-06-20 15:14:01 -04:00
Nikita Popov be92a87371 Fix PHP_ADD_EXTENSION_DEP without indentation
Adjust FS in order_by_dep.awk to only each whitespace around (,)
rather than any whitespace. Thus a leading indent does not result
in a separate element.
2021-06-10 11:48:25 +02:00