Skip to content

Add class constant types to Phar extension #11826

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions UPGRADING
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ PHP 8.3 UPGRADE NOTES
modifiable pointers but was rejected due to complexity. For this reason, it
was decided to remove the feature instead.

- Phar:
. The type of Phar class constants are now declared.

- Standard:
. The range() function has had various changes:
* A TypeError is now thrown when passing objects, resources, or arrays
Expand Down
48 changes: 16 additions & 32 deletions ext/phar/phar_object.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,85 +9,69 @@ class PharException extends Exception
class Phar extends RecursiveDirectoryIterator implements Countable, ArrayAccess
{
/**
* @var int
* @cvalue PHAR_ENT_COMPRESSED_BZ2
*/
const BZ2 = UNKNOWN;
const int BZ2 = UNKNOWN;
/**
* @var int
* @cvalue PHAR_ENT_COMPRESSED_GZ
*/
const GZ = UNKNOWN;
const int GZ = UNKNOWN;
/**
* @var int
* @cvalue PHAR_ENT_COMPRESSED_NONE
*/
const NONE = UNKNOWN;
const int NONE = UNKNOWN;
/**
* @var int
* @cvalue PHAR_FORMAT_PHAR
*/
const PHAR = UNKNOWN;
const int PHAR = UNKNOWN;
/**
* @var int
* @cvalue PHAR_FORMAT_TAR
*/
const TAR = UNKNOWN;
const int TAR = UNKNOWN;
/**
* @var int
* @cvalue PHAR_FORMAT_ZIP
*/
const ZIP = UNKNOWN;
const int ZIP = UNKNOWN;
/**
* @var int
* @cvalue PHAR_ENT_COMPRESSION_MASK
*/
const COMPRESSED = UNKNOWN;
const int COMPRESSED = UNKNOWN;
/**
* @var int
* @cvalue PHAR_MIME_PHP
*/
const PHP = UNKNOWN;
const int PHP = UNKNOWN;
/**
* @var int
* @cvalue PHAR_MIME_PHPS
*/
const PHPS = UNKNOWN;
const int PHPS = UNKNOWN;
/**
* @var int
* @cvalue PHAR_SIG_MD5
*/
const MD5 = UNKNOWN;
const int MD5 = UNKNOWN;
/**
* @var int
* @cvalue PHAR_SIG_OPENSSL
*/
const OPENSSL = UNKNOWN;
const int OPENSSL = UNKNOWN;
/**
* @var int
* @cvalue PHAR_SIG_OPENSSL_SHA256
*/
const OPENSSL_SHA256 = UNKNOWN;
const int OPENSSL_SHA256 = UNKNOWN;
/**
* @var int
* @cvalue PHAR_SIG_OPENSSL_SHA512
*/
const OPENSSL_SHA512 = UNKNOWN;
const int OPENSSL_SHA512 = UNKNOWN;
/**
* @var int
* @cvalue PHAR_SIG_SHA1
*/
const SHA1 = UNKNOWN;
const int SHA1 = UNKNOWN;
/**
* @var int
* @cvalue PHAR_SIG_SHA256
*/
const SHA256 = UNKNOWN;
const int SHA256 = UNKNOWN;
/**
* @var int
* @cvalue PHAR_SIG_SHA512
*/
const SHA512 = UNKNOWN;
const int SHA512 = UNKNOWN;

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

Expand Down
34 changes: 17 additions & 17 deletions ext/phar/phar_object_arginfo.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.