Skip to content

Commit 0224cc8

Browse files
committed
Merge branch 'PHP-8.0'
* Add a few missing RETURN_THROWS(); * Fix a few ext/phar return types
2 parents 853e681 + 9bba9f6 commit 0224cc8

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

ext/phar/phar_object.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4519,8 +4519,8 @@ PHP_METHOD(PharFileInfo, isCompressed)
45194519
case PHAR_ENT_COMPRESSED_BZ2:
45204520
RETURN_BOOL(entry_obj->entry->flags & PHAR_ENT_COMPRESSED_BZ2);
45214521
default:
4522-
zend_throw_exception_ex(spl_ce_BadMethodCallException, 0, \
4523-
"Unknown compression type specified"); \
4522+
zend_throw_exception_ex(spl_ce_BadMethodCallException, 0, "Unknown compression type specified");
4523+
RETURN_THROWS();
45244524
}
45254525
}
45264526
/* }}} */
@@ -4543,8 +4543,8 @@ PHP_METHOD(PharFileInfo, getCRC32)
45434543
if (entry_obj->entry->is_crc_checked) {
45444544
RETURN_LONG(entry_obj->entry->crc32);
45454545
} else {
4546-
zend_throw_exception_ex(spl_ce_BadMethodCallException, 0, \
4547-
"Phar entry was not CRC checked"); \
4546+
zend_throw_exception_ex(spl_ce_BadMethodCallException, 0, "Phar entry was not CRC checked");
4547+
RETURN_THROWS();
45484548
}
45494549
}
45504550
/* }}} */
@@ -4932,8 +4932,8 @@ PHP_METHOD(PharFileInfo, compress)
49324932
entry_obj->entry->flags |= PHAR_ENT_COMPRESSED_BZ2;
49334933
break;
49344934
default:
4935-
zend_throw_exception_ex(spl_ce_BadMethodCallException, 0, \
4936-
"Unknown compression type specified"); \
4935+
zend_throw_exception_ex(spl_ce_BadMethodCallException, 0, "Unknown compression type specified");
4936+
RETURN_THROWS();
49374937
}
49384938

49394939
entry_obj->entry->phar->is_modified = 1;

ext/phar/phar_object.stub.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function decompress(?string $extension = null) {}
4242
/** @return Phar|null */
4343
public function convertToExecutable(?int $format = null, ?int $compression = null, ?string $extension = null) {}
4444

45-
/** @return Phar|null */
45+
/** @return PharData|null */
4646
public function convertToData(?int $format = null, ?int $compression = null, ?string $extension = null) {}
4747

4848
/** @return bool */
@@ -232,14 +232,16 @@ public function compressFiles(int $compression) {}
232232
public function decompressFiles() {}
233233

234234
/**
235-
* @return Phar|null
235+
* @return PharData|null
236236
* @implementation-alias Phar::compress
237+
* @no-verify
237238
*/
238239
public function compress(int $compression, ?string $extension = null) {}
239240

240241
/**
241-
* @return Phar|null
242+
* @return PharData|null
242243
* @implementation-alias Phar::decompress
244+
* @no-verify
243245
*/
244246
public function decompress(?string $extension = null) {}
245247

@@ -250,7 +252,7 @@ public function decompress(?string $extension = null) {}
250252
public function convertToExecutable(?int $format = null, ?int $compression = null, ?string $extension = null) {}
251253

252254
/**
253-
* @return Phar|null
255+
* @return PharData|null
254256
* @implementation-alias Phar::convertToData
255257
*/
256258
public function convertToData(?int $format = null, ?int $compression = null, ?string $extension = null) {}

ext/phar/phar_object_arginfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: 8f6974078c7b16fd452a34a9e1b5c509699a2037 */
2+
* Stub hash: a9525838eb14f6ad832b56bd07d64c2363f90001 */
33

44
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Phar___construct, 0, 0, 1)
55
ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)

0 commit comments

Comments
 (0)