Commit graph

25 commits

Author SHA1 Message Date
Máté Kocsis
8d12f666ae
Fix registration of internal readonly child classes (#15459)
Currently, internal classes are registered with the following code:

INIT_CLASS_ENTRY(ce, "InternalClass", class_InternalClass_methods);
class_entry = zend_register_internal_class_ex(&ce, NULL);
class_entry->ce_flags |= ...;

This has worked well so far, except if InternalClass is readonly. It is because some inheritance checks are run by zend_register_internal_class_ex before ZEND_ACC_READONLY_CLASS is added to ce_flags.

The issue is fixed by adding a zend_register_internal_class_with_flags() zend API function that stubs can use from now on. This function makes sure to add the flags before running any checks. Since the new API is not available in lower PHP versions, gen_stub.php has to keep support for the existing API for PHP 8.3 and below.
2024-08-24 12:36:54 +02:00
Máté Kocsis
f2e199e878
Implement "support doc comments for internal classes and functions" (#13266)
Fixes #13130
2024-02-25 08:41:31 +01:00
Máté Kocsis
10957e498c
Do not generate frameless info items when func info generation is disabled
While here, I fixed newlines around arginfo and function entry generation. Previously, newlines were repeated.
2024-02-18 11:39:00 +01:00
George Peter Banyard
5b40d06680 Refactor session_set_save_handler()
Use proper ZPP callables with FCI/FCC
2022-10-22 12:47:34 +01:00
Máté Kocsis
b4ec3e9bc0
Do not generate CONST_CS when registering constants (#9439) 2022-08-28 08:27:19 +02:00
Máté Kocsis
a98560ad3f
Declare ext/session constants in stubs (#9112) 2022-07-23 12:32:21 +02:00
Máté Kocsis
50f31829b1
Generate optimizer func info from stubs for a few extensions - part 2 (#7401)
ext/bcmath, ext/fileinfo, ext/filter, ext/gettext, ext/session
2021-08-25 15:29:46 +02:00
Máté Kocsis
787db3af48
Declare tentative return types for ext/session (#7005) 2021-05-28 10:29:08 +02:00
Máté Kocsis
53b5105edd
Merge branch 'PHP-8.0'
* Fix session cleanup
* Fix the return type of SessionHandler::gc()
2021-05-27 23:08:27 +02:00
Máté Kocsis
6fb08f4607
Fix return type of SessionHandler::gc()
Relates to GH-7006
2021-05-27 23:07:27 +02:00
Máté Kocsis
ec3bdd3ba8
Merge branch 'PHP-8.0'
* Fix return type of SessionHandler::read()
2021-04-20 11:57:48 +02:00
Máté Kocsis
ffb1ff371c
Fix return type of SessionHandler::read() 2021-04-20 11:56:54 +02:00
Máté Kocsis
bf0f6aaf18
Improve class entry generation
Related to GH-6701
2021-02-16 13:09:56 +01:00
Máté Kocsis
5b5bfd6be4
Generate class entries from stubs for phar, posix, pspell, readline, reflection, session, shmop
Closes GH-6692
2021-02-15 00:11:22 +01:00
Máté Kocsis
efe6006ced
Review parameter names in ext/session
Closes GH-6239
2020-09-30 13:21:17 +02:00
Máté Kocsis
46c0c82a0f
Declare array|int and object-of-class|int types in stubs
Closes GH-6081

Co-Authored-By: Nikita Popov <nikic@php.net>
2020-09-14 11:59:32 +02:00
Máté Kocsis
f293e6b920
Clean up ext/session errors
Closes GH-6111
2020-09-11 11:59:04 +02:00
Máté Kocsis
0d330e1a02
Add a few missing parameter types in stubs
Related to GH-5627
2020-07-30 14:26:45 +02:00
Nikita Popov
c9b9f525a9 Include stub hash in generated arginfo files
The hash is used to check whether the arginfo file needs to be
regenerated. PHP-Parser will only be downloaded if this is actually
necessary.

This ensures that release artifacts will never try to regenerate
stubs and thus fetch PHP-Parser, as long as you do not modify any
files.

Closes GH-5739.
2020-06-24 09:55:19 +02:00
Máté Kocsis
b981662855
Fix a couple of UNKNOWN default values in ext/session
Closes GH-5752
2020-06-23 15:42:59 +02:00
Máté Kocsis
1bba691ecc
Generate method entries for ext/session and ext/reflection
Closes GH-5376
2020-04-13 13:04:06 +02:00
Máté Kocsis
5868aced2e
Fix the default parameter values of session_set_save_handler()
Co-Authored-By: Christoph M. Becker <cmbecker69@gmx.de>
2020-04-10 17:07:26 +02:00
Máté Kocsis
3709e74b5e
Store default parameter values of internal functions in arg info
Closes GH-5353. From now on, PHP will have reflection information
about default values of parameters of internal functions.

Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
2020-04-08 18:37:51 +02:00
Máté Kocsis
27e83d0fb8
Add union return types for function stubs 2019-11-11 14:54:55 +01:00
Craig Duncan
1fc2fec138 Convert session functions arginfo to php stubs 2019-09-18 10:59:57 +02:00