Skip to content

Commit a65d95f

Browse files
committed
Copy & modify gen_stub.php
1 parent 66eda3f commit a65d95f

4 files changed

Lines changed: 6 additions & 3 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,4 @@ config.h.in~
4242
/report.xml
4343
/configure~
4444
/.cache
45+
/PHP-Parser-5.0.0/

Justfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ format:
3939

4040
# Regenerate libarchive_arginfo.h from libarchive.stub.php
4141
gen-arginfo:
42-
php "$(php-config --prefix)/lib/php/build/gen_stub.php" libarchive.stub.php
42+
php gen_stub.php libarchive.stub.php
4343

4444
# ── Individual targets ────────────────────────────────────────────────────────
4545

libarchive.stub.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ public function withPasswordCallback(callable $callable): static {}
394394
* @param int ...$formats One or more FORMAT_* constants.
395395
* @throws Exception If the archive has already been opened.
396396
*/
397-
public function supportFormats(int ...$formats): static {}
397+
public function supportFormats(int $format, int ...$formats): static {}
398398

399399
/**
400400
* Restrict reading to a specific decompression filter.
@@ -408,7 +408,7 @@ public function supportFormats(int ...$formats): static {}
408408
* @param int ...$filters One or more FILTER_* constants.
409409
* @throws Exception If the archive has already been opened.
410410
*/
411-
public function supportFilters(int ...$filters): static {}
411+
public function supportFilters(int $filter, int ...$filters): static {}
412412

413413
/**
414414
* Extract the current archive entry to disk.

libarchive_arginfo.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,12 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_libarchive_Archive_withPas
1919
ZEND_END_ARG_INFO()
2020

2121
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_libarchive_Archive_supportFormats, 0, 1, IS_STATIC, 0)
22+
ZEND_ARG_TYPE_INFO(0, format, IS_LONG, 0)
2223
ZEND_ARG_VARIADIC_TYPE_INFO(0, formats, IS_LONG, 0)
2324
ZEND_END_ARG_INFO()
2425

2526
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_libarchive_Archive_supportFilters, 0, 1, IS_STATIC, 0)
27+
ZEND_ARG_TYPE_INFO(0, filter, IS_LONG, 0)
2628
ZEND_ARG_VARIADIC_TYPE_INFO(0, filters, IS_LONG, 0)
2729
ZEND_END_ARG_INFO()
2830

0 commit comments

Comments
 (0)