1
0
mirror of https://github.com/php/php-src.git synced 2026-03-29 03:32:20 +02:00
Commit Graph

245 Commits

Author SHA1 Message Date
Niels Dossche
783ecad82e Fix crashes in enchant when passing null bytes
See https://github.com/php/php-src/pull/17393#discussion_r1907660137

Closes GH-17407.
2025-01-08 20:47:01 +01:00
Ilija Tovilo
50f58c8923 Add ASAN XLEAK support
Only disable LSAN instead of skipping the test. This way we can still detect
memory issues which is arguably more important anyway.

Closes GH-10996
2023-04-03 08:02:19 +02:00
Bob Weinand
94ee4f9834 Port all internally used classes to use default_object_handlers
Signed-off-by: Bob Weinand <bobwei9@hotmail.com>
2022-08-31 16:45:27 +02: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
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
Pierrick Charron
6fd2b39397 Indent with TAB in .h files generated by gen_stub 2022-06-13 08:55:54 -04:00
Máté Kocsis
debd38f851 Add support for sensitive parameters in stubs 2022-06-04 18:15:05 +02:00
Máté Kocsis
8d79e665f1 Declare ext/enchant constants in stubs (#8679) 2022-06-01 20:15:10 +02:00
Máté Kocsis
d02b9b953d Add more specific array return type hints for various extensions - part 1
ext/bz2, ext/calendar, ext/dba, ext/enchant

Closes GH-7432
2021-11-07 08:46:25 +01:00
Joe Watkins
570d9b63e9 Not serializable flag permeation 2021-07-20 12:28:35 +02:00
Nikita Popov
7485978339 Migrate SKIPIF -> EXTENSIONS (#7138)
This is an automated migration of most SKIPIF extension_loaded checks.
2021-06-11 11:57:42 +02:00
KsaR
01b3fc03c3 Update http->https in license (#6945)
1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as 3.0 states "php 5.1.1, 4.1.1, and earlier".
3. In some license comments is "at through the world-wide-web" while most is without "at", so deleted.
4. fixed indentation in some files before |
2021-05-06 12:16:35 +02:00
Nikita Popov
ce0bc58c22 Merge branch 'PHP-8.0'
* PHP-8.0:
  Mark resource-like objects as non-comparable
2021-02-16 14:22:03 +01:00
Nikita Popov
b63ea1047a Mark resource-like objects as non-comparable
As these hold on to some internal resource, there can't be two
"equal" objects with different identity. Make sure the lack of
public properties doesn't result in these being treated as always
equal.
2021-02-16 14:20:45 +01:00
Máté Kocsis
bf0f6aaf18 Improve class entry generation
Related to GH-6701
2021-02-16 13:09:56 +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
Máté Kocsis
811f6dd8e5 Review parameter names in ext/enchant
Closes GH-6258
2020-10-02 11:55:46 +02:00
Nikita Popov
c5401854fc Run tidy
This should fix most of the remaining issues with tabs and spaces
being mixed in tests.
2020-09-18 14:28:32 +02:00
Máté Kocsis
1fb66b8114 Promote warning to exception in ext/enchant
Closes GH-6022
2020-08-24 17:37:20 +02:00
George Peter Banyard
9a71d47d73 Throw ValueError on empty tag in enchant_broker_request_dict() 2020-07-31 14:35:14 +01: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
Max Semenik
2b5de6f839 Remove proto comments from C files
Closes GH-5758
2020-07-06 21:13:34 +02:00
Nikita Popov
9b41f22fb2 Remove leftover debug comment 2020-07-02 11:51:51 +02:00
Nikita Popov
4500309f10 Skip enchant test under asan
There is a known memory leak here:
https://bugs.launchpad.net/ubuntu/+source/enchant/+bug/305468
2020-07-02 11:37:09 +02:00
Fabien Villepinte
0c6d06ecfa Replace EXPECTF when possible
Closes GH-5779
2020-06-29 21:31:44 +02:00
Nikita Popov
653e4ea1c5 Add flag to forbid dynamic property creation on internal classes
While performing resource -> object migrations, we're adding
defensive classes that are final, non-serializable and non-clonable
(unless they are, of course). This path adds a ZEND_ACC_NO_DYNAMIC_PROPERTIES
flag, that also forbids the creation of dynamic properties on these objects.
This is a subset of #3931 and targeted at internal usage only
(though may be extended to userland at some point in the future).

It's already possible to achieve this (what the removed
WeakRef/WeakMap code does), but there's some caveats: First, this
simple approach is only possible if the class has no declared
properties, otherwise it's necessary to special-case those
properties. Second, it's easy to make it overly strict, e.g. by
forbidding isset($obj->prop) as well. And finally, it requires a
lot of boilerplate code for each class.

Closes GH-5572.
2020-06-24 11:52:36 +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
ba434fb5a6 Remove outdated PHPDoc from ext/enchant's stub 2020-06-23 22:35:27 +02:00
Nikita Popov
607567b9cd Call zpp in enchant_broker_*_dict_path with libenchant-2
Even if the function is a dummy, we still need to call zpp to
comply with arginfo.
2020-06-18 17:10:22 +02:00
Máté Kocsis
cd3e04dff3 Convert enchant resources to opaque objects
Additionally, deprecate ENCHANT_MYSPELL and ENCHANT_ISPELL constants.
Closes GH-5577

Co-authored-by: Remi Collet <remi@php.net>
2020-05-29 14:51:41 +02:00
Nikita Popov
a01b6e5787 Return empty array instead of null from enchant APIs
Closes GH-5566.
2020-05-27 10:12:21 +02:00
Remi Collet
5318971bc5 Revert "convert enchant resources to objects of new classes - EnchantBroker - EnchantDict add OO interface deprecate enchant_broker_free* (use unset instead) deprecate ENCHANT_MYSPELL and ENCHANT_ISPELL constants"
This reverts commit 7db4c24a37.
2020-05-13 15:56:14 +02:00
Remi Collet
ea1bebbd41 Revert "add myself as enchant maintainer"
This reverts commit f987219c69.
2020-05-13 15:56:10 +02:00
Remi Collet
7db4c24a37 convert enchant resources to objects of new classes - EnchantBroker - EnchantDict add OO interface deprecate enchant_broker_free* (use unset instead) deprecate ENCHANT_MYSPELL and ENCHANT_ISPELL constants 2020-05-13 15:14:50 +02:00
Remi Collet
f987219c69 add myself as enchant maintainer 2020-05-06 13:18:35 +02:00
Christoph M. Becker
c1ad9163b8 Fix enchant stub 2020-05-06 13:16:50 +02:00
Remi Collet
5f5dd994d4 enchant: bump license version 2020-05-06 13:13:19 +02:00
Máté Kocsis
3ebce8e9fc Fix UNKNOWN default values in various extensions
Closes GH-5514
2020-05-05 19:08:20 +02:00
Christoph M. Becker
54cf9a26c1 Use libenchant2 if available on Windows
This is basically the same as commit 3427545[1], but for Windows.

[1] <http://git.php.net/?p=php-src.git;a=commitdiff;h=342754575237da912874f781a24eefe76434ce5a>
2020-05-04 11:27:00 +02:00
Remi Collet
3427545752 Use libenchant-2 when available 2020-05-04 08:27:31 +02:00
Remi Collet
66d42e9884 remove deprecated call and deprecate function to be removed in libenchant v2
add LIBENCHANT_VERSION constant
2020-04-30 09:32:00 +02:00
Máté Kocsis
7c3078737f Generate function entries from stubs for a couple of extensions
Closes GH-5347
2020-04-04 20:41:48 +02:00
Christoph M. Becker
3a74d7a725 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #79311: enchant_dict_suggest() fails on big endian architecture
2020-02-28 15:46:17 +01:00
Christoph M. Becker
0bffee4a35 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #79311: enchant_dict_suggest() fails on big endian architecture
2020-02-28 15:44:52 +01:00
Christoph M. Becker
6adb885966 Fix #79311: enchant_dict_suggest() fails on big endian architecture
For obvious reasons, we must not assign a `size_t` value to an `int`
variable using memcpy().  However, there is actually no need for the
intermediate `n_sugg_st` here, if we use the proper types in the first
place.

A regression test is not necessary, because dict_suggest.phpt already
exhibits the erroneous behavior on big endian architectures.
2020-02-28 15:43:44 +01:00
Nikita Popov
f8d795820e Reindent phpt files 2020-02-03 22:52:20 +01:00
Máté Kocsis
99db00b1f2 Fix #78880 Another round 2020-01-19 18:28:43 +01:00
Máté Kocsis
aadd3aaed9 Use RETURN_THROWS() in various places 2020-01-03 21:10:24 +01:00
Máté Kocsis
d9ac1ca8de Use ZEND_THROWS() during ZPP in the GD, gettext, GMP, and hash extensions 2019-12-31 00:21:38 +01:00