summaryrefslogtreecommitdiffstats
path: root/zip-php8.patch
blob: 95b4e4c71165ebe376fba9bd4f88ddc97613a9f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
diff --git a/php8/php_zip.c b/php8/php_zip.c
index f131966..841488b 100644
--- a/php8/php_zip.c
+++ b/php8/php_zip.c
@@ -334,7 +334,7 @@ typedef struct {
 #endif
 } zip_options;
 
-static int php_zip_parse_options(zval *options, zip_options *opts)
+static int php_zip_parse_options(HashTable *options, zip_options *opts)
 /* {{{ */
 {
 	zval *option;
@@ -347,23 +347,23 @@ static int php_zip_parse_options(zval *options, zip_options *opts)
 	opts->enc_method = -1;  /* -1 to not change default */
 #endif
 
-	if ((option = zend_hash_str_find(Z_ARRVAL_P(options), "remove_all_path", sizeof("remove_all_path") - 1)) != NULL) {
+	if ((option = zend_hash_str_find(options, "remove_all_path", sizeof("remove_all_path") - 1)) != NULL) {
 		opts->remove_all_path = zval_get_long(option);
 	}
 
-	if ((option = zend_hash_str_find(Z_ARRVAL_P(options), "comp_method", sizeof("comp_method") - 1)) != NULL) {
+	if ((option = zend_hash_str_find(options, "comp_method", sizeof("comp_method") - 1)) != NULL) {
 		opts->comp_method = zval_get_long(option);
 
-		if ((option = zend_hash_str_find(Z_ARRVAL_P(options), "comp_flags", sizeof("comp_flags") - 1)) != NULL) {
+		if ((option = zend_hash_str_find(options, "comp_flags", sizeof("comp_flags") - 1)) != NULL) {
 			opts->comp_flags = zval_get_long(option);
 		}
 	}
 
 #ifdef HAVE_ENCRYPTION
-	if ((option = zend_hash_str_find(Z_ARRVAL_P(options), "enc_method", sizeof("enc_method") - 1)) != NULL) {
+	if ((option = zend_hash_str_find(options, "enc_method", sizeof("enc_method") - 1)) != NULL) {
 		opts->enc_method = zval_get_long(option);
 
-		if ((option = zend_hash_str_find(Z_ARRVAL_P(options), "enc_password", sizeof("enc_password") - 1)) != NULL) {
+		if ((option = zend_hash_str_find(options, "enc_password", sizeof("enc_password") - 1)) != NULL) {
 			if (Z_TYPE_P(option) != IS_STRING) {
 				php_error_docref(NULL, E_WARNING, "enc_password option expected to be a string");
 				return -1;
@@ -373,7 +373,7 @@ static int php_zip_parse_options(zval *options, zip_options *opts)
 	}
 #endif
 
-	if ((option = zend_hash_str_find(Z_ARRVAL_P(options), "remove_path", sizeof("remove_path") - 1)) != NULL) {
+	if ((option = zend_hash_str_find(options, "remove_path", sizeof("remove_path") - 1)) != NULL) {
 		if (Z_TYPE_P(option) != IS_STRING) {
 			php_error_docref(NULL, E_WARNING, "remove_path option expected to be a string");
 			return -1;
@@ -393,7 +393,7 @@ static int php_zip_parse_options(zval *options, zip_options *opts)
 		opts->remove_path = Z_STRVAL_P(option);
 	}
 
-	if ((option = zend_hash_str_find(Z_ARRVAL_P(options), "add_path", sizeof("add_path") - 1)) != NULL) {
+	if ((option = zend_hash_str_find(options, "add_path", sizeof("add_path") - 1)) != NULL) {
 		if (Z_TYPE_P(option) != IS_STRING) {
 			php_error_docref(NULL, E_WARNING, "add_path option expected to be a string");
 			return -1;
@@ -413,7 +413,7 @@ static int php_zip_parse_options(zval *options, zip_options *opts)
 		opts->add_path = Z_STRVAL_P(option);
 	}
 
-	if ((option = zend_hash_str_find(Z_ARRVAL_P(options), "flags", sizeof("flags") - 1)) != NULL) {
+	if ((option = zend_hash_str_find(options, "flags", sizeof("flags") - 1)) != NULL) {
 		if (Z_TYPE_P(option) != IS_LONG) {
 			php_error_docref(NULL, E_WARNING, "flags option expected to be a integer");
 			return -1;
@@ -1101,8 +1101,7 @@ static PHP_MSHUTDOWN_FUNCTION(zip);
 static PHP_MINFO_FUNCTION(zip);
 /* }}} */
 
-/* {{{ zip_module_entry
- */
+/* {{{ zip_module_entry */
 zend_module_entry zip_module_entry = {
 	STANDARD_MODULE_HEADER,
 	"zip",
@@ -1122,8 +1121,7 @@ ZEND_GET_MODULE(zip)
 #endif
 /* set macro */
 
-/* {{{ proto resource zip_open(string filename)
-Create new zip using source uri for output */
+/* {{{ Create new zip using source uri for output */
 PHP_FUNCTION(zip_open)
 {
 	char resolved_path[MAXPATHLEN + 1];
@@ -1163,8 +1161,7 @@ PHP_FUNCTION(zip_open)
 }
 /* }}} */
 
-/* {{{ proto void zip_close(resource zip)
-   Close a Zip archive */
+/* {{{ Close a Zip archive */
 PHP_FUNCTION(zip_close)
 {
 	zval * zip;
@@ -1183,8 +1180,7 @@ PHP_FUNCTION(zip_close)
 }
 /* }}} */
 
-/* {{{ proto resource zip_read(resource zip)
-   Returns the next file in the archive */
+/* {{{ Returns the next file in the archive */
 PHP_FUNCTION(zip_read)
 {
 	zval *zip_dp;
@@ -1229,8 +1225,7 @@ PHP_FUNCTION(zip_read)
 }
 /* }}} */
 
-/* {{{ proto bool zip_entry_open(resource zip_dp, resource zip_entry [, string mode])
-   Open a Zip File, pointed by the resource entry */
+/* {{{ Open a Zip File, pointed by the resource entry */
 /* Dummy function to follow the old API */
 PHP_FUNCTION(zip_entry_open)
 {
@@ -1261,8 +1256,7 @@ PHP_FUNCTION(zip_entry_open)
 }
 /* }}} */
 
-/* {{{ proto bool zip_entry_close(resource zip_ent)
-   Close a zip entry */
+/* {{{ Close a zip entry */
 PHP_FUNCTION(zip_entry_close)
 {
 	zval * zip_entry;
@@ -1280,8 +1274,7 @@ PHP_FUNCTION(zip_entry_close)
 }
 /* }}} */
 
-/* {{{ proto mixed zip_entry_read(resource zip_entry [, int len])
-   Read from an open directory entry */
+/* {{{ Read from an open directory entry */
 PHP_FUNCTION(zip_entry_read)
 {
 	zval * zip_entry;
@@ -1374,40 +1367,35 @@ static void php_zip_entry_get_info(INTERNAL_FUNCTION_PARAMETERS, int opt) /* {{{
 }
 /* }}} */
 
-/* {{{ proto string zip_entry_name(resource zip_entry)
-   Return the name given a ZZip entry */
+/* {{{ Return the name given a ZZip entry */
 PHP_FUNCTION(zip_entry_name)
 {
 	php_zip_entry_get_info(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0);
 }
 /* }}} */
 
-/* {{{ proto int zip_entry_compressedsize(resource zip_entry)
-   Return the compressed size of a ZZip entry */
+/* {{{ Return the compressed size of a ZZip entry */
 PHP_FUNCTION(zip_entry_compressedsize)
 {
 	php_zip_entry_get_info(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1);
 }
 /* }}} */
 
-/* {{{ proto int zip_entry_filesize(resource zip_entry)
-   Return the actual filesize of a ZZip entry */
+/* {{{ Return the actual filesize of a ZZip entry */
 PHP_FUNCTION(zip_entry_filesize)
 {
 	php_zip_entry_get_info(INTERNAL_FUNCTION_PARAM_PASSTHRU, 2);
 }
 /* }}} */
 
-/* {{{ proto string zip_entry_compressionmethod(resource zip_entry)
-   Return a string containing the compression method used on a particular entry */
+/* {{{ Return a string containing the compression method used on a particular entry */
 PHP_FUNCTION(zip_entry_compressionmethod)
 {
 	php_zip_entry_get_info(INTERNAL_FUNCTION_PARAM_PASSTHRU, 3);
 }
 /* }}} */
 
-/* {{{ proto mixed ZipArchive::open(string source [, int flags])
-Create new zip using source uri for output, return TRUE on success or the error code */
+/* {{{ Create new zip using source uri for output, return TRUE on success or the error code */
 PHP_METHOD(ZipArchive, open)
 {
 	struct zip *intern;
@@ -1452,16 +1440,20 @@ PHP_METHOD(ZipArchive, open)
 		ze_obj->filename = NULL;
 	}
 
-	/* reduce BC break introduce in libzip 1.6.0
-	   "Do not accept empty files as valid zip archives any longer" */
-
 	/* open for write without option to empty the archive */
+#ifdef ZIP_RDONLY
 	if ((flags & (ZIP_TRUNCATE | ZIP_RDONLY)) == 0) {
+#else
+	if ((flags & ZIP_TRUNCATE) == 0) {
+#endif
 		zend_stat_t st;
 
 		/* exists and is empty */
 		if (VCWD_STAT(resolved_path, &st) == 0 && st.st_size == 0) {
 			php_error_docref(NULL, E_DEPRECATED, "Using empty file as ZipArchive is deprecated");
+
+			/* reduce BC break introduced in libzip 1.6.0
+			   "Do not accept empty files as valid zip archives any longer" */
 			flags |= ZIP_TRUNCATE;
 		}
 	}
@@ -1478,8 +1470,7 @@ PHP_METHOD(ZipArchive, open)
 }
 /* }}} */
 
-/* {{{ proto resource ZipArchive::setPassword(string password)
-Set the password for the active archive */
+/* {{{ Set the password for the active archive */
 PHP_METHOD(ZipArchive, setPassword)
 {
 	struct zip *intern;
@@ -1506,8 +1497,7 @@ PHP_METHOD(ZipArchive, setPassword)
 }
 /* }}} */
 
-/* {{{ proto bool ZipArchive::close()
-close the zip archive */
+/* {{{ close the zip archive */
 PHP_METHOD(ZipArchive, close)
 {
 	struct zip *intern;
@@ -1558,8 +1548,7 @@ PHP_METHOD(ZipArchive, close)
 }
 /* }}} */
 
-/* {{{ proto bool ZipArchive::count()
-close the zip archive */
+/* {{{ close the zip archive */
 PHP_METHOD(ZipArchive, count)
 {
 	struct zip *intern;
@@ -1577,8 +1566,7 @@ PHP_METHOD(ZipArchive, count)
 }
 /* }}} */
 
-/* {{{ proto string ZipArchive::getStatusString()
- * Returns the status error message, system and/or zip messages */
+/* {{{ Returns the status error message, system and/or zip messages */
 PHP_METHOD(ZipArchive, getStatusString)
 {
 	zval *self = ZEND_THIS;
@@ -1621,8 +1609,7 @@ PHP_METHOD(ZipArchive, getStatusString)
 }
 /* }}} */
 
-/* {{{ proto bool ZipArchive::addEmptyDir(string dirname [, bool flags = 0])
-Returns the index of the entry named filename in the archive */
+/* {{{ Returns the index of the entry named filename in the archive */
 PHP_METHOD(ZipArchive, addEmptyDir)
 {
 	struct zip *intern;
@@ -1671,19 +1658,19 @@ static void php_zip_add_from_pattern(INTERNAL_FUNCTION_PARAMETERS, int type) /*
 	char *path = ".";
 	size_t  path_len = 1;
 	zend_long glob_flags = 0;
-	zval *options = NULL;
+	HashTable *options = NULL;
 	zip_options opts;
 	int found;
 	zend_string *pattern;
 
 	/* 1 == glob, 2 == pcre */
 	if (type == 1) {
-		if (zend_parse_parameters(ZEND_NUM_ARGS(), "P|la",
+		if (zend_parse_parameters(ZEND_NUM_ARGS(), "P|lh",
 					&pattern, &glob_flags, &options) == FAILURE) {
 			RETURN_THROWS();
 		}
 	} else {
-		if (zend_parse_parameters(ZEND_NUM_ARGS(), "P|sa",
+		if (zend_parse_parameters(ZEND_NUM_ARGS(), "P|sh",
 					&pattern, &path, &path_len, &options) == FAILURE) {
 			RETURN_THROWS();
 		}
@@ -1693,7 +1680,7 @@ static void php_zip_add_from_pattern(INTERNAL_FUNCTION_PARAMETERS, int type) /*
 		php_error_docref(NULL, E_NOTICE, "Empty string as pattern");
 		RETURN_FALSE;
 	}
-	if (options && zend_hash_num_elements(Z_ARRVAL_P(options)) > 0 && (php_zip_parse_options(options, &opts) < 0)) {
+	if (options && zend_hash_num_elements(options) > 0 && (php_zip_parse_options(options, &opts) < 0)) {
 		RETURN_FALSE;
 	}
 
@@ -1778,24 +1765,21 @@ static void php_zip_add_from_pattern(INTERNAL_FUNCTION_PARAMETERS, int type) /*
 }
 /* }}} */
 
-/* {{{ proto bool ZipArchive::addGlob(string pattern[,int flags [, array options]])
-Add files matching the glob pattern. See php's glob for the pattern syntax. */
+/* {{{ Add files matching the glob pattern. See php's glob for the pattern syntax. */
 PHP_METHOD(ZipArchive, addGlob)
 {
 	php_zip_add_from_pattern(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1);
 }
 /* }}} */
 
-/* {{{ proto bool ZipArchive::addPattern(string pattern[, string path [, array options]])
-Add files matching the pcre pattern. See php's pcre for the pattern syntax. */
+/* {{{ Add files matching the pcre pattern. See php's pcre for the pattern syntax. */
 PHP_METHOD(ZipArchive, addPattern)
 {
 	php_zip_add_from_pattern(INTERNAL_FUNCTION_PARAM_PASSTHRU, 2);
 }
 /* }}} */
 
-/* {{{ proto bool ZipArchive::addFile(string filepath[, string entryname[, int start [, int length [, int flags = FL_OVERWRITE]]]])
-Add a file in a Zip archive using its path and the name to use. */
+/* {{{ Add a file in a Zip archive using its path and the name to use. */
 PHP_METHOD(ZipArchive, addFile)
 {
 	zval *self = ZEND_THIS;
@@ -1829,8 +1813,7 @@ PHP_METHOD(ZipArchive, addFile)
 }
 /* }}} */
 
-/* {{{ proto bool ZipArchive::replaceFile(string filepath, int index[, int start [, int length [, int flags = 0]]])
-Add a file in a Zip archive using its path and the name to use. */
+/* {{{ Add a file in a Zip archive using its path and the name to use. */
 PHP_METHOD(ZipArchive, replaceFile)
 {
 	zval *self = ZEND_THIS;
@@ -1863,8 +1846,7 @@ PHP_METHOD(ZipArchive, replaceFile)
 }
 /* }}} */
 
-/* {{{ proto bool ZipArchive::addFromString(string name, string content [, int flags = FL_OVERWRITE])
-Add a file using content and the entry name */
+/* {{{ Add a file using content and the entry name */
 PHP_METHOD(ZipArchive, addFromString)
 {
 	struct zip *intern;
@@ -1913,8 +1895,7 @@ PHP_METHOD(ZipArchive, addFromString)
 }
 /* }}} */
 
-/* {{{ proto array ZipArchive::statName(string filename[, int flags])
-Returns the information about a the zip entry filename */
+/* {{{ Returns the information about a the zip entry filename */
 PHP_METHOD(ZipArchive, statName)
 {
 	struct zip *intern;
@@ -1935,8 +1916,7 @@ PHP_METHOD(ZipArchive, statName)
 }
 /* }}} */
 
-/* {{{ proto resource ZipArchive::statIndex(int index[, int flags])
-Returns the zip entry information using its index */
+/* {{{ Returns the zip entry information using its index */
 PHP_METHOD(ZipArchive, statIndex)
 {
 	struct zip *intern;
@@ -1959,8 +1939,7 @@ PHP_METHOD(ZipArchive, statIndex)
 }
 /* }}} */
 
-/* {{{ proto int ZipArchive::locateName(string filename[, int flags])
-Returns the index of the entry named filename in the archive */
+/* {{{ Returns the index of the entry named filename in the archive */
 PHP_METHOD(ZipArchive, locateName)
 {
 	struct zip *intern;
@@ -1989,8 +1968,7 @@ PHP_METHOD(ZipArchive, locateName)
 }
 /* }}} */
 
-/* {{{ proto string ZipArchive::getNameIndex(int index [, int flags])
-Returns the name of the file at position index */
+/* {{{ Returns the name of the file at position index */
 PHP_METHOD(ZipArchive, getNameIndex)
 {
 	struct zip *intern;
@@ -2015,8 +1993,7 @@ PHP_METHOD(ZipArchive, getNameIndex)
 }
 /* }}} */
 
-/* {{{ proto bool ZipArchive::setArchiveComment(string comment)
-Set or remove (NULL/'') the comment of the archive */
+/* {{{ Set or remove (NULL/'') the comment of the archive */
 PHP_METHOD(ZipArchive, setArchiveComment)
 {
 	struct zip *intern;
@@ -2043,8 +2020,7 @@ PHP_METHOD(ZipArchive, setArchiveComment)
 }
 /* }}} */
 
-/* {{{ proto string ZipArchive::getArchiveComment([int flags])
-Returns the comment of an entry using its index */
+/* {{{ Returns the comment of an entry using its index */
 PHP_METHOD(ZipArchive, getArchiveComment)
 {
 	struct zip *intern;
@@ -2067,8 +2043,7 @@ PHP_METHOD(ZipArchive, getArchiveComment)
 }
 /* }}} */
 
-/* {{{ proto bool ZipArchive::setCommentName(string name, string comment)
-Set or remove (NULL/'') the comment of an entry using its Name */
+/* {{{ Set or remove (NULL/'') the comment of an entry using its Name */
 PHP_METHOD(ZipArchive, setCommentName)
 {
 	struct zip *intern;
@@ -2101,8 +2076,7 @@ PHP_METHOD(ZipArchive, setCommentName)
 }
 /* }}} */
 
-/* {{{ proto bool ZipArchive::setCommentIndex(int index, string comment)
-Set or remove (NULL/'') the comment of an entry using its index */
+/* {{{ Set or remove (NULL/'') the comment of an entry using its index */
 PHP_METHOD(ZipArchive, setCommentIndex)
 {
 	struct zip *intern;
@@ -2132,8 +2106,7 @@ PHP_METHOD(ZipArchive, setCommentIndex)
 /* those constants/functions are only available in libzip since 0.11.2 */
 #ifdef ZIP_OPSYS_DEFAULT
 
-/* {{{ proto bool ZipArchive::setExternalAttributesName(string name, int opsys, int attr [, int flags])
-Set external attributes for file in zip, using its name */
+/* {{{ Set external attributes for file in zip, using its name */
 PHP_METHOD(ZipArchive, setExternalAttributesName)
 {
 	struct zip *intern;
@@ -2166,8 +2139,7 @@ PHP_METHOD(ZipArchive, setExternalAttributesName)
 }
 /* }}} */
 
-/* {{{ proto bool ZipArchive::setExternalAttributesIndex(int index, int opsys, int attr [, int flags])
-Set external attributes for file in zip, using its index */
+/* {{{ Set external attributes for file in zip, using its index */
 PHP_METHOD(ZipArchive, setExternalAttributesIndex)
 {
 	struct zip *intern;
@@ -2191,8 +2163,7 @@ PHP_METHOD(ZipArchive, setExternalAttributesIndex)
 }
 /* }}} */
 
-/* {{{ proto bool ZipArchive::getExternalAttributesName(string name, int &opsys, int &attr [, int flags])
-Get external attributes for file in zip, using its name */
+/* {{{ Get external attributes for file in zip, using its name */
 PHP_METHOD(ZipArchive, getExternalAttributesName)
 {
 	struct zip *intern;
@@ -2229,8 +2200,7 @@ PHP_METHOD(ZipArchive, getExternalAttributesName)
 }
 /* }}} */
 
-/* {{{ proto bool ZipArchive::getExternalAttributesIndex(int index, int &opsys, int &attr [, int flags])
-Get external attributes for file in zip, using its index */
+/* {{{ Get external attributes for file in zip, using its index */
 PHP_METHOD(ZipArchive, getExternalAttributesIndex)
 {
 	struct zip *intern;
@@ -2260,8 +2230,7 @@ PHP_METHOD(ZipArchive, getExternalAttributesIndex)
 #endif /* ifdef ZIP_OPSYS_DEFAULT */
 
 #ifdef HAVE_ENCRYPTION
-/* {{{ proto bool ZipArchive::setEncryptionName(string name, int method, [string password])
-Set encryption method for file in zip, using its name */
+/* {{{ Set encryption method for file in zip, using its name */
 PHP_METHOD(ZipArchive, setEncryptionName)
 {
 	struct zip *intern;
@@ -2294,8 +2263,7 @@ PHP_METHOD(ZipArchive, setEncryptionName)
 }
 /* }}} */
 
-/* {{{ proto bool ZipArchive::setEncryptionIndex(int index, int method, [string password])
-Set encryption method for file in zip, using its index */
+/* {{{ Set encryption method for file in zip, using its index */
 PHP_METHOD(ZipArchive, setEncryptionIndex)
 {
 	struct zip *intern;
@@ -2319,8 +2287,7 @@ PHP_METHOD(ZipArchive, setEncryptionIndex)
 /* }}} */
 #endif
 
-/* {{{ proto string ZipArchive::getCommentName(string name[, int flags])
-Returns the comment of an entry using its name */
+/* {{{ Returns the comment of an entry using its name */
 PHP_METHOD(ZipArchive, getCommentName)
 {
 	struct zip *intern;
@@ -2354,8 +2321,7 @@ PHP_METHOD(ZipArchive, getCommentName)
 }
 /* }}} */
 
-/* {{{ proto string ZipArchive::getCommentIndex(int index[, int flags])
-Returns the comment of an entry using its index */
+/* {{{ Returns the comment of an entry using its index */
 PHP_METHOD(ZipArchive, getCommentIndex)
 {
 	struct zip *intern;
@@ -2378,8 +2344,7 @@ PHP_METHOD(ZipArchive, getCommentIndex)
 }
 /* }}} */
 
-/* {{{ proto bool ZipArchive::setCompressionName(string name, int comp_method[, int comp_flags])
-Set the compression of a file in zip, using its name */
+/* {{{ Set the compression of a file in zip, using its name */
 PHP_METHOD(ZipArchive, setCompressionName)
  {
 	struct zip *intern;
@@ -2413,8 +2378,7 @@ PHP_METHOD(ZipArchive, setCompressionName)
 }
 /* }}} */
 
-/* {{{ proto bool ZipArchive::setCompressionIndex(int index, int comp_method[, int comp_flags])
-Set the compression of a file in zip, using its index */
+/* {{{ Set the compression of a file in zip, using its index */
 PHP_METHOD(ZipArchive, setCompressionIndex)
 {
 	struct zip *intern;
@@ -2438,8 +2402,7 @@ PHP_METHOD(ZipArchive, setCompressionIndex)
 /* }}} */
 
 #ifdef HAVE_SET_MTIME
-/* {{{ proto bool ZipArchive::setMtimeName(string name, int timestamp[, int flags])
-Set the modification time of a file in zip, using its name */
+/* {{{ Set the modification time of a file in zip, using its name */
 PHP_METHOD(ZipArchive, setMtimeName)
  {
 	struct zip *intern;
@@ -2473,8 +2436,7 @@ PHP_METHOD(ZipArchive, setMtimeName)
 }
 /* }}} */
 
-/* {{{ proto bool ZipArchive::setMtimeIndex(int index, int timestamp[, int flags])
-Set the modification time of a file in zip, using its index */
+/* {{{ Set the modification time of a file in zip, using its index */
 PHP_METHOD(ZipArchive, setMtimeIndex)
 {
 	struct zip *intern;
@@ -2498,8 +2460,7 @@ PHP_METHOD(ZipArchive, setMtimeIndex)
 /* }}} */
 #endif
 
-/* {{{ proto bool ZipArchive::deleteIndex(int index)
-Delete a file using its index */
+/* {{{ Delete a file using its index */
 PHP_METHOD(ZipArchive, deleteIndex)
 {
 	struct zip *intern;
@@ -2524,8 +2485,7 @@ PHP_METHOD(ZipArchive, deleteIndex)
 }
 /* }}} */
 
-/* {{{ proto bool ZipArchive::deleteName(string name)
-Delete a file using its index */
+/* {{{ Delete a file using its index */
 PHP_METHOD(ZipArchive, deleteName)
 {
 	struct zip *intern;
@@ -2552,8 +2512,7 @@ PHP_METHOD(ZipArchive, deleteName)
 }
 /* }}} */
 
-/* {{{ proto bool ZipArchive::renameIndex(int index, string new_name)
-Rename an entry selected by its index to new_name */
+/* {{{ Rename an entry selected by its index to new_name */
 PHP_METHOD(ZipArchive, renameIndex)
 {
 	struct zip *intern;
@@ -2585,8 +2544,7 @@ PHP_METHOD(ZipArchive, renameIndex)
 }
 /* }}} */
 
-/* {{{ proto bool ZipArchive::renameName(string name, string new_name)
-Rename an entry selected by its name to new_name */
+/* {{{ Rename an entry selected by its name to new_name */
 PHP_METHOD(ZipArchive, renameName)
 {
 	struct zip *intern;
@@ -2616,8 +2574,7 @@ PHP_METHOD(ZipArchive, renameName)
 }
 /* }}} */
 
-/* {{{ proto bool ZipArchive::unchangeIndex(int index)
-Changes to the file at position index are reverted */
+/* {{{ Changes to the file at position index are reverted */
 PHP_METHOD(ZipArchive, unchangeIndex)
 {
 	struct zip *intern;
@@ -2642,8 +2599,7 @@ PHP_METHOD(ZipArchive, unchangeIndex)
 }
 /* }}} */
 
-/* {{{ proto bool ZipArchive::unchangeName(string name)
-Changes to the file named 'name' are reverted */
+/* {{{ Changes to the file named 'name' are reverted */
 PHP_METHOD(ZipArchive, unchangeName)
 {
 	struct zip *intern;
@@ -2672,8 +2628,7 @@ PHP_METHOD(ZipArchive, unchangeName)
 }
 /* }}} */
 
-/* {{{ proto bool ZipArchive::unchangeAll()
-All changes to files and global information in archive are reverted */
+/* {{{ All changes to files and global information in archive are reverted */
 PHP_METHOD(ZipArchive, unchangeAll)
 {
 	struct zip *intern;
@@ -2693,8 +2648,7 @@ PHP_METHOD(ZipArchive, unchangeAll)
 }
 /* }}} */
 
-/* {{{ proto bool ZipArchive::unchangeArchive()
-Revert all global changes to the archive archive.  For now, this only reverts archive comment changes. */
+/* {{{ Revert all global changes to the archive archive.  For now, this only reverts archive comment changes. */
 PHP_METHOD(ZipArchive, unchangeArchive)
 {
 	struct zip *intern;
@@ -2714,8 +2668,7 @@ PHP_METHOD(ZipArchive, unchangeArchive)
 }
 /* }}} */
 
-/* {{{ proto bool ZipArchive::extractTo(string pathto[, mixed files])
-Extract one or more file from a zip archive */
+/* {{{ Extract one or more file from a zip archive */
 /* TODO:
  * - allow index or array of indices
  * - replace path
@@ -2868,24 +2821,21 @@ static void php_zip_get_from(INTERNAL_FUNCTION_PARAMETERS, int type) /* {{{ */
 }
 /* }}} */
 
-/* {{{ proto string ZipArchive::getFromName(string entryname[, int len [, int flags]])
-get the contents of an entry using its name */
+/* {{{ get the contents of an entry using its name */
 PHP_METHOD(ZipArchive, getFromName)
 {
 	php_zip_get_from(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1);
 }
 /* }}} */
 
-/* {{{ proto string ZipArchive::getFromIndex(int index[, int len [, int flags]])
-get the contents of an entry using its index */
+/* {{{ get the contents of an entry using its index */
 PHP_METHOD(ZipArchive, getFromIndex)
 {
 	php_zip_get_from(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0);
 }
 /* }}} */
 
-/* {{{ proto resource ZipArchive::getStream(string entryname)
-get a stream for an entry using its name */
+/* {{{ get a stream for an entry using its name */
 PHP_METHOD(ZipArchive, getStream)
 {
 	struct zip *intern;
@@ -2925,13 +2875,12 @@ static void _php_zip_progress_callback(zip_t *arch, double state, void *ptr)
 	ze_zip_object *obj = ptr;
 
 	ZVAL_DOUBLE(&cb_args[0], state);
-	if (call_user_function_ex(EG(function_table), NULL, &obj->progress_callback, &cb_retval, 1, cb_args, 0, NULL) == SUCCESS && !Z_ISUNDEF(cb_retval)) {
+	if (call_user_function(EG(function_table), NULL, &obj->progress_callback, &cb_retval, 1, cb_args) == SUCCESS && !Z_ISUNDEF(cb_retval)) {
 		zval_ptr_dtor(&cb_retval);
 	}
 }
 
-/* {{{ proto bool ZipArchive::registerProgressCallback(double rate, callable callback)
-register a progression callback: void callback(double state); */
+/* {{{ register a progression callback: void callback(double state); */
 PHP_METHOD(ZipArchive, registerProgressCallback)
 {
 	struct zip *intern;
@@ -2981,7 +2930,7 @@ static int _php_zip_cancel_callback(zip_t *arch, void *ptr)
 	int retval = 0;
 	ze_zip_object *obj = ptr;
 
-	if (call_user_function_ex(EG(function_table), NULL, &obj->cancel_callback, &cb_retval, 0, NULL, 0, NULL) == SUCCESS && !Z_ISUNDEF(cb_retval)) {
+	if (call_user_function(EG(function_table), NULL, &obj->cancel_callback, &cb_retval, 0, NULL) == SUCCESS && !Z_ISUNDEF(cb_retval)) {
 		retval = zval_get_long(&cb_retval);
 		zval_ptr_dtor(&cb_retval);
 	}
@@ -2989,8 +2938,7 @@ static int _php_zip_cancel_callback(zip_t *arch, void *ptr)
 	return retval;
 }
 
-/* {{{ proto bool ZipArchive::registerCancelCallback(callable callback)
-register a progression callback: int callback(double state); */
+/* {{{ register a progression callback: int callback(double state); */
 PHP_METHOD(ZipArchive, registerCancelCallback)
 {
 	struct zip *intern;
@@ -3033,8 +2981,7 @@ PHP_METHOD(ZipArchive, registerCancelCallback)
 #endif
 
 #ifdef HAVE_METHOD_SUPPORTED
-/* {{{ proto bool ZipArchive::isCompressionMethodSupported(int method, bool enc)
-check if a compression method is available in used libzip */
+/* {{{ check if a compression method is available in used libzip */
 PHP_METHOD(ZipArchive, isCompressionMethodSupported)
 {
 	zend_long method;
@@ -3047,8 +2994,7 @@ PHP_METHOD(ZipArchive, isCompressionMethodSupported)
 }
 /* }}} */
 
-/* {{{ proto bool ZipArchive::isEncryptionMethodSupported(int method, bool enc)
-check if a encryption method is available in used libzip */
+/* {{{ check if a encryption method is available in used libzip */
 PHP_METHOD(ZipArchive, isEncryptionMethodSupported)
 {
 	zend_long method;
@@ -3136,6 +3082,9 @@ static PHP_MINIT_FUNCTION(zip)
 #ifdef ZIP_CM_LZMA2
 	REGISTER_ZIP_CLASS_CONST_LONG("CM_LZMA2", ZIP_CM_LZMA2);
 #endif
+#ifdef ZIP_CM_ZSTD
+	REGISTER_ZIP_CLASS_CONST_LONG("CM_ZSTD", ZIP_CM_ZSTD);
+#endif
 #ifdef ZIP_CM_XZ
 	REGISTER_ZIP_CLASS_CONST_LONG("CM_XZ", ZIP_CM_XZ);
 #endif
@@ -3240,8 +3189,7 @@ static PHP_MINIT_FUNCTION(zip)
 }
 /* }}} */
 
-/* {{{ PHP_MSHUTDOWN_FUNCTION
- */
+/* {{{ PHP_MSHUTDOWN_FUNCTION */
 static PHP_MSHUTDOWN_FUNCTION(zip)
 {
 	zend_hash_destroy(&zip_prop_handlers);
@@ -3250,8 +3198,7 @@ static PHP_MSHUTDOWN_FUNCTION(zip)
 }
 /* }}} */
 
-/* {{{ PHP_MINFO_FUNCTION
- */
+/* {{{ PHP_MINFO_FUNCTION */
 static PHP_MINFO_FUNCTION(zip)
 {
 	php_info_print_table_start();
diff --git a/php8/php_zip.stub.php b/php8/php_zip.stub.php
index da8e373..4d9ba27 100644
--- a/php8/php_zip.stub.php
+++ b/php8/php_zip.stub.php
@@ -2,44 +2,66 @@
 
 /** @generate-function-entries */
 
-/** @return resource|int|false */
+/**
+ * @return resource|int|false
+ * @deprecated
+ */
 function zip_open(string $filename) {}
 
 /**
  * @param resource $zip
+ * @deprecated
  */
 function zip_close($zip): void {}
 
 /**
  * @param resource $zip
  * @return resource|false
+ * @deprecated
  */
 function zip_read($zip) {}
 
 /**
  * @param resource $zip_dp
  * @param resource $zip_entry
+ * @deprecated
  */
 function zip_entry_open($zip_dp, $zip_entry, string $mode = 'rb'): bool {}
 
 /**
  * @param resource $zip_ent
+ * @deprecated
  */
 function zip_entry_close($zip_ent): bool {}
 
-/** @param resource $zip_entry */
+/**
+ * @param resource $zip_entry
+ * @deprecated
+ */
 function zip_entry_read($zip_entry, int $len = 1024): string|false {}
 
-/** @param resource $zip_entry */
+/**
+ * @param resource $zip_entry
+ * @deprecated
+ */
 function zip_entry_name($zip_entry): string|false {}
 
-/** @param resource $zip_entry */
+/**
+ * @param resource $zip_entry
+ * @deprecated
+ */
 function zip_entry_compressedsize($zip_entry): int|false {}
 
-/** @param resource $zip_entry */
+/**
+ * @param resource $zip_entry
+ * @deprecated
+ */
 function zip_entry_filesize($zip_entry): int|false {}
 
-/** @param resource $zip_entry */
+/**
+ * @param resource $zip_entry
+ * @deprecated
+ */
 function zip_entry_compressionmethod($zip_entry): string|false {}
 
 class ZipArchive
@@ -194,9 +216,9 @@ class ZipArchive
 
 #ifdef HAVE_METHOD_SUPPORTED
     /** @return bool */
-    public static function isCompressionMethodSupported(int $method, bool $enc): bool {}
+    public static function isCompressionMethodSupported(int $method, bool $enc = true): bool {}
 
     /** @return bool */
-    public static function isEncryptionMethodSupported(int $method, bool $enc): bool {}
+    public static function isEncryptionMethodSupported(int $method, bool $enc = true): bool {}
 #endif
 }
diff --git a/php8/php_zip_arginfo.h b/php8/php_zip_arginfo.h
index c1e8f24..25157d8 100644
--- a/php8/php_zip_arginfo.h
+++ b/php8/php_zip_arginfo.h
@@ -1,4 +1,5 @@
-/* This is a generated file, edit the .stub.php file instead. */
+/* This is a generated file, edit the .stub.php file instead.
+ * Stub hash: 95608dd1d6c2ad80ada990a9e939b76dba705d48 */
 
 ZEND_BEGIN_ARG_INFO_EX(arginfo_zip_open, 0, 0, 1)
 	ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
@@ -271,9 +272,9 @@ ZEND_END_ARG_INFO()
 #endif
 
 #if defined(HAVE_METHOD_SUPPORTED)
-ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ZipArchive_isCompressionMethodSupported, 0, 2, _IS_BOOL, 0)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ZipArchive_isCompressionMethodSupported, 0, 1, _IS_BOOL, 0)
 	ZEND_ARG_TYPE_INFO(0, method, IS_LONG, 0)
-	ZEND_ARG_TYPE_INFO(0, enc, _IS_BOOL, 0)
+	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, enc, _IS_BOOL, 0, "true")
 ZEND_END_ARG_INFO()
 #endif
 
@@ -366,16 +367,16 @@ ZEND_METHOD(ZipArchive, isEncryptionMethodSupported);
 
 
 static const zend_function_entry ext_functions[] = {
-	ZEND_FE(zip_open, arginfo_zip_open)
-	ZEND_FE(zip_close, arginfo_zip_close)
-	ZEND_FE(zip_read, arginfo_zip_read)
-	ZEND_FE(zip_entry_open, arginfo_zip_entry_open)
-	ZEND_FE(zip_entry_close, arginfo_zip_entry_close)
-	ZEND_FE(zip_entry_read, arginfo_zip_entry_read)
-	ZEND_FE(zip_entry_name, arginfo_zip_entry_name)
-	ZEND_FE(zip_entry_compressedsize, arginfo_zip_entry_compressedsize)
-	ZEND_FE(zip_entry_filesize, arginfo_zip_entry_filesize)
-	ZEND_FE(zip_entry_compressionmethod, arginfo_zip_entry_compressionmethod)
+	ZEND_DEP_FE(zip_open, arginfo_zip_open)
+	ZEND_DEP_FE(zip_close, arginfo_zip_close)
+	ZEND_DEP_FE(zip_read, arginfo_zip_read)
+	ZEND_DEP_FE(zip_entry_open, arginfo_zip_entry_open)
+	ZEND_DEP_FE(zip_entry_close, arginfo_zip_entry_close)
+	ZEND_DEP_FE(zip_entry_read, arginfo_zip_entry_read)
+	ZEND_DEP_FE(zip_entry_name, arginfo_zip_entry_name)
+	ZEND_DEP_FE(zip_entry_compressedsize, arginfo_zip_entry_compressedsize)
+	ZEND_DEP_FE(zip_entry_filesize, arginfo_zip_entry_filesize)
+	ZEND_DEP_FE(zip_entry_compressionmethod, arginfo_zip_entry_compressionmethod)
 	ZEND_FE_END
 };
 
diff --git a/tests/bug53885.phpt b/tests/bug53885.phpt
index 602eae8..fecbf55 100644
--- a/tests/bug53885.phpt
+++ b/tests/bug53885.phpt
@@ -3,6 +3,7 @@ Bug #53885 (ZipArchive segfault with FL_UNCHANGED on empty archive)
 --SKIPIF--
 <?php
 if(!extension_loaded('zip')) die('skip');
+if (PHP_VERSION_ID >= 80000) die('skip only for PHP < 8');
 ?>
 --FILE--
 <?php
@@ -10,7 +11,7 @@ $fname = dirname(__FILE__)."/test53885.zip";
 if(file_exists($fname)) unlink($fname);
 touch($fname);
 $nx=new ZipArchive();
-@$nx->open($fname);
+$nx->open($fname);
 $nx->locateName("a",ZIPARCHIVE::FL_UNCHANGED);
 $nx->statName("a",ZIPARCHIVE::FL_UNCHANGED);
 ?>
diff --git a/tests/bug53885_php8.phpt b/tests/bug53885_php8.phpt
new file mode 100644
index 0000000..19fb350
--- /dev/null
+++ b/tests/bug53885_php8.phpt
@@ -0,0 +1,26 @@
+--TEST--
+Bug #53885 (ZipArchive segfault with FL_UNCHANGED on empty archive)
+--SKIPIF--
+<?php
+if(!extension_loaded('zip')) die('skip');
+if (PHP_VERSION_ID < 80000) die('skip only for PHP 8');
+?>
+--FILE--
+<?php
+$fname = __DIR__."/test53885.zip";
+if(file_exists($fname)) unlink($fname);
+touch($fname);
+$nx=new ZipArchive();
+$nx->open($fname);
+$nx->locateName("a",ZIPARCHIVE::FL_UNCHANGED);
+$nx->statName("a",ZIPARCHIVE::FL_UNCHANGED);
+?>
+==DONE==
+--CLEAN--
+<?php
+$fname = __DIR__."/test53885.zip";
+unlink($fname);
+?>
+--EXPECTF--
+Deprecated: ZipArchive::open(): Using empty file as ZipArchive is deprecated in %s
+==DONE==
diff --git a/tests/bug7214.phpt b/tests/bug7214.phpt
index f791b79..d5c7f3e 100644
--- a/tests/bug7214.phpt
+++ b/tests/bug7214.phpt
@@ -5,6 +5,8 @@ Bug #7214 (zip_entry_read() binary safe)
 /* $Id$ */
 if(!extension_loaded('zip')) die('skip');
  ?>
+--INI--
+error_reporting=24575
 --FILE--
 <?php
 $zip = zip_open(dirname(__FILE__)."/binarynull.zip");
diff --git a/tests/doubleclose2.phpt b/tests/doubleclose2.phpt
index 56cc37c..7770f64 100644
--- a/tests/doubleclose2.phpt
+++ b/tests/doubleclose2.phpt
@@ -5,6 +5,8 @@ close() called twice
 if(!extension_loaded('zip')) die('skip');
 if (PHP_VERSION_ID < 80000) die('skip PHP 8 only');
 ?>
+--INI--
+error_reporting=24575
 --FILE--
 <?php
 
diff --git a/tests/oo_setcompression.phpt b/tests/oo_setcompression.phpt
index 8a746a8..fd5fb54 100644
--- a/tests/oo_setcompression.phpt
+++ b/tests/oo_setcompression.phpt
@@ -5,6 +5,8 @@ setCompressionName and setCompressionIndex methods
 /* $Id$ */
 if (!extension_loaded('zip')) die('skip');
 ?>
+--INI--
+error_reporting=24575
 --FILE--
 <?php
 $tmpfile = dirname(__FILE__) . '/__tmp_oo_set_compression.zip';
diff --git a/tests/utils.inc b/tests/utils.inc
index 0d95677..9a3dfc3 100644
--- a/tests/utils.inc
+++ b/tests/utils.inc
@@ -27,7 +27,7 @@ function verify_entries($zip, $entries = []) {
     return $verified;
 }
 
-/* recursively remove a directoryy */
+/* recursively remove a directory */
 function rmdir_rf($dir) {
 	if ($handle = opendir($dir)) {
 		while (false !== ($item = readdir($handle))) {
diff --git a/tests/zip_close.phpt b/tests/zip_close.phpt
index 7f9d09a..9a48b77 100644
--- a/tests/zip_close.phpt
+++ b/tests/zip_close.phpt
@@ -5,6 +5,8 @@ zip_close() function
 /* $Id$ */
 if(!extension_loaded('zip')) die('skip');
 ?>
+--INI--
+error_reporting=24575
 --FILE--
 <?php
 $zip = zip_open(dirname(__FILE__)."/test_procedural.zip");
diff --git a/tests/zip_entry_close2.phpt b/tests/zip_entry_close2.phpt
index 82c574c..4fc1b8d 100644
--- a/tests/zip_entry_close2.phpt
+++ b/tests/zip_entry_close2.phpt
@@ -5,6 +5,8 @@ zip_entry_close() function: simple and double call
 if(!extension_loaded('zip')) die('skip');
 if (PHP_VERSION_ID < 80000) die('skip PHP 8 only');
 ?>
+--INI--
+error_reporting=24575
 --FILE--
 <?php
 $zip    = zip_open(__DIR__."/test_procedural.zip");
diff --git a/tests/zip_entry_compressedsize.phpt b/tests/zip_entry_compressedsize.phpt
index fefa6e5..3568d41 100644
--- a/tests/zip_entry_compressedsize.phpt
+++ b/tests/zip_entry_compressedsize.phpt
@@ -5,6 +5,8 @@ zip_entry_compressedsize() function
 /* $Id$ */
 if(!extension_loaded('zip')) die('skip');
 ?>
+--INI--
+error_reporting=24575
 --FILE--
 <?php
 $zip = zip_open(dirname(__FILE__)."/test_procedural.zip");
diff --git a/tests/zip_entry_compressionmethod.phpt b/tests/zip_entry_compressionmethod.phpt
index cabdbb7..b01bc77 100644
--- a/tests/zip_entry_compressionmethod.phpt
+++ b/tests/zip_entry_compressionmethod.phpt
@@ -5,6 +5,8 @@ zip_entry_compressionmethod() function
 /* $Id$ */
 if(!extension_loaded('zip')) die('skip');
 ?>
+--INI--
+error_reporting=24575
 --FILE--
 <?php
 $zip = zip_open(dirname(__FILE__)."/test_procedural.zip");
diff --git a/tests/zip_entry_filesize.phpt b/tests/zip_entry_filesize.phpt
index b8d8820..d0eab21 100644
--- a/tests/zip_entry_filesize.phpt
+++ b/tests/zip_entry_filesize.phpt
@@ -5,6 +5,8 @@ zip_entry_filesize() function
 /* $Id$ */
 if(!extension_loaded('zip')) die('skip');
 ?>
+--INI--
+error_reporting=24575
 --FILE--
 <?php
 $zip = zip_open(dirname(__FILE__)."/test_procedural.zip");
diff --git a/tests/zip_entry_name.phpt b/tests/zip_entry_name.phpt
index 1916e25..15923e6 100644
--- a/tests/zip_entry_name.phpt
+++ b/tests/zip_entry_name.phpt
@@ -5,6 +5,8 @@ zip_entry_name() function
 /* $Id$ */
 if(!extension_loaded('zip')) die('skip');
 ?>
+--INI--
+error_reporting=24575
 --FILE--
 <?php
 $zip = zip_open(dirname(__FILE__)."/test_procedural.zip");
diff --git a/tests/zip_entry_open.phpt b/tests/zip_entry_open.phpt
index c32fe57..a1e30df 100644
--- a/tests/zip_entry_open.phpt
+++ b/tests/zip_entry_open.phpt
@@ -5,6 +5,8 @@ zip_entry_open() function
 /* $Id$ */
 if(!extension_loaded('zip')) die('skip');
 ?>
+--INI--
+error_reporting=24575
 --FILE--
 <?php
 $zip    = zip_open(dirname(__FILE__)."/test_procedural.zip");
diff --git a/tests/zip_entry_read.phpt b/tests/zip_entry_read.phpt
index d876f03..f867c8b 100644
--- a/tests/zip_entry_read.phpt
+++ b/tests/zip_entry_read.phpt
@@ -5,6 +5,8 @@ zip_entry_read() function
 /* $Id$ */
 if(!extension_loaded('zip')) die('skip');
 ?>
+--INI--
+error_reporting=24575
 --FILE--
 <?php
 $zip    = zip_open(dirname(__FILE__)."/test_procedural.zip");
diff --git a/tests/zip_open.phpt b/tests/zip_open.phpt
index 91474bc..f0c01b8 100644
--- a/tests/zip_open.phpt
+++ b/tests/zip_open.phpt
@@ -5,6 +5,8 @@ zip_open() function
 /* $Id$ */
 if(!extension_loaded('zip')) die('skip');
 ?>
+--INI--
+error_reporting=24575
 --FILE--
 <?php
 $zip = zip_open(dirname(__FILE__)."/test_procedural.zip");
diff --git a/tests/zip_read.phpt b/tests/zip_read.phpt
index 5cadb2d..af72879 100644
--- a/tests/zip_read.phpt
+++ b/tests/zip_read.phpt
@@ -5,6 +5,8 @@ zip_read() function
 /* $Id$ */
 if(!extension_loaded('zip')) die('skip');
 ?>
+--INI--
+error_reporting=24575
 --FILE--
 <?php
 $zip = zip_open(dirname(__FILE__)."/test_procedural.zip");