Commit Graph

22 Commits

Author SHA1 Message Date
Gina Peter Banyard
a50adda19e
ext/gmp: Make GMP class final (#15121)
* ext/gmp: Make GMP class final

RFC: https://wiki.php.net/rfc/gmp-final

* Update UPGRADING

Co-authored-by: Peter Kokot <peterkokot@gmail.com>

---------

Co-authored-by: Peter Kokot <peterkokot@gmail.com>
2024-07-28 13:03:26 +01:00
Niels Dossche
4ea85d4044
Implement GMP::__construct()
Implements a proper constructor for GMP as discussed in both GH-10158 and https://externals.io/message/119216.
Fixes GH-10155

Closes GH-10225

Signed-off-by: George Peter Banyard <girgias@php.net>
2023-01-19 14:13:34 +00: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
Máté Kocsis
deabd5a442
Declare ext/gmp constants in stubs (#8704)
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
2022-06-06 14:38:03 +02:00
Nikita Popov
17ceed9ae7 Implement __serialize() and __unserialize() on GMP
GMP directly implements internal serialize/unserialize handlers
rather than going through the Serializable interface, so it ended
up being missed when adding the new __serialize()/__unserialize()
methods to other classes.

The serialization format is similar to before, but uses hex instead
of decimal encoding and omits the members if not used (which should
be almost always).
2021-11-18 11:11:52 +01:00
Máté Kocsis
20fb26e55c
Add more specific array return type hints for various extensions - part 2
ext/ftp, ext/gmp, ext/intl

Closes GH-7433
2021-11-17 10:56:27 +01:00
Máté Kocsis
99b08ac281
Implicitly enable function entry generation when class entry generation is enabled
Closes GH-6675
2021-02-09 13:37:24 +01:00
Máté Kocsis
98fb565c74
Generate class entries from stubs for another batch of extensions
Closes GH-6669
2021-02-08 19:53:55 +01:00
Nikita Popov
2519827732 Update gmp+bcmath parameter names
Closes GH-6205.
2020-09-29 12:34:16 +02:00
Nikita Popov
0286decdb4 Accept GMP|string|int union in GMP functions
This changes GMP functions to accept a GMP|string|int union with
standard semantics (and thus also uses it in function signatures).

Relative to the previous behavior, this means that GMP functions
in weak mode now also accept float and null, and in strict mode no
longer accept bool, and have full type information.

Closes GH-6139.
2020-09-16 17:17:07 +02:00
George Peter Banyard
e208cb23c6 Promote various warnings to Error in GMP extension
This gets rid of most false returns

Closes GH-5882
2020-08-07 18:17:34 +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
Máté Kocsis
43095a55e2
Promote warning related to operator overloading in ext/gmp to an exception 2020-05-25 17:26:33 +02:00
Máté Kocsis
5322de1ba8
Generate functions entries from stubs for another set of extensions
Closes GH-5351
2020-04-05 00:59:44 +02:00
Máté Kocsis
a43bc33fb2
Annotate function aliases in stubs 2020-04-04 13:03:16 +02:00
Christoph M. Becker
7d0102dfa7 Revert "Replace @param annotations with type declarations"
This reverts commit c31029f335.
2020-02-17 08:55:18 +01:00
Christoph M. Becker
c31029f335 Replace @param annotations with type declarations 2020-02-16 23:43:38 +01:00
Máté Kocsis
c58b12334d Add union return types with one class 2019-11-18 12:44:38 +01:00
Máté Kocsis
27e83d0fb8
Add union return types for function stubs 2019-11-11 14:54:55 +01:00
Nikita Popov
5f80eb7842 Fix required number of arguments in stubs
* get_parent_class() argument is optional
* Mark array_filter() $callback as optional
* The $base of gmp_strval() is optional
* DateTime constructor also accepts zero arguments
* hash_update_file() stream context is optional
* xmlwriter_write_dtd_entity() $isparam argument is optional
2019-10-07 16:33:41 +02:00
Nikita Popov
d19ecd0f33 Fix typo in type 2019-09-02 10:55:51 +02:00
Christoph M. Becker
64d0416a72 Add ext/gmp stubs 2019-08-25 17:56:39 +02:00