summaryrefslogtreecommitdiffstats
path: root/php-bartlett-php-compatinfo-db-upstream.patch
blob: 2f50e8d64d0640294d58469aa43f931bccf0ba64 (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
From d05aaa27ebd0d0d5fe61c34da10d4362c3223ea1 Mon Sep 17 00:00:00 2001
From: Laurent Laville <laurent.laville@gmail.com>
Date: Thu, 14 Jan 2021 07:22:07 +0000
Subject: [PATCH] fixes Symfony BC issue (#61)

---
 CHANGELOG-3.x.md                              |  4 ++
 composer.json                                 |  3 +-
 config/set/common.php                         |  2 +-
 config/set/default.php                        |  2 +-
 .../Framework/Symfony/Polyfill.php            | 40 +++++++++++++++++++
 .../Console/Command/AbstractCommand.php       |  3 ++
 .../Console/Command/DiagnoseCommand.php       |  3 +-
 .../Console/Command/InitCommand.php           |  3 +-
 .../Console/Command/ListCommand.php           |  3 +-
 .../Console/Command/ReleaseCommand.php        |  5 +--
 .../Console/Command/ShowCommand.php           |  6 +--
 11 files changed, 59 insertions(+), 15 deletions(-)
 create mode 100644 src/Infrastructure/Framework/Symfony/Polyfill.php

diff --git a/CHANGELOG-3.x.md b/CHANGELOG-3.x.md
index 2dc124b..0229ff1 100644
--- a/CHANGELOG-3.x.md
+++ b/CHANGELOG-3.x.md
@@ -6,6 +6,10 @@ using the [Keep a CHANGELOG](http://keepachangelog.com) principles.
 
 ## [Unreleased]
 
+### Fixed
+
+- [#61](https://github.com/llaville/php-compatinfo-db/issues/61) Keep Symfony 4.4 Backward Compatibility
+
 ## [3.1.0] - 2021-01-09
 
 ### Added
diff --git a/composer.json b/composer.json
index 5171be1..3448740 100644
--- a/composer.json
+++ b/composer.json
@@ -48,7 +48,8 @@
     "autoload": {
         "psr-4": {
             "Bartlett\\CompatInfoDb\\": "src/"
-        }
+        },
+        "files": ["src/Infrastructure/Framework/Symfony/Polyfill.php"]
     },
     "autoload-dev": {
         "psr-4": {
diff --git a/config/set/common.php b/config/set/common.php
index ef25457..f480a16 100644
--- a/config/set/common.php
+++ b/config/set/common.php
@@ -7,6 +7,7 @@
 use Bartlett\CompatInfoDb\Presentation\Console\Command\FactoryCommandLoader;
 use Bartlett\CompatInfoDb\Presentation\Console\Input\Input;
 use Bartlett\CompatInfoDb\Presentation\Console\Output\Output;
+use function Bartlett\CompatInfoDb\Infrastructure\Framework\Symfony\service;
 
 use Symfony\Component\Console\CommandLoader\CommandLoaderInterface;
 use Symfony\Component\Console\Input\InputInterface;
@@ -15,7 +16,6 @@
 use Symfony\Component\EventDispatcher\EventDispatcherInterface;
 use Symfony\Component\EventDispatcher\EventSubscriberInterface;
 use Symfony\Component\Stopwatch\Stopwatch;
-use function Symfony\Component\DependencyInjection\Loader\Configurator\service;
 use function Symfony\Component\DependencyInjection\Loader\Configurator\tagged_iterator;
 
 /**
diff --git a/config/set/default.php b/config/set/default.php
index 413eb33..25ff7e8 100644
--- a/config/set/default.php
+++ b/config/set/default.php
@@ -16,6 +16,7 @@
 use Bartlett\CompatInfoDb\Infrastructure\Persistence\Doctrine\Repository\PlatformRepository as InfrastructurePlatformRepository;
 use Bartlett\CompatInfoDb\Application\Service\JsonFileHandler;
 use Bartlett\CompatInfoDb\Presentation\Console\Command\CommandInterface;
+use function Bartlett\CompatInfoDb\Infrastructure\Framework\Symfony\service;
 
 use Composer\Semver\VersionParser;
 
@@ -25,7 +26,6 @@
 
 use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
 use Symfony\Component\Messenger\Command\DebugCommand;
-use function Symfony\Component\DependencyInjection\Loader\Configurator\service;
 
 /**
  * Build the Container with default parameters and services
diff --git a/src/Infrastructure/Framework/Symfony/Polyfill.php b/src/Infrastructure/Framework/Symfony/Polyfill.php
new file mode 100644
index 0000000..7aff5e5
--- /dev/null
+++ b/src/Infrastructure/Framework/Symfony/Polyfill.php
@@ -0,0 +1,40 @@
+<?php declare(strict_types=1);
+
+/**
+ * Keep BC between Symfony 4.4 and Symfony 5.x
+ *
+ * PHP version 7
+ *
+ * @category   PHP
+ * @package    PHP_CompatInfo_Db
+ * @author     Laurent Laville <pear@laurent-laville.org>
+ * @license    https://opensource.org/licenses/BSD-3-Clause The 3-Clause BSD License
+ * @link       http://bartlett.laurent-laville.org/php-compatinfo/
+ */
+
+namespace Bartlett\CompatInfoDb\Infrastructure\Framework\Symfony;
+
+use Symfony\Component\DependencyInjection\Loader\Configurator\ReferenceConfigurator;
+
+/**
+ * @since 3.1.1
+ * @see https://github.com/llaville/php-compatinfo-db/issues/61
+ */
+final class Polyfill
+{
+    /**
+     * Creates a reference to a service.
+     *
+     * @param string $serviceId
+     * @return ReferenceConfigurator
+     */
+    public static function service(string $serviceId): ReferenceConfigurator
+    {
+        return new ReferenceConfigurator($serviceId);
+    }
+}
+
+function service(string $serviceId): ReferenceConfigurator
+{
+    return Polyfill::service($serviceId);
+}
diff --git a/src/Presentation/Console/Command/AbstractCommand.php b/src/Presentation/Console/Command/AbstractCommand.php
index 998905f..5a9b2a3 100644
--- a/src/Presentation/Console/Command/AbstractCommand.php
+++ b/src/Presentation/Console/Command/AbstractCommand.php
@@ -24,6 +24,9 @@
  */
 abstract class AbstractCommand extends Command
 {
+    public const SUCCESS = 0;
+    public const FAILURE = 1;
+
     /** @var CommandBusInterface */
     protected $commandBus;
 
diff --git a/src/Presentation/Console/Command/DiagnoseCommand.php b/src/Presentation/Console/Command/DiagnoseCommand.php
index 01527fd..6f2881c 100644
--- a/src/Presentation/Console/Command/DiagnoseCommand.php
+++ b/src/Presentation/Console/Command/DiagnoseCommand.php
@@ -22,7 +22,6 @@
 
 use Doctrine\ORM\EntityManagerInterface;
 
-use Symfony\Component\Console\Command\Command;
 use Symfony\Component\Console\Input\InputInterface;
 use Symfony\Component\Console\Output\OutputInterface;
 
@@ -65,6 +64,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
         $checker->setAppName('PHP CompatInfoDB');
         $checker->printDiagnostic($projectRequirements);
 
-        return Command::SUCCESS;
+        return self::SUCCESS;
     }
 }
diff --git a/src/Presentation/Console/Command/InitCommand.php b/src/Presentation/Console/Command/InitCommand.php
index b1e5722..80c54fa 100644
--- a/src/Presentation/Console/Command/InitCommand.php
+++ b/src/Presentation/Console/Command/InitCommand.php
@@ -18,7 +18,6 @@
 use Bartlett\CompatInfoDb\Presentation\Console\ApplicationInterface;
 use Bartlett\CompatInfoDb\Presentation\Console\Style;
 
-use Symfony\Component\Console\Command\Command;
 use Symfony\Component\Console\Input\InputArgument;
 use Symfony\Component\Console\Input\InputInterface;
 use Symfony\Component\Console\Output\OutputInterface;
@@ -59,7 +58,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
 
         $exitCode = $this->queryBus->query($initQuery);
 
-        if (Command::SUCCESS === $exitCode) {
+        if (self::SUCCESS === $exitCode) {
             $io->success('Database built successfully!');
         } else {
             $io->warning('Database already exists.');
diff --git a/src/Presentation/Console/Command/ListCommand.php b/src/Presentation/Console/Command/ListCommand.php
index 350ccb8..3f47f6d 100644
--- a/src/Presentation/Console/Command/ListCommand.php
+++ b/src/Presentation/Console/Command/ListCommand.php
@@ -20,7 +20,6 @@
 use Bartlett\CompatInfoDb\Presentation\Console\ApplicationInterface;
 use Bartlett\CompatInfoDb\Presentation\Console\Style;
 
-use Symfony\Component\Console\Command\Command;
 use Symfony\Component\Console\Input\InputInterface;
 use Symfony\Component\Console\Output\OutputInterface;
 use Symfony\Component\Console\Helper\TableSeparator;
@@ -105,6 +104,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
             )
         );
 
-        return Command::SUCCESS;
+        return self::SUCCESS;
     }
 }
diff --git a/src/Presentation/Console/Command/ReleaseCommand.php b/src/Presentation/Console/Command/ReleaseCommand.php
index 2315f5d..8f2049d 100644
--- a/src/Presentation/Console/Command/ReleaseCommand.php
+++ b/src/Presentation/Console/Command/ReleaseCommand.php
@@ -15,9 +15,8 @@
 namespace Bartlett\CompatInfoDb\Presentation\Console\Command;
 
 use Bartlett\CompatInfoDb\Application\Command\Release\ReleaseCommand as AppReleaseCommand;
-
 use Bartlett\CompatInfoDb\Presentation\Console\Style;
-use Symfony\Component\Console\Command\Command;
+
 use Symfony\Component\Console\Input\InputArgument;
 use Symfony\Component\Console\Input\InputInterface;
 use Symfony\Component\Console\Output\OutputInterface;
@@ -69,6 +68,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
         $io->success('New release was added in JSON files');
         $io->note('Do not forget to update constants of ExtensionVersionProviderInterface');
 
-        return Command::SUCCESS;
+        return self::SUCCESS;
     }
 }
diff --git a/src/Presentation/Console/Command/ShowCommand.php b/src/Presentation/Console/Command/ShowCommand.php
index 7b3254f..c16bfce 100644
--- a/src/Presentation/Console/Command/ShowCommand.php
+++ b/src/Presentation/Console/Command/ShowCommand.php
@@ -81,7 +81,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
 
         if (null === $extension) {
             $io->error(sprintf('Extension "%s" is not available', $showQuery->getExtension()));
-            return Command::FAILURE;
+            return self::FAILURE;
         }
 
         $summary = true;
@@ -120,7 +120,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
         }
 
         if (!$summary) {
-            return Command::SUCCESS;
+            return self::SUCCESS;
         }
 
         $io->title('Reference Summary');
@@ -157,7 +157,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
             '  Methods                                   %10d'
         );
 
-        return Command::SUCCESS;
+        return self::SUCCESS;
     }
 
     private function formatSection(array $data, string $section, StyleInterface $io): void
From 3b8dd5711ad97a0a34fe22bd6df30247d6e8bbf9 Mon Sep 17 00:00:00 2001
From: Laurent Laville <laurent.laville@gmail.com>
Date: Thu, 14 Jan 2021 08:55:57 +0000
Subject: [PATCH] fixe OCI8 reference issue (#62) see report comment

---
 CHANGELOG-3.x.md                             | 1 +
 data/reference/extension/oci8/1/methods.json | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/CHANGELOG-3.x.md b/CHANGELOG-3.x.md
index 0229ff1..50c4f04 100644
--- a/CHANGELOG-3.x.md
+++ b/CHANGELOG-3.x.md
@@ -9,6 +9,7 @@ using the [Keep a CHANGELOG](http://keepachangelog.com) principles.
 ### Fixed
 
 - [#61](https://github.com/llaville/php-compatinfo-db/issues/61) Keep Symfony 4.4 Backward Compatibility
+- [#62](https://github.com/llaville/php-compatinfo-db/issues/62) OCI8 reference issue
 
 ## [3.1.0] - 2021-01-09
 
diff --git a/data/reference/extension/oci8/1/methods.json b/data/reference/extension/oci8/1/methods.json
index 0aa2507..96ed79e 100644
--- a/data/reference/extension/oci8/1/methods.json
+++ b/data/reference/extension/oci8/1/methods.json
@@ -42,7 +42,7 @@
         "ext_min": "1.0",
         "ext_max": "",
         "php_min": "4.3.0",
-        "php_max": "7.4.11"
+        "php_max": "7.4.14"
     },
     {
         "class_name": "OCI-Collection",
@@ -269,4 +269,4 @@
         "php_min": "4.3.0",
         "php_max": "7.4.14"
     }
-]
\ No newline at end of file
+]
From 3c9ecc1a0f262fb010f698a6404b72fa779a4b9a Mon Sep 17 00:00:00 2001
From: Laurent Laville <laurent.laville@gmail.com>
Date: Sat, 16 Jan 2021 09:39:15 +0000
Subject: [PATCH] fixe class constants missing to solve issue #63

---
 data/reference/extension/http/2/const.json | 24 ++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/data/reference/extension/http/2/const.json b/data/reference/extension/http/2/const.json
index c496afd..0e96bdd 100644
--- a/data/reference/extension/http/2/const.json
+++ b/data/reference/extension/http/2/const.json
@@ -262,5 +262,29 @@
         "ext_max": "",
         "php_min": "5.3.0",
         "php_max": ""
+    },
+    {
+        "class_name": "http\\Cookie",
+        "name": "PARSE_RAW",
+        "ext_min": "2.0.0",
+        "ext_max": "",
+        "php_min": "5.3.0",
+        "php_max": ""
+    },
+    {
+        "class_name": "http\\Cookie",
+        "name": "SECURE",
+        "ext_min": "2.0.0",
+        "ext_max": "",
+        "php_min": "5.3.0",
+        "php_max": ""
+    },
+    {
+        "class_name": "http\\Cookie",
+        "name": "HTTPONLY",
+        "ext_min": "2.0.0",
+        "ext_max": "",
+        "php_min": "5.3.0",
+        "php_max": ""
     }
 ]
From 46ad813dd87effe6ecc08a0639fe49e553aabd5d Mon Sep 17 00:00:00 2001
From: Laurent Laville <laurent.laville@gmail.com>
Date: Sat, 16 Jan 2021 18:21:51 +0000
Subject: [PATCH] fixes xmlrpc reference issue (#64)

---
 CHANGELOG-3.x.md                              |   1 +
 README.md                                     |   1 +
 .../reference/extension/xmlrpc/1/classes.json |   9 ++
 .../extension/xmlrpc/1/functions.json         | 128 ++++++++++++++++++
 .../extension/xmlrpc/1/releases.json          |  18 +++
 .../extension/xmlrpc/43/releases.json         |   2 +-
 src/Application/Query/Init/InitHandler.php    |  11 +-
 7 files changed, 167 insertions(+), 3 deletions(-)
 create mode 100644 data/reference/extension/xmlrpc/1/classes.json
 create mode 100644 data/reference/extension/xmlrpc/1/functions.json
 create mode 100644 data/reference/extension/xmlrpc/1/releases.json

diff --git a/data/reference/extension/xmlrpc/1/classes.json b/data/reference/extension/xmlrpc/1/classes.json
new file mode 100644
index 0000000..0b0cb64
--- /dev/null
+++ b/data/reference/extension/xmlrpc/1/classes.json
@@ -0,0 +1,9 @@
+[
+    {
+        "name": "XmlRpcServer",
+        "ext_min": "1.0.0RC1",
+        "ext_max": "",
+        "php_min": "8.0.0",
+        "php_max": ""
+    }
+]
diff --git a/data/reference/extension/xmlrpc/1/functions.json b/data/reference/extension/xmlrpc/1/functions.json
new file mode 100644
index 0000000..09d5846
--- /dev/null
+++ b/data/reference/extension/xmlrpc/1/functions.json
@@ -0,0 +1,128 @@
+[
+    {
+        "name": "xmlrpc_encode",
+        "ext_min": "1.0.0RC1",
+        "ext_max": "",
+        "php_min": "8.0.0",
+        "php_max": "",
+        "parameters": "",
+        "php_excludes": ""
+    },
+    {
+        "name": "xmlrpc_decode",
+        "ext_min": "1.0.0RC1",
+        "ext_max": "",
+        "php_min": "8.0.0",
+        "php_max": "",
+        "parameters": "",
+        "php_excludes": ""
+    },
+    {
+        "name": "xmlrpc_decode_request",
+        "ext_min": "1.0.0RC1",
+        "ext_max": "",
+        "php_min": "8.0.0",
+        "php_max": "",
+        "parameters": "",
+        "php_excludes": ""
+    },
+    {
+        "name": "xmlrpc_encode_request",
+        "ext_min": "1.0.0RC1",
+        "ext_max": "",
+        "php_min": "8.0.0",
+        "php_max": "",
+        "parameters": "",
+        "php_excludes": ""
+    },
+    {
+        "name": "xmlrpc_get_type",
+        "ext_min": "1.0.0RC1",
+        "ext_max": "",
+        "php_min": "8.0.0",
+        "php_max": "",
+        "parameters": "",
+        "php_excludes": ""
+    },
+    {
+        "name": "xmlrpc_set_type",
+        "ext_min": "1.0.0RC1",
+        "ext_max": "",
+        "php_min": "8.0.0",
+        "php_max": "",
+        "parameters": "",
+        "php_excludes": ""
+    },
+    {
+        "name": "xmlrpc_is_fault",
+        "ext_min": "1.0.0RC1",
+        "ext_max": "",
+        "php_min": "8.0.0",
+        "php_max": "",
+        "parameters": "",
+        "php_excludes": ""
+    },
+    {
+        "name": "xmlrpc_server_create",
+        "ext_min": "1.0.0RC1",
+        "ext_max": "",
+        "php_min": "8.0.0",
+        "php_max": "",
+        "parameters": "",
+        "php_excludes": ""
+    },
+    {
+        "name": "xmlrpc_server_destroy",
+        "ext_min": "1.0.0RC1",
+        "ext_max": "",
+        "php_min": "8.0.0",
+        "php_max": "",
+        "parameters": "",
+        "php_excludes": ""
+    },
+    {
+        "name": "xmlrpc_server_register_method",
+        "ext_min": "1.0.0RC1",
+        "ext_max": "",
+        "php_min": "8.0.0",
+        "php_max": "",
+        "parameters": "",
+        "php_excludes": ""
+    },
+    {
+        "name": "xmlrpc_server_call_method",
+        "ext_min": "1.0.0RC1",
+        "ext_max": "",
+        "php_min": "8.0.0",
+        "php_max": "",
+        "parameters": "",
+        "php_excludes": ""
+    },
+    {
+        "name": "xmlrpc_parse_method_descriptions",
+        "ext_min": "1.0.0RC1",
+        "ext_max": "",
+        "php_min": "8.0.0",
+        "php_max": "",
+        "parameters": "",
+        "php_excludes": ""
+    },
+    {
+        "name": "xmlrpc_server_add_introspection_data",
+        "ext_min": "1.0.0RC1",
+        "ext_max": "",
+        "php_min": "8.0.0",
+        "php_max": "",
+        "parameters": "",
+        "php_excludes": ""
+    },
+    {
+        "name": "xmlrpc_server_register_introspection_callback",
+        "ext_min": "1.0.0RC1",
+        "ext_max": "",
+        "php_min": "8.0.0",
+        "php_max": "",
+        "parameters": "",
+        "php_excludes": ""
+    }
+]
diff --git a/data/reference/extension/xmlrpc/1/releases.json b/data/reference/extension/xmlrpc/1/releases.json
new file mode 100644
index 0000000..432d15a
--- /dev/null
+++ b/data/reference/extension/xmlrpc/1/releases.json
@@ -0,0 +1,18 @@
+[
+    {
+        "rel_version": "1.0.0RC1",
+        "rel_date": "2021-01-04",
+        "rel_state": "beta",
+        "ext_max": "",
+        "php_min": "8.0.0",
+        "php_max": ""
+    },
+    {
+        "rel_version": "1.0.0RC2",
+        "rel_date": "2021-01-15",
+        "rel_state": "beta",
+        "ext_max": "",
+        "php_min": "8.0.0",
+        "php_max": ""
+    }
+]
diff --git a/data/reference/extension/xmlrpc/43/releases.json b/data/reference/extension/xmlrpc/43/releases.json
index 0613962..db1c4b6 100644
--- a/data/reference/extension/xmlrpc/43/releases.json
+++ b/data/reference/extension/xmlrpc/43/releases.json
@@ -5,6 +5,6 @@
         "rel_state": "stable",
         "ext_max": "",
         "php_min": "4.3.0",
-        "php_max": ""
+        "php_max": "7.4.14"
     }
 ]
diff --git a/src/Application/Query/Init/InitHandler.php b/src/Application/Query/Init/InitHandler.php
index 53a92fa..95f69a6 100644
--- a/src/Application/Query/Init/InitHandler.php
+++ b/src/Application/Query/Init/InitHandler.php
@@ -1240,8 +1240,15 @@ private function majorReleaseDefinitionProvider(): Generator
         ];
 
         yield 'xmlrpc' => [
-            'functions' => ['41'],
-            'releases'  => ['41', '43'],
+            'classes'   => ['1'],
+            'functions' => [
+                '41',   // when bundled with PHP < 8
+                '1',    // as pecl extension for PHP 8
+            ],
+            'releases'  => [
+                '41', '43', // when bundled with PHP < 8
+                '1'         // as pecl extension for PHP 8
+            ],
         ];
 
         yield 'xmlwriter' => [
From 26d04a01cedc0238b28a238ebb54364474313b09 Mon Sep 17 00:00:00 2001
From: Laurent Laville <laurent.laville@gmail.com>
Date: Sun, 17 Jan 2021 07:00:27 +0000
Subject: [PATCH] keep compatibility between xmlrpc extension php bundled and
 unbundled (pecl)

---
 src/Application/Query/Init/InitHandler.php | 26 +++++++++++++---------
 1 file changed, 15 insertions(+), 11 deletions(-)

diff --git a/src/Application/Query/Init/InitHandler.php b/src/Application/Query/Init/InitHandler.php
index 95f69a6..63f0f2d 100644
--- a/src/Application/Query/Init/InitHandler.php
+++ b/src/Application/Query/Init/InitHandler.php
@@ -33,6 +33,7 @@
 use function implode;
 use function json_last_error;
 use function sprintf;
+use function version_compare;
 use const DIRECTORY_SEPARATOR;
 use const JSON_ERROR_NONE;
 
@@ -1239,17 +1240,20 @@ private function majorReleaseDefinitionProvider(): Generator
             ),
         ];
 
-        yield 'xmlrpc' => [
-            'classes'   => ['1'],
-            'functions' => [
-                '41',   // when bundled with PHP < 8
-                '1',    // as pecl extension for PHP 8
-            ],
-            'releases'  => [
-                '41', '43', // when bundled with PHP < 8
-                '1'         // as pecl extension for PHP 8
-            ],
-        ];
+        if (version_compare(PHP_VERSION, '8.0.0', 'lt')) {
+            // when bundled with PHP < 8
+            yield 'xmlrpc' => [
+                'functions' => ['41'],
+                'releases'  => ['41', '43'],
+            ];
+        } else {
+            // as pecl extension for PHP 8
+            yield 'xmlrpc' => [
+                'classes'   => ['1'],
+                'functions' => ['1'],
+                'releases'  => ['1'],
+            ];
+        }
 
         yield 'xmlwriter' => [
             'classes'   => ['51'],