Skip to content
forked from php/php-src

Commit 1887f02

Browse files
authored
Add class constant types to Phar extension (php#11826)
1 parent 278a57f commit 1887f02

File tree

3 files changed

+36
-49
lines changed

3 files changed

+36
-49
lines changed

UPGRADING

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ PHP 8.3 UPGRADE NOTES
7373
modifiable pointers but was rejected due to complexity. For this reason, it
7474
was decided to remove the feature instead.
7575

76+
- Phar:
77+
. The type of Phar class constants are now declared.
78+
7679
- Standard:
7780
. The range() function has had various changes:
7881
* A TypeError is now thrown when passing objects, resources, or arrays

ext/phar/phar_object.stub.php

Lines changed: 16 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -9,85 +9,69 @@ class PharException extends Exception
99
class Phar extends RecursiveDirectoryIterator implements Countable, ArrayAccess
1010
{
1111
/**
12-
* @var int
1312
* @cvalue PHAR_ENT_COMPRESSED_BZ2
1413
*/
15-
const BZ2 = UNKNOWN;
14+
const int BZ2 = UNKNOWN;
1615
/**
17-
* @var int
1816
* @cvalue PHAR_ENT_COMPRESSED_GZ
1917
*/
20-
const GZ = UNKNOWN;
18+
const int GZ = UNKNOWN;
2119
/**
22-
* @var int
2320
* @cvalue PHAR_ENT_COMPRESSED_NONE
2421
*/
25-
const NONE = UNKNOWN;
22+
const int NONE = UNKNOWN;
2623
/**
27-
* @var int
2824
* @cvalue PHAR_FORMAT_PHAR
2925
*/
30-
const PHAR = UNKNOWN;
26+
const int PHAR = UNKNOWN;
3127
/**
32-
* @var int
3328
* @cvalue PHAR_FORMAT_TAR
3429
*/
35-
const TAR = UNKNOWN;
30+
const int TAR = UNKNOWN;
3631
/**
37-
* @var int
3832
* @cvalue PHAR_FORMAT_ZIP
3933
*/
40-
const ZIP = UNKNOWN;
34+
const int ZIP = UNKNOWN;
4135
/**
42-
* @var int
4336
* @cvalue PHAR_ENT_COMPRESSION_MASK
4437
*/
45-
const COMPRESSED = UNKNOWN;
38+
const int COMPRESSED = UNKNOWN;
4639
/**
47-
* @var int
4840
* @cvalue PHAR_MIME_PHP
4941
*/
50-
const PHP = UNKNOWN;
42+
const int PHP = UNKNOWN;
5143
/**
52-
* @var int
5344
* @cvalue PHAR_MIME_PHPS
5445
*/
55-
const PHPS = UNKNOWN;
46+
const int PHPS = UNKNOWN;
5647
/**
57-
* @var int
5848
* @cvalue PHAR_SIG_MD5
5949
*/
60-
const MD5 = UNKNOWN;
50+
const int MD5 = UNKNOWN;
6151
/**
62-
* @var int
6352
* @cvalue PHAR_SIG_OPENSSL
6453
*/
65-
const OPENSSL = UNKNOWN;
54+
const int OPENSSL = UNKNOWN;
6655
/**
67-
* @var int
6856
* @cvalue PHAR_SIG_OPENSSL_SHA256
6957
*/
70-
const OPENSSL_SHA256 = UNKNOWN;
58+
const int OPENSSL_SHA256 = UNKNOWN;
7159
/**
72-
* @var int
7360
* @cvalue PHAR_SIG_OPENSSL_SHA512
7461
*/
75-
const OPENSSL_SHA512 = UNKNOWN;
62+
const int OPENSSL_SHA512 = UNKNOWN;
7663
/**
77-
* @var int
7864
* @cvalue PHAR_SIG_SHA1
7965
*/
80-
const SHA1 = UNKNOWN;
66+
const int SHA1 = UNKNOWN;
8167
/**
82-
* @var int
8368
* @cvalue PHAR_SIG_SHA256
8469
*/
85-
const SHA256 = UNKNOWN;
70+
const int SHA256 = UNKNOWN;
8671
/**
87-
* @var int
8872
* @cvalue PHAR_SIG_SHA512
8973
*/
90-
const SHA512 = UNKNOWN;
74+
const int SHA512 = UNKNOWN;
9175

9276
public function __construct(string $filename, int $flags = FilesystemIterator::SKIP_DOTS|FilesystemIterator::UNIX_PATHS, ?string $alias = null) {}
9377

ext/phar/phar_object_arginfo.h

Lines changed: 17 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)