1
0
mirror of https://github.com/php/php-src.git synced 2026-04-26 01:18:19 +02:00
Commit Graph

567 Commits

Author SHA1 Message Date
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
Pierrick Charron 6fd2b39397 Indent with TAB in .h files generated by gen_stub 2022-06-13 08:55:54 -04:00
George Peter Banyard b40ae80804 Convert iterable into an internal alias for Traversable|array (#7309)
This does a compile time transformation of ``iterable`` into ``Traversable|array`` which simplifies some of the LSP variance handling.

The arginfo generation script from stubs is updated to produce a union type when it encounters the type ``iterable``
Extension functions which do not regenerate the arginfo, or write them manually are still supported by mimicking the compile time transformation while registering the function.

Type Reflection is preserved for single ``iterable`` (and ``?iterable``) to produce a ReflectionNamedType with name ``iterable``, however usage of ``iterable`` in union types will be converted to ``array|Traversable``
2022-06-07 13:35:34 +01:00
Máté Kocsis b2ed625de1 A few cleanup changes for gen_stub.php 2022-06-06 07:43:56 +02:00
Máté Kocsis debd38f851 Add support for sensitive parameters in stubs 2022-06-04 18:15:05 +02:00
David Carlier 0b6f58d907 Merge branch 'PHP-8.1' 2022-06-03 08:05:13 +01:00
David Carlier 7f70911cbe Merge branch 'PHP-8.0' into PHP-8.1 2022-06-03 08:04:58 +01:00
David Carlier 0a47fdf538 Revert "Fix detection of unknown gcc function attributes"
This reverts commit 813d942bac.
2022-06-03 08:04:07 +01:00
David Carlier e17fd1f2d9 Merge branch 'PHP-8.1' 2022-06-02 21:11:43 +01:00
David Carlier ba5efbdf17 Merge branch 'PHP-8.0' into PHP-8.1 2022-06-02 21:11:22 +01:00
Athos Ribeiro 813d942bac Fix detection of unknown gcc function attributes
As described in autoconf-archive upstream [1], from where
`build/ax_gcc_func_attribute.m4` is forked, the old unknown func attr
detection method would throw a false negative anytime an unrelated
warning was raised.

This results in `ax_cv_have_func_attribute_target` being set to `no`
whenever certain compiler Warning flags are switched on. Namely, having
`-Wall` on, which is a default CFLAG for some linux distributions, will
result in

```
warning: ‘bar’ declared ‘static’ but never defined [-Wunused-function]
```

when evaluating support for the `target` function attribute.

With that configuration value set to `no`, the compiled php binaries
will not support x86_64 v3 instructions such as avx2 and sse2, which
should speed up specific tasks ran by PHP.

This issue was originally reported in Ubuntu [2].

[1] http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=commitdiff;h=df0894ad1a8195df67a52108b931e07d708cec9a
[2] https://bugs.launchpad.net/ubuntu/+source/php8.1/+bug/1882279
Closes GH-8483.
2022-06-02 21:09:09 +01:00
Máté Kocsis a420ee6c34 Update PHP-Parser to 4.14
It supports readonly classes
2022-06-01 16:09:57 +02:00
Máté Kocsis b7b5ad7169 Make ini_set invocation compatible with PHP 8.0 2022-05-31 08:52:35 +02:00
Máté Kocsis 14da1cb909 Add support for class constants in stubs (#7434) 2022-05-22 22:27:23 +02:00
Máté Kocsis 7850c10389 Add support for readonly classes (#7305)
RFC: https://wiki.php.net/rfc/readonly_classes
2022-05-16 20:40:23 +02:00
Arnaud Le Blanc 0a5a761104 Merge branch 'PHP-8.1' 2022-05-06 15:29:21 +02:00
Arnaud Le Blanc f07a08df5c Fix unregistering ini entries of dynamically loaded extension (#8435)
Fixes GH-8185
2022-05-06 15:25:44 +02:00
Ilija Tovilo 9a90bd7054 Deprecate ${} string interpolation
https://wiki.php.net/rfc/deprecate_dollar_brace_string_interpolation
2022-05-05 10:14:56 +02:00
Michael Voříšek 36de002cc6 Verify generated files are up to date in CI
Closes GH-8295
2022-04-21 23:25:47 +02:00
Máté Kocsis c345b6ee72 Remove unused variable from gen_stub.php 2022-04-13 09:24:08 +02:00
George Peter Banyard 7710f9946b Fix generation of arginfo if type is just null 2022-04-11 16:58:13 +01:00
George Peter Banyard c12da039b5 Add null and false support to gen_stubs 2022-04-11 14:04:37 +01:00
Steven Wang c4a9d1e668 Makefile: Clean up .gcda files in prof-gen.
The .gcda files generated by "$(MAKE) PROF_FLAGS=-fprofile-generate all"
should be removed. Otherwise, the profile data in them would be combined
with the profile data of user's workload.Then, they would be used by
"make prof-use" later.

Closes GH-8284.
2022-04-11 14:30:35 +02:00
Levi Morrison c68591fa16 Use AS_ECHO([]) instead of obsolete $as_echo (#8321) 2022-04-07 21:49:24 +01:00
Anatol Belski dd81dd9264 build: Extend m4 to support C++20
Signed-off-by: Anatol Belski <ab@php.net>
2022-03-20 00:30:15 +01:00
istiak101 bf2867bc72 Fix FSF address & update year to 2022
FSF mailing address was changed long time ago. This patch updates that address. Also updated year from 2021 to 2022.

Closes GH-8009.
2022-03-19 18:25:29 +01:00
Victor Kislov 6a2c501626 Adjust PHP_SETUP_LIBXML description to mention what it doesnt use action-not-found
Closes GH-8088.
2022-03-08 13:00:23 +01:00
Derick Rethans 0e65e433a9 Merge branch 'PHP-8.1' 2022-02-15 13:28:07 +00:00
Tyson Andre 0fab520ded Fix zend_register_internal_class_ex alias generation (#8091)
This wouldn't work for creating aliases in a namespace.

It would create the class alias "MyNS_ClassName" instead of
"MyNS\\ClassName"
2022-02-14 17:58:26 -05:00
Remi Collet 05023a281d Merge branch 'PHP-8.1'
* PHP-8.1:
  [ci skip] news
  Fix GH-8059 use $PHP_EXECUTABLE when $PHP not set
2022-02-08 13:54:58 +01:00
Remi Collet 3b463749f5 Fix GH-8059 use $PHP_EXECUTABLE when $PHP not set 2022-02-08 13:53:29 +01:00
Tyson Andre b27d2fffbc Update php-parser to 4.13.2 in build/gen_stub.php (#7989)
v4.13.2 fixes a deprecation notice in php 8.2 for namespacedName
2022-01-22 12:34:50 -05:00
Máté Kocsis 266667c234 Merge branch 'PHP-8.1'
* PHP-8.1:
  Add support for custom property links
2022-01-07 08:29:22 +01:00
Máté Kocsis 62e4ac9439 Add support for custom property links
Closes GH-7892
2022-01-07 08:28:26 +01:00
Máté Kocsis b9e8d93a5c Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix class synopsis generation
2022-01-06 18:32:43 +01:00
Máté Kocsis 0462719999 Fix class synopsis generation
Closes GH-7891
2022-01-06 18:31:21 +01:00
Tyson Andre 32e2d97a26 Allow internal functions to declare if they support compile-time evaluation, add functions. (#7780)
https://wiki.php.net/rfc/strtolower-ascii means that these functions no longer
depend on the current locale in php 8.2. Before that, this was unsafe to
evaluate at compile time.

Followup to GH-7506

Add strcmp/strcasecmp/strtolower/strtoupper functions

Add bin2hex/hex2bin and related functions

Update test of garbage collection using strtolower to use something else to create a refcounted string
2021-12-20 09:27:06 -05:00
Nikita Popov 335b940664 Merge branch 'PHP-8.1'
* PHP-8.1:
  fix #81656: GCC-11 silently ignores -R
2021-12-05 21:06:59 +01:00
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 cddb65b54e Merge branch 'PHP-8.1'
* PHP-8.1:
  Fixed bug #81634 (ZEND_ENABLE_STATIC_TSRMLS_CACHE produces extensionswith the STATIC_TLS flag)
2021-11-24 20:45:09 +03: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 d608319529 Merge branch 'PHP-8.1'
* PHP-8.1:
  Add more specific array return type hints for various extensions - part 2
  Add the --generate-optimizer-info option to the help of gen_stub.php
2021-11-17 10:57:01 +01: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 d362caed2c Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix generation of property with class union type
  Replace SKIPIF with EXTENSIONS
2021-11-15 11:05:52 +01:00