Commit graph

39 commits

Author SHA1 Message Date
Máté Kocsis
148ac364e9 Customize the link of some constants in the manual
These changes are necessary because the links which are generated by default are already taken.
2023-01-19 09:05:32 +01:00
Máté Kocsis
e4f2376919
Improve string class constant code generation (#9577)
Using strlen() will make sure that non-constant values can also be used.
2022-09-26 23:12:34 +02:00
Remi Collet
946cdb8ad1
remove LIBZIP_VERSION constant def from stub 2022-09-15 16:41:22 +02:00
Máté Kocsis
0c4c9fb93b
Declare et/zip constants in stubs (#9146) 2022-08-16 10:18:24 +02:00
Remi Collet
55a88f36b6
add SensitiveParameter as known string and use it in arginfo 2022-07-18 11:43:33 +02:00
Tim Düsterhus
342e18f105
Support the actual #[\SensitiveParameter] attribute in stubs (#8836) 2022-07-12 12:43:44 +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
Tim Düsterhus
1a4401d40a Mark parameter in ext/zip as sensitive 2022-06-13 11:09:12 +02:00
Remi Collet
a13b94c5d1
Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix test XFAIL, update phar to use spl_autoload_register
  bug: Fix type for $index in ZipArchive::replaceFile
2022-05-02 14:19:52 +02:00
Remi Collet
0e9c7c16aa
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  bug: Fix type for $index in ZipArchive::replaceFile
  Fix test XFAIL, update phar to use spl_autoload_register
2022-05-02 14:16:01 +02:00
Martin Rehberger
389d11308c
bug: Fix type for $index in ZipArchive::replaceFile 2022-05-02 14:08:19 +02:00
Nikita Popov
dc4cfb1ccb Don't accept flags in ZipArchive::getStream()
Per discussion on e489e2d388
this method should not accept $flags, so un-alias it from
getStreamName().
2021-10-12 09:29:08 +02:00
Nikita Popov
e489e2d388 Add missing $flags param to getStream()
This is an alias of getStreamName() but was missing the optional
$flags parameter.
2021-10-11 16:01:57 +02:00
Remi Collet
e9b96ae5da
Add ZipArchive::clearError, getStreamIndex and getStreamName methods
public function clearError(): void {}
    public function getStreamIndex(int $index, int $flags = 0) {}
    public function getStreamName(string $name, int $flags = 0) {}

ZipArchive::getStream is kept for BC

See https://github.com/pierrejoye/php_zip/issues/20
2021-10-11 15:39:35 +02:00
Máté Kocsis
172c29879e
Declare tentative return types for ext/zip (#7053) 2021-05-27 10:47:32 +02:00
Máté Kocsis
b567a9d173
Use typed properties in ext/zip
Closes GH-6881
2021-04-26 13:21:17 +02:00
Máté Kocsis
4c6533c257
Generate class entries from stubs for com, standard, xmlreader, xmlwriter, xsl, zip, Zend
Closes GH-6706
2021-02-22 15:24:03 +01:00
Máté Kocsis
1954e59758
Add support for generating class entries from stubs
Closes GH-6289

Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
2021-01-26 11:50:36 +01:00
George Peter Banyard
f40838eaaa Rename `zip_ent parameter to zip_entry` for consistency
All other functions use ``zip_entry``
2021-01-08 22:26:24 +00:00
Christoph M. Becker
e470f9b389 ZipArchive methods do not return NULL
Closes GH-6563.
2021-01-03 16:12:10 +01:00
Remi Collet
dafc72cb33 for consistency use for all *Name methods 2020-09-23 09:31:44 +02:00
Máté Kocsis
36fd95b524
Generate arginfos 2020-09-16 21:28:27 +02:00
Máté Kocsis
c76910cd96
Display types in stubs more uniformly
In preparation for generating method signatures for the manual.

This change gets rid of bogus false|null return types, a few unnecessary trailing backslashes, and settles on using ? when possible for nullable types.
2020-09-16 21:19:36 +02:00
Máté Kocsis
3e800e997b
Move custom type checks to ZPP
Closes GH-6034
2020-09-02 11:11:38 +02:00
Máté Kocsis
2803c8fb8d
Add all the missing parameter types to stubs
Closes GH-5955
2020-08-13 14:47:18 +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
f3b1f342c8
Deprecate the procedural API of ext/zip
Closes GH-5746
2020-06-23 17:39:29 +02:00
Remi Collet
eae3bda9e3 encode param is optional 2020-06-05 17:10:12 +02:00
Máté Kocsis
86d58e9fff
Generate function entries for ext/zip
Closes GH-5601
2020-05-20 14:22:11 +02:00
Máté Kocsis
daa5b26456
Fix UNKNOWN default values in ext/zip 2020-05-06 19:15:34 +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
Remi Collet
2dc8d39bae - add ZipArchive::EM_UNKNOWN constant - add ZipArchive::EM_TRAD_PKWARE constant - cleanup hack for libzip 1.3.1 (have only exist for a few days) - add ZipArchive::isCompressionMethodSupported() method (libzip 1.7.0) - add ZipArchive::isEncryptionMethodSupported() method (libzip 1.7.0) - bump version to 1.19.0-dev 2020-04-02 14:52:05 +02:00
Remi Collet
fb8e221907 - add ZipArchive::FL_RECOMPRESS, FL_ENCRYPTED, FL_OVERWRITE, FL_LOCAL, FL_CENTRAL constants
- add optional "flags" parameter to ZipArchive::addEmptyDir, addFile and addFromString methods
- add "flags" options to ZipArchive::addGlob and addPattern methods
  keeping previous behavior having FL_OVERWRITE by default
- add ZipArchive::replaceFile() method
2020-03-02 16:48:53 +01:00
Remi Collet
3af1cee884 add ZipArchive::registerProgressCallback and ZipArchive::registerCancelCallback methods 2020-01-31 09:06:42 +01:00
Remi Collet
ac9a265f01 - bump zip extension version to 1.16.0 - add ZipArchive::setMtimeName and ZipArchive::setMtimeIndex methods 2020-01-28 10:53:49 +01:00
Máté Kocsis
27e83d0fb8
Add union return types for function stubs 2019-11-11 14:54:55 +01:00
Christoph M. Becker
1858b00d00 Add ZipArchive arginfo stubs 2019-09-29 14:28:37 +02:00
Stephen Reay
d4e5e63b6c Added zip arginfo stubs 2019-08-13 13:01:51 +02:00