summaryrefslogtreecommitdiffstats
path: root/zip-php84.patch
blob: 1561f0134ba1c5b757ab583f6c9db35bf4bcbc74 (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
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
From d8814bb56c836d0d76f8353ef82c16b2f80ff9ca Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Wed, 24 Apr 2024 15:19:39 +0200
Subject: [PATCH] compatibility with 8.4

---
 config.m4   | 4 ++--
 config.w32  | 2 ++
 package.xml | 4 ++--
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/config.m4 b/config.m4
index 97f687a..e196729 100644
--- a/config.m4
+++ b/config.m4
@@ -27,8 +27,8 @@ if test "$PHP_ZIP" != "no"; then
   elif test $PHP_VERSION -lt 80100; then
     AC_MSG_RESULT(8.0)
     subdir=php8
-  elif test $PHP_VERSION -lt 80400; then
-    AC_MSG_RESULT(8.1/8.2/8.3)
+  elif test $PHP_VERSION -lt 80500; then
+    AC_MSG_RESULT(8.1/8.2/8.3/8.4)
     subdir=php81
   else
     AC_MSG_ERROR(PHP version $PHP_VERSION is not supported yet)
From d66c502aa9bba9aed8b553098e80ff9902207927 Mon Sep 17 00:00:00 2001
From: Peter Kokot <peterkokot@gmail.com>
Date: Sat, 1 Jun 2024 14:07:06 +0200
Subject: [PATCH] Add missing pcre dependency definition to zip extension

The zip extension also requires the pcre extension.
---
 config.m4       | 1 +
 config.w32      | 1 +
 php5/php_zip.c  | 8 +++++++-
 php7/php_zip.c  | 8 +++++++-
 php73/php_zip.c | 8 +++++++-
 php74/php_zip.c | 8 +++++++-
 php8/php_zip.c  | 8 +++++++-
 php81/php_zip.c | 8 +++++++-
 8 files changed, 44 insertions(+), 6 deletions(-)

diff --git a/config.m4 b/config.m4
index e196729..0b4669b 100644
--- a/config.m4
+++ b/config.m4
@@ -142,6 +142,7 @@ if test "$PHP_ZIP" != "no"; then
 
     AC_DEFINE(HAVE_ZIP,1,[ ])
     PHP_NEW_EXTENSION(zip, $PHP_ZIP_SOURCES, $ext_shared,, $LIBZIP_CFLAGS)
+    PHP_ADD_EXTENSION_DEP(zip, pcre)
   else
     AC_MSG_ERROR([libzip is no more bundled: install libzip version >= 0.11 (1.3.0 recommended for encryption and bzip2 support)])
   fi
diff --git a/php5/php_zip.c b/php5/php_zip.c
index 0b61c0d..eccd1cc 100644
--- a/php5/php_zip.c
+++ b/php5/php_zip.c
@@ -1338,10 +1338,16 @@ static PHP_MSHUTDOWN_FUNCTION(zip);
 static PHP_MINFO_FUNCTION(zip);
 /* }}} */
 
+static const zend_module_dep zip_deps[] = {
+	ZEND_MOD_REQUIRED("pcre")
+	ZEND_MOD_END
+};
+
 /* {{{ zip_module_entry
  */
 zend_module_entry zip_module_entry = {
-	STANDARD_MODULE_HEADER,
+	STANDARD_MODULE_HEADER_EX, NULL,
+	zip_deps,
 	"zip",
 	zip_functions,
 	PHP_MINIT(zip),
diff --git a/php7/php_zip.c b/php7/php_zip.c
index 0470d52..aa8b71e 100644
--- a/php7/php_zip.c
+++ b/php7/php_zip.c
@@ -1226,10 +1226,16 @@ static PHP_MSHUTDOWN_FUNCTION(zip);
 static PHP_MINFO_FUNCTION(zip);
 /* }}} */
 
+static const zend_module_dep zip_deps[] = {
+	ZEND_MOD_REQUIRED("pcre")
+	ZEND_MOD_END
+};
+
 /* {{{ zip_module_entry
  */
 zend_module_entry zip_module_entry = {
-	STANDARD_MODULE_HEADER,
+	STANDARD_MODULE_HEADER_EX, NULL,
+	zip_deps,
 	"zip",
 	zip_functions,
 	PHP_MINIT(zip),
diff --git a/php73/php_zip.c b/php73/php_zip.c
index e56a94d..ee68b0f 100644
--- a/php73/php_zip.c
+++ b/php73/php_zip.c
@@ -1229,10 +1229,16 @@ static PHP_MSHUTDOWN_FUNCTION(zip);
 static PHP_MINFO_FUNCTION(zip);
 /* }}} */
 
+static const zend_module_dep zip_deps[] = {
+	ZEND_MOD_REQUIRED("pcre")
+	ZEND_MOD_END
+};
+
 /* {{{ zip_module_entry
  */
 zend_module_entry zip_module_entry = {
-	STANDARD_MODULE_HEADER,
+	STANDARD_MODULE_HEADER_EX, NULL,
+	zip_deps,
 	"zip",
 	zip_functions,
 	PHP_MINIT(zip),
diff --git a/php74/php_zip.c b/php74/php_zip.c
index 52ae83d..3c4c509 100644
--- a/php74/php_zip.c
+++ b/php74/php_zip.c
@@ -1241,10 +1241,16 @@ static PHP_MSHUTDOWN_FUNCTION(zip);
 static PHP_MINFO_FUNCTION(zip);
 /* }}} */
 
+static const zend_module_dep zip_deps[] = {
+	ZEND_MOD_REQUIRED("pcre")
+	ZEND_MOD_END
+};
+
 /* {{{ zip_module_entry
  */
 zend_module_entry zip_module_entry = {
-	STANDARD_MODULE_HEADER,
+	STANDARD_MODULE_HEADER_EX, NULL,
+	zip_deps,
 	"zip",
 	zip_functions,
 	PHP_MINIT(zip),
diff --git a/php8/php_zip.c b/php8/php_zip.c
index 34bddd1..93d633b 100644
--- a/php8/php_zip.c
+++ b/php8/php_zip.c
@@ -1141,10 +1141,16 @@ static PHP_MSHUTDOWN_FUNCTION(zip);
 static PHP_MINFO_FUNCTION(zip);
 /* }}} */
 
+static const zend_module_dep zip_deps[] = {
+	ZEND_MOD_REQUIRED("pcre")
+	ZEND_MOD_END
+};
+
 /* {{{ zip_module_entry */
 zend_module_entry zip_module_entry = {
-	STANDARD_MODULE_HEADER,
+	STANDARD_MODULE_HEADER_EX, NULL,
 	"zip",
+	zip_deps,
 	ext_functions,
 	PHP_MINIT(zip),
 	PHP_MSHUTDOWN(zip),
diff --git a/php81/php_zip.c b/php81/php_zip.c
index 274ddf1..97194ba 100644
--- a/php81/php_zip.c
+++ b/php81/php_zip.c
@@ -1156,9 +1156,15 @@ static PHP_MSHUTDOWN_FUNCTION(zip);
 static PHP_MINFO_FUNCTION(zip);
 /* }}} */
 
+static const zend_module_dep zip_deps[] = {
+	ZEND_MOD_REQUIRED("pcre")
+	ZEND_MOD_END
+};
+
 /* {{{ zip_module_entry */
 zend_module_entry zip_module_entry = {
-	STANDARD_MODULE_HEADER,
+	STANDARD_MODULE_HEADER_EX, NULL,
+	zip_deps,
 	"zip",
 	ext_functions,
 	PHP_MINIT(zip),
From 6734db54ab2c9176e58ae456b794657374688fba Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Wed, 21 Aug 2024 14:43:10 +0200
Subject: [PATCH] fix init

---
 php8/php_zip.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/php8/php_zip.c b/php8/php_zip.c
index 93d633b..9b388a6 100644
--- a/php8/php_zip.c
+++ b/php8/php_zip.c
@@ -1149,8 +1149,8 @@ static const zend_module_dep zip_deps[] = {
 /* {{{ zip_module_entry */
 zend_module_entry zip_module_entry = {
 	STANDARD_MODULE_HEADER_EX, NULL,
-	"zip",
 	zip_deps,
+	"zip",
 	ext_functions,
 	PHP_MINIT(zip),
 	PHP_MSHUTDOWN(zip),
-- 
2.46.0

From 9465fc87fdc5cf95527b6e0fe94d12cf23dec138 Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Thu, 19 Sep 2024 14:16:29 +0200
Subject: [PATCH] add ZipArchive::ER_TRUNCATED_ZIP added in libzip 1.11

---
 package.xml             |  1 +
 php5/php_zip.c          |  3 +++
 php7/php_zip.c          |  3 +++
 php73/php_zip.c         |  3 +++
 php74/php_zip.c         |  3 +++
 php8/php_zip.c          |  3 +++
 php81/php_zip.stub.php  |  7 +++++++
 php81/php_zip_arginfo.h | 32 ++++++++++++++++++++++----------
 8 files changed, 45 insertions(+), 10 deletions(-)

diff --git a/php5/php_zip.c b/php5/php_zip.c
index eccd1cc..10762e3 100644
--- a/php5/php_zip.c
+++ b/php5/php_zip.c
@@ -3971,6 +3971,9 @@ static PHP_MINIT_FUNCTION(zip)
 #ifdef ZIP_ER_NOT_ALLOWED
 	REGISTER_ZIP_CLASS_CONST_LONG("ER_NOT_ALLOWED",	ZIP_ER_NOT_ALLOWED);	/* Not allowed in torrentzip */
 #endif
+#ifdef ZIP_ER_TRUNCATED_ZIP
+	REGISTER_ZIP_CLASS_CONST_LONG("ER_TRUNCATED_ZIP",	ZIP_ER_TRUNCATED_ZIP);	/* Possibly truncated or corrupted zip archive */
+#endif
 #ifdef ZIP_AFL_RDONLY
 	REGISTER_ZIP_CLASS_CONST_LONG("AFL_RDONLY",	ZIP_AFL_RDONLY);			/* read only -- cannot be cleared */
 #endif
diff --git a/php7/php_zip.c b/php7/php_zip.c
index aa8b71e..009cdb5 100644
--- a/php7/php_zip.c
+++ b/php7/php_zip.c
@@ -3871,6 +3871,9 @@ static PHP_MINIT_FUNCTION(zip)
 #ifdef ZIP_ER_NOT_ALLOWED
 	REGISTER_ZIP_CLASS_CONST_LONG("ER_NOT_ALLOWED",	ZIP_ER_NOT_ALLOWED);	/* Not allowed in torrentzip */
 #endif
+#ifdef ZIP_ER_TRUNCATED_ZIP
+	REGISTER_ZIP_CLASS_CONST_LONG("ER_TRUNCATED_ZIP",	ZIP_ER_TRUNCATED_ZIP);	/* Possibly truncated or corrupted zip archive */
+#endif
 #ifdef ZIP_AFL_RDONLY
 	REGISTER_ZIP_CLASS_CONST_LONG("AFL_RDONLY",	ZIP_AFL_RDONLY);			/* read only -- cannot be cleared */
 #endif
diff --git a/php73/php_zip.c b/php73/php_zip.c
index ee68b0f..33b8e0d 100644
--- a/php73/php_zip.c
+++ b/php73/php_zip.c
@@ -3871,6 +3871,9 @@ static PHP_MINIT_FUNCTION(zip)
 #ifdef ZIP_ER_NOT_ALLOWED
 	REGISTER_ZIP_CLASS_CONST_LONG("ER_NOT_ALLOWED",	ZIP_ER_NOT_ALLOWED);	/* Not allowed in torrentzip */
 #endif
+#ifdef ZIP_ER_TRUNCATED_ZIP
+	REGISTER_ZIP_CLASS_CONST_LONG("ER_TRUNCATED_ZIP",	ZIP_ER_TRUNCATED_ZIP);	/* Possibly truncated or corrupted zip archive */
+#endif
 #ifdef ZIP_AFL_RDONLY
 	REGISTER_ZIP_CLASS_CONST_LONG("AFL_RDONLY",	ZIP_AFL_RDONLY);			/* read only -- cannot be cleared */
 #endif
diff --git a/php74/php_zip.c b/php74/php_zip.c
index 3c4c509..5c078e7 100644
--- a/php74/php_zip.c
+++ b/php74/php_zip.c
@@ -3716,6 +3716,9 @@ static PHP_MINIT_FUNCTION(zip)
 #ifdef ZIP_ER_NOT_ALLOWED
 	REGISTER_ZIP_CLASS_CONST_LONG("ER_NOT_ALLOWED",	ZIP_ER_NOT_ALLOWED);	/* Not allowed in torrentzip */
 #endif
+#ifdef ZIP_ER_TRUNCATED_ZIP
+	REGISTER_ZIP_CLASS_CONST_LONG("ER_TRUNCATED_ZIP",	ZIP_ER_TRUNCATED_ZIP);	/* Possibly truncated or corrupted zip archive */
+#endif
 #ifdef ZIP_AFL_RDONLY
 	REGISTER_ZIP_CLASS_CONST_LONG("AFL_RDONLY",	ZIP_AFL_RDONLY);			/* read only -- cannot be cleared */
 #endif
diff --git a/php8/php_zip.c b/php8/php_zip.c
index 9b388a6..60fc3c3 100644
--- a/php8/php_zip.c
+++ b/php8/php_zip.c
@@ -3275,6 +3275,9 @@ static PHP_MINIT_FUNCTION(zip)
 #ifdef ZIP_ER_NOT_ALLOWED
 	REGISTER_ZIP_CLASS_CONST_LONG("ER_NOT_ALLOWED",	ZIP_ER_NOT_ALLOWED);	/* Not allowed in torrentzip */
 #endif
+#ifdef ZIP_ER_TRUNCATED_ZIP
+	REGISTER_ZIP_CLASS_CONST_LONG("ER_TRUNCATED_ZIP",	ZIP_ER_TRUNCATED_ZIP);	/* Possibly truncated or corrupted zip archive */
+#endif
 #ifdef ZIP_AFL_RDONLY
 	REGISTER_ZIP_CLASS_CONST_LONG("AFL_RDONLY",	ZIP_AFL_RDONLY);			/* read only -- cannot be cleared */
 #endif
diff --git a/php81/php_zip.stub.php b/php81/php_zip.stub.php
index ada319c..b63b9b2 100644
--- a/php81/php_zip.stub.php
+++ b/php81/php_zip.stub.php
@@ -447,6 +447,13 @@ class ZipArchive implements Countable
      */
     public const int ER_NOT_ALLOWED = UNKNOWN;
 #endif
+#ifdef ZIP_ER_TRUNCATED_ZIP
+    /**
+     * Possibly truncated or corrupted zip archive
+     * @cvalue ZIP_ER_TRUNCATED_ZIP
+     */
+    public const int ER_TRUNCATED_ZIP = UNKNOWN;
+#endif
 #ifdef ZIP_AFL_RDONLY
     /**
      * read only -- cannot be cleared
diff --git a/php81/php_zip_arginfo.h b/php81/php_zip_arginfo.h
index 1dd63b9..ce0807e 100644
--- a/php81/php_zip_arginfo.h
+++ b/php81/php_zip_arginfo.h
@@ -1,5 +1,5 @@
 /* This is a generated file, edit the .stub.php file instead.
- * Stub hash: 6583f915b8f46a9eb83877e9d0f97e1d2d489852 */
+ * Stub hash: 34c92091053addd2aeb353e454fb390509fa4056 */
 
 ZEND_BEGIN_ARG_INFO_EX(arginfo_zip_open, 0, 0, 1)
 	ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
@@ -1281,6 +1281,18 @@ static zend_class_entry *register_class_ZipArchive(zend_class_entry *class_entry
 #endif
 	zend_string_release(const_ER_NOT_ALLOWED_name);
 #endif
+#if defined(ZIP_ER_TRUNCATED_ZIP)
+
+	zval const_ER_TRUNCATED_ZIP_value;
+	ZVAL_LONG(&const_ER_TRUNCATED_ZIP_value, ZIP_ER_TRUNCATED_ZIP);
+	zend_string *const_ER_TRUNCATED_ZIP_name = zend_string_init_interned("ER_TRUNCATED_ZIP", sizeof("ER_TRUNCATED_ZIP") - 1, 1);
+#if (PHP_VERSION_ID >= 80300)
+	zend_declare_typed_class_constant(class_entry, const_ER_TRUNCATED_ZIP_name, &const_ER_TRUNCATED_ZIP_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
+#else
+	zend_declare_class_constant_ex(class_entry, const_ER_TRUNCATED_ZIP_name, &const_ER_TRUNCATED_ZIP_value, ZEND_ACC_PUBLIC, NULL);
+#endif
+	zend_string_release(const_ER_TRUNCATED_ZIP_name);
+#endif
 #if defined(ZIP_AFL_RDONLY)
 
 	zval const_AFL_RDONLY_value;
@@ -1718,20 +1730,20 @@ static zend_class_entry *register_class_ZipArchive(zend_class_entry *class_entry
 	zend_string_release(property_comment_name);
 
 
-	zend_string *attribute_name_SensitiveParameter_ZipArchive_setPassword_arg0 = zend_string_init_interned("SensitiveParameter", sizeof("SensitiveParameter") - 1, 1);
-	zend_add_parameter_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "setpassword", sizeof("setpassword") - 1), 0, attribute_name_SensitiveParameter_ZipArchive_setPassword_arg0, 0);
-	zend_string_release(attribute_name_SensitiveParameter_ZipArchive_setPassword_arg0);
+	zend_string *attribute_name_SensitiveParameter_func_setpassword_arg0_0 = zend_string_init_interned("SensitiveParameter", sizeof("SensitiveParameter") - 1, 1);
+	zend_add_parameter_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "setpassword", sizeof("setpassword") - 1), 0, attribute_name_SensitiveParameter_func_setpassword_arg0_0, 0);
+	zend_string_release(attribute_name_SensitiveParameter_func_setpassword_arg0_0);
 #if defined(HAVE_ENCRYPTION)
 
-	zend_string *attribute_name_SensitiveParameter_ZipArchive_setEncryptionName_arg2 = zend_string_init_interned("SensitiveParameter", sizeof("SensitiveParameter") - 1, 1);
-	zend_add_parameter_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "setencryptionname", sizeof("setencryptionname") - 1), 2, attribute_name_SensitiveParameter_ZipArchive_setEncryptionName_arg2, 0);
-	zend_string_release(attribute_name_SensitiveParameter_ZipArchive_setEncryptionName_arg2);
+	zend_string *attribute_name_SensitiveParameter_func_setencryptionname_arg2_0 = zend_string_init_interned("SensitiveParameter", sizeof("SensitiveParameter") - 1, 1);
+	zend_add_parameter_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "setencryptionname", sizeof("setencryptionname") - 1), 2, attribute_name_SensitiveParameter_func_setencryptionname_arg2_0, 0);
+	zend_string_release(attribute_name_SensitiveParameter_func_setencryptionname_arg2_0);
 #endif
 #if defined(HAVE_ENCRYPTION)
 
-	zend_string *attribute_name_SensitiveParameter_ZipArchive_setEncryptionIndex_arg2 = zend_string_init_interned("SensitiveParameter", sizeof("SensitiveParameter") - 1, 1);
-	zend_add_parameter_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "setencryptionindex", sizeof("setencryptionindex") - 1), 2, attribute_name_SensitiveParameter_ZipArchive_setEncryptionIndex_arg2, 0);
-	zend_string_release(attribute_name_SensitiveParameter_ZipArchive_setEncryptionIndex_arg2);
+	zend_string *attribute_name_SensitiveParameter_func_setencryptionindex_arg2_0 = zend_string_init_interned("SensitiveParameter", sizeof("SensitiveParameter") - 1, 1);
+	zend_add_parameter_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "setencryptionindex", sizeof("setencryptionindex") - 1), 2, attribute_name_SensitiveParameter_func_setencryptionindex_arg2_0, 0);
+	zend_string_release(attribute_name_SensitiveParameter_func_setencryptionindex_arg2_0);
 #endif
 
 	return class_entry;
From e482dbfda515fded9deeff9d48823266b10f7f4e Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Fri, 20 Sep 2024 15:36:19 +0200
Subject: [PATCH] sync with master (8.4)

---
 php81/php_zip.c            |  51 ++++----
 php81/php_zip.stub.php     |  22 ++--
 php81/php_zip_arginfo.h    | 257 +++++++++++++++++++++++++++++--------
 php81/zip_stream.c         |   2 -
 tests/oo_getcomment2.phpt  |   4 +-
 tests/oo_open2.phpt        |   4 +-
 tests/zip_open_error2.phpt |   6 +-
 7 files changed, 250 insertions(+), 96 deletions(-)

diff --git a/php81/php_zip.c b/php81/php_zip.c
index 97194ba..9fee614 100644
--- a/php81/php_zip.c
+++ b/php81/php_zip.c
@@ -16,14 +16,14 @@
 
 
 #ifdef HAVE_CONFIG_H
-#include "config.h"
+#include <config.h>
 #endif
 
 #include "php.h"
 #include "php_ini.h"
 #include "ext/standard/info.h"
 #include "ext/standard/file.h"
-#include "ext/standard/php_string.h"
+#include "ext/standard/php_string.h" /* For php_basename() */
 #include "ext/pcre/php_pcre.h"
 #include "ext/standard/php_filestat.h"
 #include "zend_attributes.h"
@@ -43,6 +43,10 @@
 #define zend_zval_value_name(opt) zend_zval_type_name(opt)
 #endif
 
+#if PHP_VERSION_ID < 80400
+#define zend_argument_must_not_be_empty_error(n) zend_argument_value_error(n, "must not be empty");
+#endif
+
 /* {{{ Resource le */
 static int le_zip_dir;
 #define le_zip_dir_name "Zip Directory"
@@ -61,7 +65,7 @@ static int le_zip_entry;
 	This is always used for the first argument*/
 #define PHP_ZIP_STAT_PATH(za, path, path_len, flags, sb) \
 	if (path_len == 0) { \
-		zend_argument_value_error(1, "cannot be empty"); \
+		zend_argument_must_not_be_empty_error(1); \
 		RETURN_THROWS(); \
 	} \
 	if (zip_stat(za, path, flags, &sb) != 0) { \
@@ -176,7 +180,7 @@ static int php_zip_extract_file(struct zip * za, char *dest, const char *file, s
 		is_dir_only = 1;
 	} else {
 		memcpy(file_dirname, path_cleaned, path_cleaned_len);
-		dir_len = php_dirname(file_dirname, path_cleaned_len);
+		dir_len = zend_dirname(file_dirname, path_cleaned_len);
 
 		if (!dir_len || (dir_len == 1 && file_dirname[0] == '.')) {
 			len = spprintf(&file_dirname_fullpath, 0, "%s", dest);
@@ -422,7 +426,7 @@ static int php_zip_parse_options(HashTable *options, zip_options *opts)
 		}
 
 		if (Z_STRLEN_P(option) == 0) {
-			zend_value_error("Option \"remove_path\" cannot be empty");
+			zend_value_error("Option \"remove_path\" must not be empty");
 			return -1;
 		}
 
@@ -442,7 +446,7 @@ static int php_zip_parse_options(HashTable *options, zip_options *opts)
 		}
 
 		if (Z_STRLEN_P(option) == 0) {
-			zend_value_error("Option \"add_path\" cannot be empty");
+			zend_value_error("Option \"add_path\" must not be empty");
 			return -1;
 		}
 
@@ -953,11 +957,12 @@ static zval *php_zip_read_property(zend_object *object, zend_string *name, int t
 }
 /* }}} */
 
+// todo: make php_zip_has_property return bool as well
 static int php_zip_has_property(zend_object *object, zend_string *name, int type, void **cache_slot) /* {{{ */
 {
 	ze_zip_object *obj;
 	zip_prop_handler *hnd = NULL;
-	int retval = 0;
+	bool retval = false;
 
 	obj = php_zip_fetch_object(object);
 
@@ -969,7 +974,7 @@ static int php_zip_has_property(zend_object *object, zend_string *name, int type
 		zval tmp, *prop;
 
 		if (type == 2) {
-			retval = 1;
+			retval = true;
 		} else if ((prop = php_zip_property_reader(obj, hnd, &tmp)) != NULL) {
 			if (type == 1) {
 				retval = zend_is_true(&tmp);
@@ -1195,7 +1200,7 @@ PHP_FUNCTION(zip_open)
 	}
 
 	if (ZSTR_LEN(filename) == 0) {
-		zend_argument_value_error(1, "cannot be empty");
+		zend_argument_must_not_be_empty_error(1);
 		RETURN_THROWS();
 	}
 
@@ -1477,7 +1482,7 @@ PHP_METHOD(ZipArchive, open)
 	ze_obj = Z_ZIP_P(self);
 
 	if (ZSTR_LEN(filename) == 0) {
-		zend_argument_value_error(1, "cannot be empty");
+		zend_argument_must_not_be_empty_error(1);
 		RETURN_THROWS();
 	}
 
@@ -1764,7 +1769,7 @@ static void php_zip_add_from_pattern(INTERNAL_FUNCTION_PARAMETERS, int type) /*
 	}
 
 	if (ZSTR_LEN(pattern) == 0) {
-		zend_argument_value_error(1, "cannot be empty");
+		zend_argument_must_not_be_empty_error(1);
 		RETURN_THROWS();
 	}
 	if (options && zend_hash_num_elements(options) > 0 && (php_zip_parse_options(options, &opts) < 0)) {
@@ -1882,7 +1887,7 @@ PHP_METHOD(ZipArchive, addFile)
 	}
 
 	if (ZSTR_LEN(filename) == 0) {
-		zend_argument_value_error(1, "cannot be empty");
+		zend_argument_must_not_be_empty_error(1);
 		RETURN_THROWS();
 	}
 
@@ -1915,7 +1920,7 @@ PHP_METHOD(ZipArchive, replaceFile)
 	}
 
 	if (ZSTR_LEN(filename) == 0) {
-		zend_argument_value_error(1, "cannot be empty");
+		zend_argument_must_not_be_empty_error(1);
 		RETURN_THROWS();
 	}
 
@@ -2179,7 +2184,7 @@ PHP_METHOD(ZipArchive, setCommentName)
 	}
 
 	if (name_len == 0) {
-		zend_argument_value_error(1, "cannot be empty");
+		zend_argument_must_not_be_empty_error(1);
 		RETURN_THROWS();
 	}
 
@@ -2246,7 +2251,7 @@ PHP_METHOD(ZipArchive, setExternalAttributesName)
 	ZIP_FROM_OBJECT(intern, self);
 
 	if (name_len == 0) {
-		zend_argument_value_error(1, "cannot be empty");
+		zend_argument_must_not_be_empty_error(1);
 		RETURN_THROWS();
 	}
 
@@ -2307,7 +2312,7 @@ PHP_METHOD(ZipArchive, getExternalAttributesName)
 	ZIP_FROM_OBJECT(intern, self);
 
 	if (name_len == 0) {
-		zend_argument_value_error(1, "cannot be empty");
+		zend_argument_must_not_be_empty_error(1);
 		RETURN_THROWS();
 	}
 
@@ -2374,7 +2379,7 @@ PHP_METHOD(ZipArchive, setEncryptionName)
 	ZIP_FROM_OBJECT(intern, self);
 
 	if (name_len == 0) {
-		zend_argument_value_error(1, "cannot be empty");
+		zend_argument_must_not_be_empty_error(1);
 		RETURN_THROWS();
 	}
 
@@ -2435,7 +2440,7 @@ PHP_METHOD(ZipArchive, getCommentName)
 	ZIP_FROM_OBJECT(intern, self);
 
 	if (name_len == 0) {
-		zend_argument_value_error(1, "cannot be empty");
+		zend_argument_must_not_be_empty_error(1);
 		RETURN_THROWS();
 	}
 
@@ -2491,7 +2496,7 @@ PHP_METHOD(ZipArchive, setCompressionName)
 	ZIP_FROM_OBJECT(intern, this);
 
 	if (name_len == 0) {
-		zend_argument_value_error(1, "cannot be empty");
+		zend_argument_must_not_be_empty_error(1);
 		RETURN_THROWS();
 	}
 
@@ -2551,7 +2556,7 @@ PHP_METHOD(ZipArchive, setMtimeName)
 	ZIP_FROM_OBJECT(intern, this);
 
 	if (name_len == 0) {
-		zend_argument_value_error(1, "cannot be empty");
+		zend_argument_must_not_be_empty_error(1);
 		RETURN_THROWS();
 	}
 
@@ -2665,7 +2670,7 @@ PHP_METHOD(ZipArchive, renameIndex)
 	ZIP_FROM_OBJECT(intern, self);
 
 	if (new_name_len == 0) {
-		zend_argument_value_error(2, "cannot be empty");
+		zend_argument_must_not_be_empty_error(2);
 		RETURN_THROWS();
 	}
 
@@ -2693,7 +2698,7 @@ PHP_METHOD(ZipArchive, renameName)
 	ZIP_FROM_OBJECT(intern, self);
 
 	if (new_name_len == 0) {
-		zend_argument_value_error(2, "cannot be empty");
+		zend_argument_must_not_be_empty_error(2);
 		RETURN_THROWS();
 	}
 
@@ -3181,6 +3186,8 @@ static PHP_MINIT_FUNCTION(zip)
 
 	php_register_url_stream_wrapper("zip", &php_stream_zip_wrapper);
 
+	register_php_zip_symbols(module_number);
+
 	le_zip_dir   = zend_register_list_destructors_ex(php_zip_free_dir,   NULL, le_zip_dir_name,   module_number);
 	le_zip_entry = zend_register_list_destructors_ex(php_zip_free_entry, NULL, le_zip_entry_name, module_number);
 
diff --git a/php81/php_zip.stub.php b/php81/php_zip.stub.php
index b63b9b2..9e66911 100644
--- a/php81/php_zip.stub.php
+++ b/php81/php_zip.stub.php
@@ -7,64 +7,64 @@
 
 /**
  * @return resource|int|false
- * @deprecated
  */
+#[\Deprecated(since: '8.0', message: 'use ZipArchive::open() instead')]
 function zip_open(string $filename) {}
 
 /**
  * @param resource $zip
- * @deprecated
  */
+#[\Deprecated(since: '8.0', message: 'use ZipArchive::close() instead')]
 function zip_close($zip): void {}
 
 /**
  * @param resource $zip
  * @return resource|false
- * @deprecated
  */
+#[\Deprecated(since: '8.0', message: 'use ZipArchive::statIndex() instead')]
 function zip_read($zip) {}
 
 /**
  * @param resource $zip_dp
  * @param resource $zip_entry
- * @deprecated
  */
+#[\Deprecated(since: '8.0')]
 function zip_entry_open($zip_dp, $zip_entry, string $mode = "rb"): bool {}
 
 /**
  * @param resource $zip_entry
- * @deprecated
  */
+#[\Deprecated(since: '8.0')]
 function zip_entry_close($zip_entry): bool {}
 
 /**
  * @param resource $zip_entry
- * @deprecated
  */
+#[\Deprecated(since: '8.0', message: 'use ZipArchive::getFromIndex() instead')]
 function zip_entry_read($zip_entry, int $len = 1024): string|false {}
 
 /**
  * @param resource $zip_entry
- * @deprecated
  */
+#[\Deprecated(since: '8.0', message: 'use ZipArchive::statIndex() instead')]
 function zip_entry_name($zip_entry): string|false {}
 
 /**
  * @param resource $zip_entry
- * @deprecated
  */
+#[\Deprecated(since: '8.0', message: 'use ZipArchive::statIndex() instead')]
 function zip_entry_compressedsize($zip_entry): int|false {}
 
 /**
  * @param resource $zip_entry
- * @deprecated
  */
+#[\Deprecated(since: '8.0', message: 'use ZipArchive::statIndex() instead')]
 function zip_entry_filesize($zip_entry): int|false {}
 
 /**
  * @param resource $zip_entry
- * @deprecated
  */
+#[\Deprecated(since: '8.0', message: 'use ZipArchive::statIndex() instead')]
 function zip_entry_compressionmethod($zip_entry): string|false {}
 
 class ZipArchive implements Countable
@@ -112,8 +112,8 @@ class ZipArchive implements Countable
 #ifdef ZIP_FL_RECOMPRESS
     /**
      * @cvalue ZIP_FL_RECOMPRESS
-     * @deprecated
      */
+    #[\Deprecated(since: '8.3')]
     public const int FL_RECOMPRESS = UNKNOWN;
 #endif
     /**
diff --git a/php81/php_zip_arginfo.h b/php81/php_zip_arginfo.h
index ce0807e..a8a416d 100644
--- a/php81/php_zip_arginfo.h
+++ b/php81/php_zip_arginfo.h
@@ -1,5 +1,5 @@
 /* This is a generated file, edit the .stub.php file instead.
- * Stub hash: 34c92091053addd2aeb353e454fb390509fa4056 */
+ * Stub hash: 19fff6630ebc1a64a03d07f76f16cc775fa7fe6d */
 
 ZEND_BEGIN_ARG_INFO_EX(arginfo_zip_open, 0, 0, 1)
 	ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
@@ -144,9 +144,7 @@ ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_ZipArchive_setMt
 	ZEND_ARG_TYPE_INFO(0, timestamp, IS_LONG, 0)
 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
 ZEND_END_ARG_INFO()
-#endif
 
-#if defined(HAVE_SET_MTIME)
 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_ZipArchive_setMtimeName, 0, 2, _IS_BOOL, 0)
 	ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
 	ZEND_ARG_TYPE_INFO(0, timestamp, IS_LONG, 0)
@@ -235,27 +233,21 @@ ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_ZipArchive_setEx
 	ZEND_ARG_TYPE_INFO(0, attr, IS_LONG, 0)
 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
 ZEND_END_ARG_INFO()
-#endif
 
-#if defined(ZIP_OPSYS_DEFAULT)
 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_ZipArchive_setExternalAttributesIndex, 0, 3, _IS_BOOL, 0)
 	ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0)
 	ZEND_ARG_TYPE_INFO(0, opsys, IS_LONG, 0)
 	ZEND_ARG_TYPE_INFO(0, attr, IS_LONG, 0)
 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
 ZEND_END_ARG_INFO()
-#endif
 
-#if defined(ZIP_OPSYS_DEFAULT)
 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_ZipArchive_getExternalAttributesName, 0, 3, _IS_BOOL, 0)
 	ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
 	ZEND_ARG_INFO(1, opsys)
 	ZEND_ARG_INFO(1, attr)
 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
 ZEND_END_ARG_INFO()
-#endif
 
-#if defined(ZIP_OPSYS_DEFAULT)
 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_ZipArchive_getExternalAttributesIndex, 0, 3, _IS_BOOL, 0)
 	ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0)
 	ZEND_ARG_INFO(1, opsys)
@@ -282,9 +274,7 @@ ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_ZipArchive_setEn
 	ZEND_ARG_TYPE_INFO(0, method, IS_LONG, 0)
 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, password, IS_STRING, 1, "null")
 ZEND_END_ARG_INFO()
-#endif
 
-#if defined(HAVE_ENCRYPTION)
 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_ZipArchive_setEncryptionIndex, 0, 2, _IS_BOOL, 0)
 	ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0)
 	ZEND_ARG_TYPE_INFO(0, method, IS_LONG, 0)
@@ -310,13 +300,10 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ZipArchive_isCompressionMe
 	ZEND_ARG_TYPE_INFO(0, method, IS_LONG, 0)
 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, enc, _IS_BOOL, 0, "true")
 ZEND_END_ARG_INFO()
-#endif
 
-#if defined(HAVE_METHOD_SUPPORTED)
 #define arginfo_class_ZipArchive_isEncryptionMethodSupported arginfo_class_ZipArchive_isCompressionMethodSupported
 #endif
 
-
 ZEND_FUNCTION(zip_open);
 ZEND_FUNCTION(zip_close);
 ZEND_FUNCTION(zip_read);
@@ -349,8 +336,6 @@ ZEND_METHOD(ZipArchive, setCommentIndex);
 ZEND_METHOD(ZipArchive, setCommentName);
 #if defined(HAVE_SET_MTIME)
 ZEND_METHOD(ZipArchive, setMtimeIndex);
-#endif
-#if defined(HAVE_SET_MTIME)
 ZEND_METHOD(ZipArchive, setMtimeName);
 #endif
 ZEND_METHOD(ZipArchive, getCommentIndex);
@@ -373,22 +358,14 @@ ZEND_METHOD(ZipArchive, getStreamName);
 ZEND_METHOD(ZipArchive, getStream);
 #if defined(ZIP_OPSYS_DEFAULT)
 ZEND_METHOD(ZipArchive, setExternalAttributesName);
-#endif
-#if defined(ZIP_OPSYS_DEFAULT)
 ZEND_METHOD(ZipArchive, setExternalAttributesIndex);
-#endif
-#if defined(ZIP_OPSYS_DEFAULT)
 ZEND_METHOD(ZipArchive, getExternalAttributesName);
-#endif
-#if defined(ZIP_OPSYS_DEFAULT)
 ZEND_METHOD(ZipArchive, getExternalAttributesIndex);
 #endif
 ZEND_METHOD(ZipArchive, setCompressionName);
 ZEND_METHOD(ZipArchive, setCompressionIndex);
 #if defined(HAVE_ENCRYPTION)
 ZEND_METHOD(ZipArchive, setEncryptionName);
-#endif
-#if defined(HAVE_ENCRYPTION)
 ZEND_METHOD(ZipArchive, setEncryptionIndex);
 #endif
 #if defined(HAVE_PROGRESS_CALLBACK)
@@ -399,27 +376,63 @@ ZEND_METHOD(ZipArchive, registerCancelCallback);
 #endif
 #if defined(HAVE_METHOD_SUPPORTED)
 ZEND_METHOD(ZipArchive, isCompressionMethodSupported);
-#endif
-#if defined(HAVE_METHOD_SUPPORTED)
 ZEND_METHOD(ZipArchive, isEncryptionMethodSupported);
 #endif
 
-
 static const zend_function_entry ext_functions[] = {
-	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)
+#if (PHP_VERSION_ID >= 80400)
+	ZEND_RAW_FENTRY("zip_open", zif_zip_open, arginfo_zip_open, ZEND_ACC_DEPRECATED, NULL, NULL)
+#else
+	ZEND_RAW_FENTRY("zip_open", zif_zip_open, arginfo_zip_open, ZEND_ACC_DEPRECATED)
+#endif
+#if (PHP_VERSION_ID >= 80400)
+	ZEND_RAW_FENTRY("zip_close", zif_zip_close, arginfo_zip_close, ZEND_ACC_DEPRECATED, NULL, NULL)
+#else
+	ZEND_RAW_FENTRY("zip_close", zif_zip_close, arginfo_zip_close, ZEND_ACC_DEPRECATED)
+#endif
+#if (PHP_VERSION_ID >= 80400)
+	ZEND_RAW_FENTRY("zip_read", zif_zip_read, arginfo_zip_read, ZEND_ACC_DEPRECATED, NULL, NULL)
+#else
+	ZEND_RAW_FENTRY("zip_read", zif_zip_read, arginfo_zip_read, ZEND_ACC_DEPRECATED)
+#endif
+#if (PHP_VERSION_ID >= 80400)
+	ZEND_RAW_FENTRY("zip_entry_open", zif_zip_entry_open, arginfo_zip_entry_open, ZEND_ACC_DEPRECATED, NULL, NULL)
+#else
+	ZEND_RAW_FENTRY("zip_entry_open", zif_zip_entry_open, arginfo_zip_entry_open, ZEND_ACC_DEPRECATED)
+#endif
+#if (PHP_VERSION_ID >= 80400)
+	ZEND_RAW_FENTRY("zip_entry_close", zif_zip_entry_close, arginfo_zip_entry_close, ZEND_ACC_DEPRECATED, NULL, NULL)
+#else
+	ZEND_RAW_FENTRY("zip_entry_close", zif_zip_entry_close, arginfo_zip_entry_close, ZEND_ACC_DEPRECATED)
+#endif
+#if (PHP_VERSION_ID >= 80400)
+	ZEND_RAW_FENTRY("zip_entry_read", zif_zip_entry_read, arginfo_zip_entry_read, ZEND_ACC_DEPRECATED, NULL, NULL)
+#else
+	ZEND_RAW_FENTRY("zip_entry_read", zif_zip_entry_read, arginfo_zip_entry_read, ZEND_ACC_DEPRECATED)
+#endif
+#if (PHP_VERSION_ID >= 80400)
+	ZEND_RAW_FENTRY("zip_entry_name", zif_zip_entry_name, arginfo_zip_entry_name, ZEND_ACC_DEPRECATED, NULL, NULL)
+#else
+	ZEND_RAW_FENTRY("zip_entry_name", zif_zip_entry_name, arginfo_zip_entry_name, ZEND_ACC_DEPRECATED)
+#endif
+#if (PHP_VERSION_ID >= 80400)
+	ZEND_RAW_FENTRY("zip_entry_compressedsize", zif_zip_entry_compressedsize, arginfo_zip_entry_compressedsize, ZEND_ACC_DEPRECATED, NULL, NULL)
+#else
+	ZEND_RAW_FENTRY("zip_entry_compressedsize", zif_zip_entry_compressedsize, arginfo_zip_entry_compressedsize, ZEND_ACC_DEPRECATED)
+#endif
+#if (PHP_VERSION_ID >= 80400)
+	ZEND_RAW_FENTRY("zip_entry_filesize", zif_zip_entry_filesize, arginfo_zip_entry_filesize, ZEND_ACC_DEPRECATED, NULL, NULL)
+#else
+	ZEND_RAW_FENTRY("zip_entry_filesize", zif_zip_entry_filesize, arginfo_zip_entry_filesize, ZEND_ACC_DEPRECATED)
+#endif
+#if (PHP_VERSION_ID >= 80400)
+	ZEND_RAW_FENTRY("zip_entry_compressionmethod", zif_zip_entry_compressionmethod, arginfo_zip_entry_compressionmethod, ZEND_ACC_DEPRECATED, NULL, NULL)
+#else
+	ZEND_RAW_FENTRY("zip_entry_compressionmethod", zif_zip_entry_compressionmethod, arginfo_zip_entry_compressionmethod, ZEND_ACC_DEPRECATED)
+#endif
 	ZEND_FE_END
 };
 
-
 static const zend_function_entry class_ZipArchive_methods[] = {
 	ZEND_ME(ZipArchive, open, arginfo_class_ZipArchive_open, ZEND_ACC_PUBLIC)
 	ZEND_ME(ZipArchive, setPassword, arginfo_class_ZipArchive_setPassword, ZEND_ACC_PUBLIC)
@@ -443,8 +456,6 @@ static const zend_function_entry class_ZipArchive_methods[] = {
 	ZEND_ME(ZipArchive, setCommentName, arginfo_class_ZipArchive_setCommentName, ZEND_ACC_PUBLIC)
 #if defined(HAVE_SET_MTIME)
 	ZEND_ME(ZipArchive, setMtimeIndex, arginfo_class_ZipArchive_setMtimeIndex, ZEND_ACC_PUBLIC)
-#endif
-#if defined(HAVE_SET_MTIME)
 	ZEND_ME(ZipArchive, setMtimeName, arginfo_class_ZipArchive_setMtimeName, ZEND_ACC_PUBLIC)
 #endif
 	ZEND_ME(ZipArchive, getCommentIndex, arginfo_class_ZipArchive_getCommentIndex, ZEND_ACC_PUBLIC)
@@ -467,22 +478,14 @@ static const zend_function_entry class_ZipArchive_methods[] = {
 	ZEND_ME(ZipArchive, getStream, arginfo_class_ZipArchive_getStream, ZEND_ACC_PUBLIC)
 #if defined(ZIP_OPSYS_DEFAULT)
 	ZEND_ME(ZipArchive, setExternalAttributesName, arginfo_class_ZipArchive_setExternalAttributesName, ZEND_ACC_PUBLIC)
-#endif
-#if defined(ZIP_OPSYS_DEFAULT)
 	ZEND_ME(ZipArchive, setExternalAttributesIndex, arginfo_class_ZipArchive_setExternalAttributesIndex, ZEND_ACC_PUBLIC)
-#endif
-#if defined(ZIP_OPSYS_DEFAULT)
 	ZEND_ME(ZipArchive, getExternalAttributesName, arginfo_class_ZipArchive_getExternalAttributesName, ZEND_ACC_PUBLIC)
-#endif
-#if defined(ZIP_OPSYS_DEFAULT)
 	ZEND_ME(ZipArchive, getExternalAttributesIndex, arginfo_class_ZipArchive_getExternalAttributesIndex, ZEND_ACC_PUBLIC)
 #endif
 	ZEND_ME(ZipArchive, setCompressionName, arginfo_class_ZipArchive_setCompressionName, ZEND_ACC_PUBLIC)
 	ZEND_ME(ZipArchive, setCompressionIndex, arginfo_class_ZipArchive_setCompressionIndex, ZEND_ACC_PUBLIC)
 #if defined(HAVE_ENCRYPTION)
 	ZEND_ME(ZipArchive, setEncryptionName, arginfo_class_ZipArchive_setEncryptionName, ZEND_ACC_PUBLIC)
-#endif
-#if defined(HAVE_ENCRYPTION)
 	ZEND_ME(ZipArchive, setEncryptionIndex, arginfo_class_ZipArchive_setEncryptionIndex, ZEND_ACC_PUBLIC)
 #endif
 #if defined(HAVE_PROGRESS_CALLBACK)
@@ -493,19 +496,155 @@ static const zend_function_entry class_ZipArchive_methods[] = {
 #endif
 #if defined(HAVE_METHOD_SUPPORTED)
 	ZEND_ME(ZipArchive, isCompressionMethodSupported, arginfo_class_ZipArchive_isCompressionMethodSupported, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
-#endif
-#if defined(HAVE_METHOD_SUPPORTED)
 	ZEND_ME(ZipArchive, isEncryptionMethodSupported, arginfo_class_ZipArchive_isEncryptionMethodSupported, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
 #endif
 	ZEND_FE_END
 };
 
+static void register_php_zip_symbols(int module_number)
+{
+
+	zend_string *attribute_name_Deprecated_func_zip_open_0 = zend_string_init_interned("Deprecated", sizeof("Deprecated") - 1, 1);
+	zend_attribute *attribute_Deprecated_func_zip_open_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "zip_open", sizeof("zip_open") - 1), attribute_name_Deprecated_func_zip_open_0, 2);
+	zend_string_release(attribute_name_Deprecated_func_zip_open_0);
+	zval attribute_Deprecated_func_zip_open_0_arg0;
+	zend_string *attribute_Deprecated_func_zip_open_0_arg0_str = zend_string_init("8.0", strlen("8.0"), 1);
+	ZVAL_STR(&attribute_Deprecated_func_zip_open_0_arg0, attribute_Deprecated_func_zip_open_0_arg0_str);
+	ZVAL_COPY_VALUE(&attribute_Deprecated_func_zip_open_0->args[0].value, &attribute_Deprecated_func_zip_open_0_arg0);
+	attribute_Deprecated_func_zip_open_0->args[0].name = zend_string_init_interned("since", sizeof("since") - 1, 1);
+	zval attribute_Deprecated_func_zip_open_0_arg1;
+	zend_string *attribute_Deprecated_func_zip_open_0_arg1_str = zend_string_init("use ZipArchive::open() instead", strlen("use ZipArchive::open() instead"), 1);
+	ZVAL_STR(&attribute_Deprecated_func_zip_open_0_arg1, attribute_Deprecated_func_zip_open_0_arg1_str);
+	ZVAL_COPY_VALUE(&attribute_Deprecated_func_zip_open_0->args[1].value, &attribute_Deprecated_func_zip_open_0_arg1);
+	attribute_Deprecated_func_zip_open_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE);
+
+	zend_string *attribute_name_Deprecated_func_zip_close_0 = zend_string_init_interned("Deprecated", sizeof("Deprecated") - 1, 1);
+	zend_attribute *attribute_Deprecated_func_zip_close_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "zip_close", sizeof("zip_close") - 1), attribute_name_Deprecated_func_zip_close_0, 2);
+	zend_string_release(attribute_name_Deprecated_func_zip_close_0);
+	zval attribute_Deprecated_func_zip_close_0_arg0;
+	zend_string *attribute_Deprecated_func_zip_close_0_arg0_str = zend_string_init("8.0", strlen("8.0"), 1);
+	ZVAL_STR(&attribute_Deprecated_func_zip_close_0_arg0, attribute_Deprecated_func_zip_close_0_arg0_str);
+	ZVAL_COPY_VALUE(&attribute_Deprecated_func_zip_close_0->args[0].value, &attribute_Deprecated_func_zip_close_0_arg0);
+	attribute_Deprecated_func_zip_close_0->args[0].name = zend_string_init_interned("since", sizeof("since") - 1, 1);
+	zval attribute_Deprecated_func_zip_close_0_arg1;
+	zend_string *attribute_Deprecated_func_zip_close_0_arg1_str = zend_string_init("use ZipArchive::close() instead", strlen("use ZipArchive::close() instead"), 1);
+	ZVAL_STR(&attribute_Deprecated_func_zip_close_0_arg1, attribute_Deprecated_func_zip_close_0_arg1_str);
+	ZVAL_COPY_VALUE(&attribute_Deprecated_func_zip_close_0->args[1].value, &attribute_Deprecated_func_zip_close_0_arg1);
+	attribute_Deprecated_func_zip_close_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE);
+
+	zend_string *attribute_name_Deprecated_func_zip_read_0 = zend_string_init_interned("Deprecated", sizeof("Deprecated") - 1, 1);
+	zend_attribute *attribute_Deprecated_func_zip_read_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "zip_read", sizeof("zip_read") - 1), attribute_name_Deprecated_func_zip_read_0, 2);
+	zend_string_release(attribute_name_Deprecated_func_zip_read_0);
+	zval attribute_Deprecated_func_zip_read_0_arg0;
+	zend_string *attribute_Deprecated_func_zip_read_0_arg0_str = zend_string_init("8.0", strlen("8.0"), 1);
+	ZVAL_STR(&attribute_Deprecated_func_zip_read_0_arg0, attribute_Deprecated_func_zip_read_0_arg0_str);
+	ZVAL_COPY_VALUE(&attribute_Deprecated_func_zip_read_0->args[0].value, &attribute_Deprecated_func_zip_read_0_arg0);
+	attribute_Deprecated_func_zip_read_0->args[0].name = zend_string_init_interned("since", sizeof("since") - 1, 1);
+	zval attribute_Deprecated_func_zip_read_0_arg1;
+	zend_string *attribute_Deprecated_func_zip_read_0_arg1_str = zend_string_init("use ZipArchive::statIndex() instead", strlen("use ZipArchive::statIndex() instead"), 1);
+	ZVAL_STR(&attribute_Deprecated_func_zip_read_0_arg1, attribute_Deprecated_func_zip_read_0_arg1_str);
+	ZVAL_COPY_VALUE(&attribute_Deprecated_func_zip_read_0->args[1].value, &attribute_Deprecated_func_zip_read_0_arg1);
+	attribute_Deprecated_func_zip_read_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE);
+
+	zend_string *attribute_name_Deprecated_func_zip_entry_open_0 = zend_string_init_interned("Deprecated", sizeof("Deprecated") - 1, 1);
+	zend_attribute *attribute_Deprecated_func_zip_entry_open_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "zip_entry_open", sizeof("zip_entry_open") - 1), attribute_name_Deprecated_func_zip_entry_open_0, 1);
+	zend_string_release(attribute_name_Deprecated_func_zip_entry_open_0);
+	zval attribute_Deprecated_func_zip_entry_open_0_arg0;
+	zend_string *attribute_Deprecated_func_zip_entry_open_0_arg0_str = zend_string_init("8.0", strlen("8.0"), 1);
+	ZVAL_STR(&attribute_Deprecated_func_zip_entry_open_0_arg0, attribute_Deprecated_func_zip_entry_open_0_arg0_str);
+	ZVAL_COPY_VALUE(&attribute_Deprecated_func_zip_entry_open_0->args[0].value, &attribute_Deprecated_func_zip_entry_open_0_arg0);
+	attribute_Deprecated_func_zip_entry_open_0->args[0].name = zend_string_init_interned("since", sizeof("since") - 1, 1);
+
+	zend_string *attribute_name_Deprecated_func_zip_entry_close_0 = zend_string_init_interned("Deprecated", sizeof("Deprecated") - 1, 1);
+	zend_attribute *attribute_Deprecated_func_zip_entry_close_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "zip_entry_close", sizeof("zip_entry_close") - 1), attribute_name_Deprecated_func_zip_entry_close_0, 1);
+	zend_string_release(attribute_name_Deprecated_func_zip_entry_close_0);
+	zval attribute_Deprecated_func_zip_entry_close_0_arg0;
+	zend_string *attribute_Deprecated_func_zip_entry_close_0_arg0_str = zend_string_init("8.0", strlen("8.0"), 1);
+	ZVAL_STR(&attribute_Deprecated_func_zip_entry_close_0_arg0, attribute_Deprecated_func_zip_entry_close_0_arg0_str);
+	ZVAL_COPY_VALUE(&attribute_Deprecated_func_zip_entry_close_0->args[0].value, &attribute_Deprecated_func_zip_entry_close_0_arg0);
+	attribute_Deprecated_func_zip_entry_close_0->args[0].name = zend_string_init_interned("since", sizeof("since") - 1, 1);
+
+	zend_string *attribute_name_Deprecated_func_zip_entry_read_0 = zend_string_init_interned("Deprecated", sizeof("Deprecated") - 1, 1);
+	zend_attribute *attribute_Deprecated_func_zip_entry_read_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "zip_entry_read", sizeof("zip_entry_read") - 1), attribute_name_Deprecated_func_zip_entry_read_0, 2);
+	zend_string_release(attribute_name_Deprecated_func_zip_entry_read_0);
+	zval attribute_Deprecated_func_zip_entry_read_0_arg0;
+	zend_string *attribute_Deprecated_func_zip_entry_read_0_arg0_str = zend_string_init("8.0", strlen("8.0"), 1);
+	ZVAL_STR(&attribute_Deprecated_func_zip_entry_read_0_arg0, attribute_Deprecated_func_zip_entry_read_0_arg0_str);
+	ZVAL_COPY_VALUE(&attribute_Deprecated_func_zip_entry_read_0->args[0].value, &attribute_Deprecated_func_zip_entry_read_0_arg0);
+	attribute_Deprecated_func_zip_entry_read_0->args[0].name = zend_string_init_interned("since", sizeof("since") - 1, 1);
+	zval attribute_Deprecated_func_zip_entry_read_0_arg1;
+	zend_string *attribute_Deprecated_func_zip_entry_read_0_arg1_str = zend_string_init("use ZipArchive::getFromIndex() instead", strlen("use ZipArchive::getFromIndex() instead"), 1);
+	ZVAL_STR(&attribute_Deprecated_func_zip_entry_read_0_arg1, attribute_Deprecated_func_zip_entry_read_0_arg1_str);
+	ZVAL_COPY_VALUE(&attribute_Deprecated_func_zip_entry_read_0->args[1].value, &attribute_Deprecated_func_zip_entry_read_0_arg1);
+	attribute_Deprecated_func_zip_entry_read_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE);
+
+	zend_string *attribute_name_Deprecated_func_zip_entry_name_0 = zend_string_init_interned("Deprecated", sizeof("Deprecated") - 1, 1);
+	zend_attribute *attribute_Deprecated_func_zip_entry_name_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "zip_entry_name", sizeof("zip_entry_name") - 1), attribute_name_Deprecated_func_zip_entry_name_0, 2);
+	zend_string_release(attribute_name_Deprecated_func_zip_entry_name_0);
+	zval attribute_Deprecated_func_zip_entry_name_0_arg0;
+	zend_string *attribute_Deprecated_func_zip_entry_name_0_arg0_str = zend_string_init("8.0", strlen("8.0"), 1);
+	ZVAL_STR(&attribute_Deprecated_func_zip_entry_name_0_arg0, attribute_Deprecated_func_zip_entry_name_0_arg0_str);
+	ZVAL_COPY_VALUE(&attribute_Deprecated_func_zip_entry_name_0->args[0].value, &attribute_Deprecated_func_zip_entry_name_0_arg0);
+	attribute_Deprecated_func_zip_entry_name_0->args[0].name = zend_string_init_interned("since", sizeof("since") - 1, 1);
+	zval attribute_Deprecated_func_zip_entry_name_0_arg1;
+	zend_string *attribute_Deprecated_func_zip_entry_name_0_arg1_str = zend_string_init("use ZipArchive::statIndex() instead", strlen("use ZipArchive::statIndex() instead"), 1);
+	ZVAL_STR(&attribute_Deprecated_func_zip_entry_name_0_arg1, attribute_Deprecated_func_zip_entry_name_0_arg1_str);
+	ZVAL_COPY_VALUE(&attribute_Deprecated_func_zip_entry_name_0->args[1].value, &attribute_Deprecated_func_zip_entry_name_0_arg1);
+	attribute_Deprecated_func_zip_entry_name_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE);
+
+	zend_string *attribute_name_Deprecated_func_zip_entry_compressedsize_0 = zend_string_init_interned("Deprecated", sizeof("Deprecated") - 1, 1);
+	zend_attribute *attribute_Deprecated_func_zip_entry_compressedsize_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "zip_entry_compressedsize", sizeof("zip_entry_compressedsize") - 1), attribute_name_Deprecated_func_zip_entry_compressedsize_0, 2);
+	zend_string_release(attribute_name_Deprecated_func_zip_entry_compressedsize_0);
+	zval attribute_Deprecated_func_zip_entry_compressedsize_0_arg0;
+	zend_string *attribute_Deprecated_func_zip_entry_compressedsize_0_arg0_str = zend_string_init("8.0", strlen("8.0"), 1);
+	ZVAL_STR(&attribute_Deprecated_func_zip_entry_compressedsize_0_arg0, attribute_Deprecated_func_zip_entry_compressedsize_0_arg0_str);
+	ZVAL_COPY_VALUE(&attribute_Deprecated_func_zip_entry_compressedsize_0->args[0].value, &attribute_Deprecated_func_zip_entry_compressedsize_0_arg0);
+	attribute_Deprecated_func_zip_entry_compressedsize_0->args[0].name = zend_string_init_interned("since", sizeof("since") - 1, 1);
+	zval attribute_Deprecated_func_zip_entry_compressedsize_0_arg1;
+	zend_string *attribute_Deprecated_func_zip_entry_compressedsize_0_arg1_str = zend_string_init("use ZipArchive::statIndex() instead", strlen("use ZipArchive::statIndex() instead"), 1);
+	ZVAL_STR(&attribute_Deprecated_func_zip_entry_compressedsize_0_arg1, attribute_Deprecated_func_zip_entry_compressedsize_0_arg1_str);
+	ZVAL_COPY_VALUE(&attribute_Deprecated_func_zip_entry_compressedsize_0->args[1].value, &attribute_Deprecated_func_zip_entry_compressedsize_0_arg1);
+	attribute_Deprecated_func_zip_entry_compressedsize_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE);
+
+	zend_string *attribute_name_Deprecated_func_zip_entry_filesize_0 = zend_string_init_interned("Deprecated", sizeof("Deprecated") - 1, 1);
+	zend_attribute *attribute_Deprecated_func_zip_entry_filesize_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "zip_entry_filesize", sizeof("zip_entry_filesize") - 1), attribute_name_Deprecated_func_zip_entry_filesize_0, 2);
+	zend_string_release(attribute_name_Deprecated_func_zip_entry_filesize_0);
+	zval attribute_Deprecated_func_zip_entry_filesize_0_arg0;
+	zend_string *attribute_Deprecated_func_zip_entry_filesize_0_arg0_str = zend_string_init("8.0", strlen("8.0"), 1);
+	ZVAL_STR(&attribute_Deprecated_func_zip_entry_filesize_0_arg0, attribute_Deprecated_func_zip_entry_filesize_0_arg0_str);
+	ZVAL_COPY_VALUE(&attribute_Deprecated_func_zip_entry_filesize_0->args[0].value, &attribute_Deprecated_func_zip_entry_filesize_0_arg0);
+	attribute_Deprecated_func_zip_entry_filesize_0->args[0].name = zend_string_init_interned("since", sizeof("since") - 1, 1);
+	zval attribute_Deprecated_func_zip_entry_filesize_0_arg1;
+	zend_string *attribute_Deprecated_func_zip_entry_filesize_0_arg1_str = zend_string_init("use ZipArchive::statIndex() instead", strlen("use ZipArchive::statIndex() instead"), 1);
+	ZVAL_STR(&attribute_Deprecated_func_zip_entry_filesize_0_arg1, attribute_Deprecated_func_zip_entry_filesize_0_arg1_str);
+	ZVAL_COPY_VALUE(&attribute_Deprecated_func_zip_entry_filesize_0->args[1].value, &attribute_Deprecated_func_zip_entry_filesize_0_arg1);
+	attribute_Deprecated_func_zip_entry_filesize_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE);
+
+	zend_string *attribute_name_Deprecated_func_zip_entry_compressionmethod_0 = zend_string_init_interned("Deprecated", sizeof("Deprecated") - 1, 1);
+	zend_attribute *attribute_Deprecated_func_zip_entry_compressionmethod_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "zip_entry_compressionmethod", sizeof("zip_entry_compressionmethod") - 1), attribute_name_Deprecated_func_zip_entry_compressionmethod_0, 2);
+	zend_string_release(attribute_name_Deprecated_func_zip_entry_compressionmethod_0);
+	zval attribute_Deprecated_func_zip_entry_compressionmethod_0_arg0;
+	zend_string *attribute_Deprecated_func_zip_entry_compressionmethod_0_arg0_str = zend_string_init("8.0", strlen("8.0"), 1);
+	ZVAL_STR(&attribute_Deprecated_func_zip_entry_compressionmethod_0_arg0, attribute_Deprecated_func_zip_entry_compressionmethod_0_arg0_str);
+	ZVAL_COPY_VALUE(&attribute_Deprecated_func_zip_entry_compressionmethod_0->args[0].value, &attribute_Deprecated_func_zip_entry_compressionmethod_0_arg0);
+	attribute_Deprecated_func_zip_entry_compressionmethod_0->args[0].name = zend_string_init_interned("since", sizeof("since") - 1, 1);
+	zval attribute_Deprecated_func_zip_entry_compressionmethod_0_arg1;
+	zend_string *attribute_Deprecated_func_zip_entry_compressionmethod_0_arg1_str = zend_string_init("use ZipArchive::statIndex() instead", strlen("use ZipArchive::statIndex() instead"), 1);
+	ZVAL_STR(&attribute_Deprecated_func_zip_entry_compressionmethod_0_arg1, attribute_Deprecated_func_zip_entry_compressionmethod_0_arg1_str);
+	ZVAL_COPY_VALUE(&attribute_Deprecated_func_zip_entry_compressionmethod_0->args[1].value, &attribute_Deprecated_func_zip_entry_compressionmethod_0_arg1);
+	attribute_Deprecated_func_zip_entry_compressionmethod_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE);
+}
+
 static zend_class_entry *register_class_ZipArchive(zend_class_entry *class_entry_Countable)
 {
 	zend_class_entry ce, *class_entry;
 
 	INIT_CLASS_ENTRY(ce, "ZipArchive", class_ZipArchive_methods);
+#if (PHP_VERSION_ID >= 80400)
+	class_entry = zend_register_internal_class_with_flags(&ce, NULL, 0);
+#else
 	class_entry = zend_register_internal_class_ex(&ce, NULL);
+#endif
 	zend_class_implements(class_entry, 1, class_entry_Countable);
 
 	zval const_CREATE_value;
@@ -605,9 +744,9 @@ static zend_class_entry *register_class_ZipArchive(zend_class_entry *class_entry
 	ZVAL_LONG(&const_FL_RECOMPRESS_value, ZIP_FL_RECOMPRESS);
 	zend_string *const_FL_RECOMPRESS_name = zend_string_init_interned("FL_RECOMPRESS", sizeof("FL_RECOMPRESS") - 1, 1);
 #if (PHP_VERSION_ID >= 80300)
-	zend_declare_typed_class_constant(class_entry, const_FL_RECOMPRESS_name, &const_FL_RECOMPRESS_value, ZEND_ACC_PUBLIC|ZEND_ACC_DEPRECATED, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
+	zend_class_constant *const_FL_RECOMPRESS = zend_declare_typed_class_constant(class_entry, const_FL_RECOMPRESS_name, &const_FL_RECOMPRESS_value, ZEND_ACC_PUBLIC|ZEND_ACC_DEPRECATED, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
 #else
-	zend_declare_class_constant_ex(class_entry, const_FL_RECOMPRESS_name, &const_FL_RECOMPRESS_value, ZEND_ACC_PUBLIC|ZEND_ACC_DEPRECATED, NULL);
+	zend_class_constant *const_FL_RECOMPRESS = zend_declare_class_constant_ex(class_entry, const_FL_RECOMPRESS_name, &const_FL_RECOMPRESS_value, ZEND_ACC_PUBLIC|ZEND_ACC_DEPRECATED, NULL);
 #endif
 	zend_string_release(const_FL_RECOMPRESS_name);
 #endif
@@ -1729,6 +1868,18 @@ static zend_class_entry *register_class_ZipArchive(zend_class_entry *class_entry
 	zend_declare_typed_property(class_entry, property_comment_name, &property_comment_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_STRING));
 	zend_string_release(property_comment_name);
 
+#if defined(ZIP_FL_RECOMPRESS)
+
+	zend_string *attribute_name_Deprecated_const_FL_RECOMPRESS_0 = zend_string_init_interned("Deprecated", sizeof("Deprecated") - 1, 1);
+	zend_attribute *attribute_Deprecated_const_FL_RECOMPRESS_0 = zend_add_class_constant_attribute(class_entry, const_FL_RECOMPRESS, attribute_name_Deprecated_const_FL_RECOMPRESS_0, 1);
+	zend_string_release(attribute_name_Deprecated_const_FL_RECOMPRESS_0);
+	zval attribute_Deprecated_const_FL_RECOMPRESS_0_arg0;
+	zend_string *attribute_Deprecated_const_FL_RECOMPRESS_0_arg0_str = zend_string_init("8.3", strlen("8.3"), 1);
+	ZVAL_STR(&attribute_Deprecated_const_FL_RECOMPRESS_0_arg0, attribute_Deprecated_const_FL_RECOMPRESS_0_arg0_str);
+	ZVAL_COPY_VALUE(&attribute_Deprecated_const_FL_RECOMPRESS_0->args[0].value, &attribute_Deprecated_const_FL_RECOMPRESS_0_arg0);
+	attribute_Deprecated_const_FL_RECOMPRESS_0->args[0].name = zend_string_init_interned("since", sizeof("since") - 1, 1);
+#endif
+
 
 	zend_string *attribute_name_SensitiveParameter_func_setpassword_arg0_0 = zend_string_init_interned("SensitiveParameter", sizeof("SensitiveParameter") - 1, 1);
 	zend_add_parameter_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "setpassword", sizeof("setpassword") - 1), 0, attribute_name_SensitiveParameter_func_setpassword_arg0_0, 0);
@@ -1738,8 +1889,6 @@ static zend_class_entry *register_class_ZipArchive(zend_class_entry *class_entry
 	zend_string *attribute_name_SensitiveParameter_func_setencryptionname_arg2_0 = zend_string_init_interned("SensitiveParameter", sizeof("SensitiveParameter") - 1, 1);
 	zend_add_parameter_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "setencryptionname", sizeof("setencryptionname") - 1), 2, attribute_name_SensitiveParameter_func_setencryptionname_arg2_0, 0);
 	zend_string_release(attribute_name_SensitiveParameter_func_setencryptionname_arg2_0);
-#endif
-#if defined(HAVE_ENCRYPTION)
 
 	zend_string *attribute_name_SensitiveParameter_func_setencryptionindex_arg2_0 = zend_string_init_interned("SensitiveParameter", sizeof("SensitiveParameter") - 1, 1);
 	zend_add_parameter_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "setencryptionindex", sizeof("setencryptionindex") - 1), 2, attribute_name_SensitiveParameter_func_setencryptionindex_arg2_0, 0);
diff --git a/php81/zip_stream.c b/php81/zip_stream.c
index 28c363e..a323243 100644
--- a/php81/zip_stream.c
+++ b/php81/zip_stream.c
@@ -26,8 +26,6 @@
 #include "fopen_wrappers.h"
 #include "php_zip.h"
 
-#include "ext/standard/url.h"
-
 /* needed for ssize_t definition */
 #include <sys/types.h>
 
diff --git a/tests/oo_getcomment2.phpt b/tests/oo_getcomment2.phpt
index 113c6b6..273113e 100644
--- a/tests/oo_getcomment2.phpt
+++ b/tests/oo_getcomment2.phpt
@@ -29,8 +29,8 @@ try {
 $zip->close();
 
 ?>
---EXPECT--
+--EXPECTF--
 Zip archive comment
 string(11) "foo comment"
 string(11) "foo comment"
-ZipArchive::getCommentName(): Argument #1 ($name) cannot be empty
+ZipArchive::getCommentName(): Argument #1 ($name) %s be empty
diff --git a/tests/oo_open2.phpt b/tests/oo_open2.phpt
index 337b8c6..48f55c3 100644
--- a/tests/oo_open2.phpt
+++ b/tests/oo_open2.phpt
@@ -42,8 +42,8 @@ if ($zip->status == ZIPARCHIVE::ER_OK) {
     echo "failed\n";
 }
 ?>
---EXPECT--
+--EXPECTF--
 ER_OPEN: ok
 create: ok
-ZipArchive::open(): Argument #1 ($filename) cannot be empty
+ZipArchive::open(): Argument #1 ($filename) %s be empty
 OK
diff --git a/tests/zip_open_error2.phpt b/tests/zip_open_error2.phpt
index 01e0e20..697541b 100644
--- a/tests/zip_open_error2.phpt
+++ b/tests/zip_open_error2.phpt
@@ -23,9 +23,9 @@ echo is_resource($zip) ? "OK" : "Failure";
 ?>
 --EXPECTF--
 Test case 1:
-Deprecated: Function zip_open() is deprecated in %s on line %d
-zip_open(): Argument #1 ($filename) cannot be empty
+Deprecated: Function zip_open() is deprecated %s on line %d
+zip_open(): Argument #1 ($filename) %s be empty
 Test case 2:
 
-Deprecated: Function zip_open() is deprecated in %s on line %d
+Deprecated: Function zip_open() is deprecated %s on line %d
 Failure