Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
868 lines (682 loc) · 135 KB
/
Copy pathMakefile
File metadata and controls
868 lines (682 loc) · 135 KB
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
# set all to phony
SHELL=bash
.PHONY: *
ifneq (,$(findstring icrosoft,$(shell cat /proc/version)))
THREADS?=1
else
THREADS?=$(shell nproc)
endif
DOCKER_AVAILABLE=$(shell ((command -v docker >/dev/null 2>&1) && echo 0 || echo 1))
TTY_AVAILABLE=$(shell (test -t 1 && echo 0) || echo 1)
CONTAINER_REGISTRY_REPO="ghcr.io/wyrihaximusnet/php"
SLIM_DOCKER_IMAGE="-slim"
NTS_OR_ZTS_DOCKER_IMAGE="zts"
OTEL_PHP_FIBERS_ENABLED?=false
NEEDS_DOCKER_SOCKET=FALSE
HAS_EXTRA_SERVICES=FALSE
ALL_HAS_DIRECT_DOCKER_TASKS=TRUE
CONTRIB_HAS_DIRECT_DOCKER_TASKS=TRUE
ON_INSTALL_OR_UPDATE_HAS_DIRECT_DOCKER_TASKS=FALSE
PHP_VERSION="8.4"
CONTAINER_NAME=$(shell echo "${CONTAINER_REGISTRY_REPO}:${PHP_VERSION}-${NTS_OR_ZTS_DOCKER_IMAGE}-alpine${SLIM_DOCKER_IMAGE}-dev")
CONTAINER_NAME_INTERACTIVE_SHELL=$(shell echo "${CONTAINER_REGISTRY_REPO}:${PHP_VERSION}-zts-alpine-dev")
COMPOSER_CACHE_DIR=$(shell (command -v composer >/dev/null 2>&1) && composer config --global cache-dir -q 2>/dev/null || echo ${HOME}/.composer-php/cache)
COMPOSER_CONTAINER_CACHE_DIR=$(shell ((command -v docker >/dev/null 2>&1) && docker run --rm $(if $(filter 0,$(TTY_AVAILABLE)),-it,-i) ${CONTAINER_NAME} composer config --global cache-dir -q) || echo ${HOME}/.composer-php/cache)
ifneq ("$(wildcard /.you-are-in-a-wyrihaximus.net-php-docker-image)","")
IN_DOCKER=TRUE
else
IN_DOCKER=FALSE
endif
ifeq ("$(GITHUB_ACTIONS)","true")
IN_CI=TRUE
else
IN_CI=FALSE
endif
ifeq ("$(IN_DOCKER)","TRUE")
DOCKER_RUN:=
DOCKER_RUN_WITHOUT_NETWORK_FOR_COMPOSER:=
DOCKER_RUN_WITH_SOCKET:=
DOCKER_SHELL:=
DOCKER_INTERACTIVE_SHELL:=
DOCKER_DEFAULT_SECURITY_OPS=
DOCKER_WORKSPACE_BIND_OPS=--volumes-from $$(cat /etc/hostname) -w "`pwd`"
else
ifeq ($(DOCKER_AVAILABLE),0)
DOCKER_DEFAULT_SECURITY_OPS=--cap-drop=ALL --security-opt="no-new-privileges=true" --user="`id -u`:`id -g`"
DOCKER_WORKSPACE_BIND_OPS=-v "`pwd`:`pwd`" -w "`pwd`"
DOCKER_COMMON_OPS:=-v "`pwd`:`pwd`" -w "`pwd`" -v "`pwd`/.git:`pwd`/.git:ro" -v "${COMPOSER_CACHE_DIR}:${COMPOSER_CONTAINER_CACHE_DIR}" --ulimit nofile=1000000 -e THREADS="${THREADS}" -e OTEL_PHP_DISABLED_INSTRUMENTATIONS="all"
ifneq ("$(wildcard etc/qa/zzz_disable_otel_attr_hooks.ini)","")
DOCKER_COMMON_OPS:=${DOCKER_COMMON_OPS} -v "`pwd`/etc/qa/zzz_disable_otel_attr_hooks.ini:/usr/local/etc/php/conf.d/zzz_disable_otel_attr_hooks.ini:ro"
endif
DOCKER_COMMON_NON_INTERACTIVE_OPS:=-e OTEL_PHP_FIBERS_ENABLED="${OTEL_PHP_FIBERS_ENABLED}"
DOCKER_COMMON_INTERACTIVE_OPS:=-e OTEL_PHP_FIBERS_ENABLED="false"
ifeq ("$(NEEDS_DOCKER_SOCKET)","TRUE")
ifneq ("$(wildcard /var/run/docker.sock)","")
DOCKER_SECURITY_OPS:=
DOCKER_SOCKET_OPS:=-v "/var/run/docker.sock:/var/run/docker.sock"
DOCKER_SOCKET_CONTAINER_NAME_SUFFIX:=-root
else
DOCKER_SECURITY_OPS:=${DOCKER_DEFAULT_SECURITY_OPS}
DOCKER_SOCKET_OPS:=
DOCKER_SOCKET_CONTAINER_NAME_SUFFIX:=
endif
else
DOCKER_SECURITY_OPS:=${DOCKER_DEFAULT_SECURITY_OPS}
DOCKER_SOCKET_OPS:=
DOCKER_SOCKET_CONTAINER_NAME_SUFFIX:=
endif
DOCKER_RUN:=docker run --rm -i ${DOCKER_SECURITY_OPS} ${DOCKER_COMMON_NON_INTERACTIVE_OPS} ${DOCKER_COMMON_OPS} "${CONTAINER_NAME}"
DOCKER_RUN_WITHOUT_NETWORK_FOR_COMPOSER:=docker run --rm -i ${DOCKER_SECURITY_OPS} ${DOCKER_COMMON_NON_INTERACTIVE_OPS} -e COMPOSER_DISABLE_NETWORK="1" ${DOCKER_COMMON_OPS} "${CONTAINER_NAME}"
DOCKER_RUN_WITH_SOCKET:=docker run --rm -i ${DOCKER_SECURITY_OPS} ${DOCKER_COMMON_NON_INTERACTIVE_OPS} ${DOCKER_COMMON_OPS} ${DOCKER_SOCKET_OPS} "${CONTAINER_NAME}${DOCKER_SOCKET_CONTAINER_NAME_SUFFIX}"
ifeq ($(TTY_AVAILABLE),0)
DOCKER_SHELL:=docker run --rm -it ${DOCKER_SECURITY_OPS} ${DOCKER_COMMON_NON_INTERACTIVE_OPS} ${DOCKER_COMMON_OPS} "${CONTAINER_NAME}"
DOCKER_INTERACTIVE_SHELL:=docker run --rm -it ${DOCKER_SECURITY_OPS} ${DOCKER_COMMON_INTERACTIVE_OPS} ${DOCKER_COMMON_OPS} "${CONTAINER_NAME_INTERACTIVE_SHELL}"
else
DOCKER_SHELL:=$(DOCKER_RUN)
DOCKER_INTERACTIVE_SHELL:=docker run --rm -i ${DOCKER_SECURITY_OPS} ${DOCKER_COMMON_INTERACTIVE_OPS} ${DOCKER_COMMON_OPS} "${CONTAINER_NAME_INTERACTIVE_SHELL}"
endif
else
DOCKER_RUN:=
DOCKER_RUN_WITHOUT_NETWORK_FOR_COMPOSER:=
DOCKER_RUN_WITH_SOCKET:=
DOCKER_SHELL:=
DOCKER_INTERACTIVE_SHELL:=
DOCKER_DEFAULT_SECURITY_OPS=
DOCKER_WORKSPACE_BIND_OPS=
endif
endif
INFECTION_THREADS_DETECT=php -r '$$f="etc/qa/infection.json5"; if (!is_file($$f)) {echo "0"; exit;} $$j=json_decode(file_get_contents($$f), true); echo (is_array($$j) && array_key_exists("threads", $$j)) ? "1" : "0";'
ifeq ("$(IN_DOCKER)","TRUE")
INFECTION_CONFIG_HAS_THREADS=$(shell $(INFECTION_THREADS_DETECT))
else ifneq ($(strip $(DOCKER_RUN)),)
INFECTION_CONFIG_HAS_THREADS=$(shell $(DOCKER_RUN) $(INFECTION_THREADS_DETECT))
else
INFECTION_CONFIG_HAS_THREADS=$(shell $(INFECTION_THREADS_DETECT))
endif
INFECTION_THREADS_CLI=$(if $(filter 1,$(INFECTION_CONFIG_HAS_THREADS)),,--threads=$(if $(filter TRUE,$(IN_CI)),1,$(THREADS)))
DOCKER_RUN_DOCUMENTATION=docker run --rm -i $(DOCKER_DEFAULT_SECURITY_OPS) $(DOCKER_WORKSPACE_BIND_OPS)
## Run everything extra points
all: ## Runs everything ####
ifeq ("$(ALL_HAS_DIRECT_DOCKER_TASKS)","TRUE")
$(MAKE) all-raw
else
$(DOCKER_RUN_WITH_SOCKET) make all-raw
endif
all-raw: ## The real runs everything, but due to sponge it has to be ran inside DOCKER_RUN ##U##
$(MAKE) composer-validate syntax-php composer-normalize rector-upgrade cs-fix cs stan unit-testing mutation-testing composer-require-checker composer-unused backward-compatibility-check documentation-qa ## Count: 13
## Run a subset of everything for those that find everything intimidating
contrib: ## Runs a subset of everything (all) ####
ifeq ("$(CONTRIB_HAS_DIRECT_DOCKER_TASKS)","TRUE")
$(MAKE) contrib-raw
else
$(DOCKER_RUN_WITH_SOCKET) make contrib-raw
endif
contrib-raw: ## The real runs everything, but due to sponge it has to be ran inside DOCKER_RUN ##U##
$(MAKE) cs-fix cs unit-testing composer-require-checker composer-unused documentation-qa ## Count: 6
## Temporary set of migrations to get all my repos in shape
migrations-git-enforce-gitattributes-contents: #### Enforce `.gitattributes` contents ##*I*##
($(DOCKER_RUN) php -r 'file_put_contents(".gitattributes", base64_decode("IyBTZXQgdGhlIGRlZmF1bHQgYmVoYXZpb3IsIGluIGNhc2UgcGVvcGxlIGRvbid0IGhhdmUgY29yZS5hdXRvY3JsZiBzZXQuCiogdGV4dCBlb2w9bGYKCiMgVGhlc2UgZmlsZXMgYXJlIGJpbmFyeSBhbmQgc2hvdWxkIGJlIGxlZnQgdW50b3VjaGVkCiMgKGJpbmFyeSBpcyBhIG1hY3JvIGZvciAtdGV4dCAtZGlmZikKKi5wbmcgYmluYXJ5CiouanBnIGJpbmFyeQoqLmpwZWcgYmluYXJ5CiouZ2lmIGJpbmFyeQoqLmljbyBiaW5hcnkKKi53ZWJwIGJpbmFyeQoqLmJtcCBiaW5hcnkKKi50dGYgYmluYXJ5CiouYmxwIGJpbmFyeQoqLmRiMiBiaW5hcnkKCiMgSWdub3JpbmcgZmlsZXMgZm9yIGRpc3RyaWJ1dGlvbiBhcmNoaWV2ZXMKLmdpdGh1Yi8gZXhwb3J0LWlnbm9yZQpldGMvY2kvIGV4cG9ydC1pZ25vcmUKZXRjL2Rldi1hcHAvIGV4cG9ydC1pZ25vcmUKZXRjL3N0YXRlLyBleHBvcnQtaWdub3JlCmV0Yy9xYS8gZXhwb3J0LWlnbm9yZQpleGFtcGxlcy8gZXhwb3J0LWlnbm9yZQp0ZXN0cy8gZXhwb3J0LWlnbm9yZQp2YXIvIGV4cG9ydC1pZ25vcmUKLmRldmNvbnRhaW5lci5qc29uIGV4cG9ydC1pZ25vcmUKLmVkaXRvcmNvbmZpZyBleHBvcnQtaWdub3JlCi5naXRhdHRyaWJ1dGVzIGV4cG9ydC1pZ25vcmUKLmdpdGlnbm9yZSBleHBvcnQtaWdub3JlCkNPTlRSSUJVVElORy5tZCBleHBvcnQtaWdub3JlCmNvbXBvc2VyLmxvY2sgZXhwb3J0LWlnbm9yZQpNYWtlZmlsZSBleHBvcnQtaWdub3JlClJFQURNRS5tZCBleHBvcnQtaWdub3JlCgojIERpZmZpbmcKKi5waHAgZGlmZj1waHAK"));' || true)
migrations-git-enforce-editorconfig-contents: #### Enforce `.editorconfig` contents ##*I*##
($(DOCKER_RUN) php -r 'file_put_contents(".editorconfig", base64_decode("cm9vdCA9IHRydWUKClsqXQpjaGFyc2V0ID0gdXRmLTgKaW5kZW50X3N0eWxlID0gc3BhY2UKaW5kZW50X3NpemUgPSA0Cmluc2VydF9maW5hbF9uZXdsaW5lID0gdHJ1ZQp0cmltX3RyYWlsaW5nX3doaXRlc3BhY2UgPSB0cnVlCgpbKi5qc29uXQppbmRlbnRfc2l6ZSA9IDIKClsqLnltbF0KaW5kZW50X3NpemUgPSAyCgpbKi55YW1sXQppbmRlbnRfc2l6ZSA9IDIKCltNYWtlZmlsZV0KaW5kZW50X3N0eWxlID0gdGFiCgpbKi5ta10KaW5kZW50X3N0eWxlID0gdGFiCgpbKi5uZW9uXQppbmRlbnRfc3R5bGUgPSB0YWIK"));' || true)
migrations-git-make-sure-gitignore-exists: #### Make sure `.gitignore` exists ##*I*##
($(DOCKER_RUN) touch .gitignore || true)
migrations-git-make-sure-gitignore-ignores-var: #### Make sure `.gitignore` ignores `var/*` ##*I*##
($(DOCKER_RUN) php -r '$$gitignoreFile = ".gitignore"; if (!file_exists($$gitignoreFile)) {exit;} $$txt = file_get_contents($$gitignoreFile); if (!is_string($$txt)) {exit;} if (strpos($$txt, "var/*") !== false) {exit;} file_put_contents($$gitignoreFile, "var/*\n", FILE_APPEND);' || true)
migrations-git-make-sure-gitignore-excludes-var-gitkeep: #### Make sure `.gitignore` excludes `var/.gitkeep` ##*I*##
($(DOCKER_RUN) php -r '$$gitignoreFile = ".gitignore"; if (!file_exists($$gitignoreFile)) {exit;} $$txt = file_get_contents($$gitignoreFile); if (!is_string($$txt)) {exit;} if (strpos($$txt, "!var/.gitkeep") !== false) {exit;} file_put_contents($$gitignoreFile, "!var/.gitkeep\n", FILE_APPEND);' || true)
migrations-git-make-sure-gitignore-ignores-vale-styles-except-vocab: #### Ignore Vale styles except WyriHaximus vocab symlink ##*I*##
($(DOCKER_RUN) php -r '$$gitignoreFile = ".gitignore"; if (!file_exists($$gitignoreFile)) {exit;} $$txt = file_get_contents($$gitignoreFile); if (!is_string($$txt)) {exit;} if (strpos($$txt, "etc/qa/vale/**") !== false) {exit;} file_put_contents($$gitignoreFile, "etc/qa/vale/**\n!etc/qa/vale/styles/\n!etc/qa/vale/styles/config/\n!etc/qa/vale/styles/config/vocabularies/\n!etc/qa/vale/styles/config/vocabularies/WyriHaximus/\n!etc/qa/vale/styles/config/vocabularies/WyriHaximus/accept.txt\n", FILE_APPEND);' || true)
migrations-docs-update-readme-copyright-c-year-to-current: #### Update readme copyright year to current ##*I*##
($(DOCKER_RUN) php -r '$$readmeFile = "README.md"; $$copyRight = "Copyright (c) "; $$currentYear = date("Y"); if (!file_exists($$readmeFile)) {exit;} $$readmeContents = file_get_contents($$readmeFile); foreach (range(2000, 2100) as $$year) { $$readmeContents = str_replace($$copyRight . $$year, $$copyRight . $$currentYear, $$readmeContents); } file_put_contents($$readmeFile, $$readmeContents); ' || true)
migrations-docs-update-readme-copyright-year-to-current: #### Update readme copyright year to current ##*I*##
($(DOCKER_RUN) php -r '$$readmeFile = "README.md"; $$copyRight = "Copyright "; $$currentYear = date("Y"); if (!file_exists($$readmeFile)) {exit;} $$readmeContents = file_get_contents($$readmeFile); foreach (range(2000, 2100) as $$year) { $$readmeContents = str_replace($$copyRight . $$year, $$copyRight . $$currentYear, $$readmeContents); } file_put_contents($$readmeFile, $$readmeContents); ' || true)
migrations-docs-update-etc-readme-template-copyright-c-year-to-current: #### Update readme template in etc/ copyright year to current ##*I*##
($(DOCKER_RUN) php -r '$$readmeFile = "etc/README.md.twig"; $$copyRight = "Copyright (c) "; $$currentYear = date("Y"); if (!file_exists($$readmeFile)) {exit;} $$readmeContents = file_get_contents($$readmeFile); foreach (range(2000, 2100) as $$year) { $$readmeContents = str_replace($$copyRight . $$year, $$copyRight . $$currentYear, $$readmeContents); } file_put_contents($$readmeFile, $$readmeContents); ' || true)
migrations-docs-update-etc-readme-template-copyright-year-to-current: #### Update readme template in etc/ copyright year to current ##*I*##
($(DOCKER_RUN) php -r '$$readmeFile = "etc/README.md.twig"; $$copyRight = "Copyright "; $$currentYear = date("Y"); if (!file_exists($$readmeFile)) {exit;} $$readmeContents = file_get_contents($$readmeFile); foreach (range(2000, 2100) as $$year) { $$readmeContents = str_replace($$copyRight . $$year, $$copyRight . $$currentYear, $$readmeContents); } file_put_contents($$readmeFile, $$readmeContents); ' || true)
migrations-docs-create-license-when-it-doesnt-exists: #### Create license when it doesn't exists ##*I*##
($(DOCKER_RUN) php -r '$$licenseFile = "LICENSE"; $$composerFIle = "composer.json"; if (file_exists($$licenseFile)) {exit;} if (file_exists($$composerFIle)) {$$json = json_decode(file_get_contents($$composerFIle), true); if (array_key_exists("license", $$json)) {if ($$json["license"] === "proprietary") {exit;}}} file_put_contents($$licenseFile, base64_decode("VGhlIE1JVCBMaWNlbnNlIChNSVQpCgpDb3B5cmlnaHQgKGMpIDIwMDEgQ2Vlcy1KYW4gS2lld2lldAoKUGVybWlzc2lvbiBpcyBoZXJlYnkgZ3JhbnRlZCwgZnJlZSBvZiBjaGFyZ2UsIHRvIGFueSBwZXJzb24gb2J0YWluaW5nIGEgY29weQpvZiB0aGlzIHNvZnR3YXJlIGFuZCBhc3NvY2lhdGVkIGRvY3VtZW50YXRpb24gZmlsZXMgKHRoZSAiU29mdHdhcmUiKSwgdG8gZGVhbAppbiB0aGUgU29mdHdhcmUgd2l0aG91dCByZXN0cmljdGlvbiwgaW5jbHVkaW5nIHdpdGhvdXQgbGltaXRhdGlvbiB0aGUgcmlnaHRzCnRvIHVzZSwgY29weSwgbW9kaWZ5LCBtZXJnZSwgcHVibGlzaCwgZGlzdHJpYnV0ZSwgc3VibGljZW5zZSwgYW5kL29yIHNlbGwKY29waWVzIG9mIHRoZSBTb2Z0d2FyZSwgYW5kIHRvIHBlcm1pdCBwZXJzb25zIHRvIHdob20gdGhlIFNvZnR3YXJlIGlzCmZ1cm5pc2hlZCB0byBkbyBzbywgc3ViamVjdCB0byB0aGUgZm9sbG93aW5nIGNvbmRpdGlvbnM6CgpUaGUgYWJvdmUgY29weXJpZ2h0IG5vdGljZSBhbmQgdGhpcyBwZXJtaXNzaW9uIG5vdGljZSBzaGFsbCBiZSBpbmNsdWRlZCBpbiBhbGwKY29waWVzIG9yIHN1YnN0YW50aWFsIHBvcnRpb25zIG9mIHRoZSBTb2Z0d2FyZS4KClRIRSBTT0ZUV0FSRSBJUyBQUk9WSURFRCAiQVMgSVMiLCBXSVRIT1VUIFdBUlJBTlRZIE9GIEFOWSBLSU5ELCBFWFBSRVNTIE9SCklNUExJRUQsIElOQ0xVRElORyBCVVQgTk9UIExJTUlURUQgVE8gVEhFIFdBUlJBTlRJRVMgT0YgTUVSQ0hBTlRBQklMSVRZLApGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRSBBTkQgTk9OSU5GUklOR0VNRU5ULiBJTiBOTyBFVkVOVCBTSEFMTCBUSEUKQVVUSE9SUyBPUiBDT1BZUklHSFQgSE9MREVSUyBCRSBMSUFCTEUgRk9SIEFOWSBDTEFJTSwgREFNQUdFUyBPUiBPVEhFUgpMSUFCSUxJVFksIFdIRVRIRVIgSU4gQU4gQUNUSU9OIE9GIENPTlRSQUNULCBUT1JUIE9SIE9USEVSV0lTRSwgQVJJU0lORyBGUk9NLApPVVQgT0YgT1IgSU4gQ09OTkVDVElPTiBXSVRIIFRIRSBTT0ZUV0FSRSBPUiBUSEUgVVNFIE9SIE9USEVSIERFQUxJTkdTIElOIFRIRQpTT0ZUV0FSRS4K"));' || true)
migrations-docs-update-license-copyright-c-year-to-current: #### Update license copyright year to current ##*I*##
($(DOCKER_RUN) php -r '$$licenseFile = "LICENSE"; $$copyRight = "Copyright (c) "; $$currentYear = date("Y"); if (!file_exists($$licenseFile)) {exit;} $$licenseContents = file_get_contents($$licenseFile); foreach (range(2000, 2100) as $$year) { $$licenseContents = str_replace($$copyRight . $$year, $$copyRight . $$currentYear, $$licenseContents); } file_put_contents($$licenseFile, $$licenseContents); ' || true)
migrations-docs-update-license-copyright-year-to-current: #### Update license copyright year to current ##*I*##
($(DOCKER_RUN) php -r '$$licenseFile = "LICENSE"; $$copyRight = "Copyright "; $$currentYear = date("Y"); if (!file_exists($$licenseFile)) {exit;} $$licenseContents = file_get_contents($$licenseFile); foreach (range(2000, 2100) as $$year) { $$licenseContents = str_replace($$copyRight . $$year, $$copyRight . $$currentYear, $$licenseContents); } file_put_contents($$licenseFile, $$licenseContents); ' || true)
migrations-docs-enforce-contributing-md-contents: #### Enforce CONTRIBUTING.md contents ##*I*##
($(DOCKER_RUN) php -r '$$contributingFile = "CONTRIBUTING.md"; $$contributingContents = base64_decode("IyBDb250cmlidXRpbmcKClB1bGwgcmVxdWVzdHMgYXJlIGhpZ2hseSBhcHByZWNpYXRlZC4gSGVyZSdzIGEgcXVpY2sgZ3VpZGUuCgpGb3JrLCB0aGVuIGNsb25lIHRoZSByZXBvOgoKICAgIGdpdCBjbG9uZSBnaXRAZ2l0aHViLmNvbTp5b3VyLXVzZXJuYW1lL1tyZXBvXS5naXQKCkluc3RhbGwgZGVwZW5kZW5jaWVzOgoKICAgIG1ha2UgaW5zdGFsbAoKV29yayBvbiB0aGUgY29udHJpYnV0aW9uIGFuZCBjaGVjayBpZiBpdCBwYXNzZXMgYWxsIFFBIGNoZWNrcyB3aXRoOgoKICAgIG1ha2UKCklmIHNvbWUgb2YgdGhlIFBIUFN0YW4gb3Igb3RoZXIgY2hlY2tzIGFyZSB0b28gc3RyaWN0IG9yIGludGltaWRhdGluZyB0aGF0IGlzIGZpbmUsIGZpbmlzaCB3aGF0IHlvdSB3YW50IHRvIGNvbnRyaWJ1dGUgYW5kIEknbGwgaGVscCB5b3Ugd2l0aCB0aG9zZSwgYnV0IHBsZWFzZSBtYWtlIHRoZSBmb2xsb3dpbmcgY29tbWFuZCBwYXNzZXMuIEl0IHJ1bnMgYSBzdWJzZXQgb2YgZXZlcnl0aGluZzoKCiAgICBtYWtlIGNvbnRyaWIKCllvdSBjYW4gbGlzdCBhbGwgdGhlIGNvbnRyaWIgY29tbWFuZHMgd2l0aDoKCiAgICBtYWtlIGhlbHAtY29udHJpYgoKIyMgRG9jdW1lbnRhdGlvbiBRQQoKQ2hhbmdlcyB0byBNYXJrZG93biAoUkVBRE1FLCBDT05UUklCVVRJTkcsIEFHRU5UUywgYW5kIHNpbWlsYXIpIG11c3QgcGFzcyBkb2N1bWVudGF0aW9uI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lvdSdyZSBzdWJtaXR0aW5nLgo="); file_put_contents($$contributingFile, str_replace(["[repo]"], [basename(__DIR__)], $$contributingContents)); ' || true)
migrations-docs-create-documentation-markdownlint-config-if-not-exists: #### Create `etc/qa/documentation.markdownlint-cli2.yaml` when missing ##*I*##
($(DOCKER_RUN) php -r '$$configFile = "etc/qa/documentation.markdownlint-cli2.yaml"; if (file_exists($$configFile)) {exit;} if (!is_dir("etc/qa")) {mkdir("etc/qa", 0777, true);} file_put_contents($$configFile, base64_decode("Z2l0aWdub3JlOiB0cnVlCm5vUHJvZ3Jlc3M6IHRydWUKbm9CYW5uZXI6IHRydWUKZ2xvYnM6CiAgLSAiKiovKi5tZCIKaWdub3JlczoKICAtICJ2YXIvKioiCiAgLSAidmVuZG9yLyoqIgogIC0gIi5naXQvKioiCmNvbmZpZzoKICBNRDAwNDogZmFsc2UKICBNRDAwNzogZmFsc2UKICBNRDAxMjogZmFsc2UKICBNRDAxMzogZmFsc2UKICBNRDAyMjogZmFsc2UKICBNRDAyNTogZmFsc2UKICBNRDAyNjogZmFsc2UKICBNRDAzMjogZmFsc2UKICBNRDAzMzogZmFsc2UKICBNRDA0MDogZmFsc2UKICBNRDA0MTogZmFsc2UK"));' || true)
migrations-docs-create-lychee-config-if-not-exists: #### Create `etc/qa/lychee.toml` when missing ##*I*##
($(DOCKER_RUN) php -r '$$configFile = "etc/qa/lychee.toml"; if (file_exists($$configFile)) {exit;} if (!is_dir("etc/qa")) {mkdir("etc/qa", 0777, true);} file_put_contents($$configFile, base64_decode("dmVyYm9zZSA9ICJ3YXJuIgpub19wcm9ncmVzcyA9IHRydWUKdGltZW91dCA9IDEyMAptYXhfcmV0cmllcyA9IDYKcmV0cnlfd2FpdF90aW1lID0gMwpleGNsdWRlX3BhdGggPSBbIl52YXIvIiwgIl52ZW5kb3IvIiwgIl5cXC5naXQvIl0KCltob3N0cy4iZG9jcy5naXRodWIuY29tIl0KaGVhZGVycyA9IHsgQWNjZXB0LUVuY29kaW5nID0gInpzdGQsIGJyLCBnemlwLCBkZWZsYXRlIiB9Cg=="));' || true)
migrations-docs-prepend-lychee-timeout-if-missing: #### Prepend Lychee timeout 120 to etc/qa/lychee.toml when missing ##*I*##
($(DOCKER_RUN) php -r '$$configFile = "etc/qa/lychee.toml"; $$line = "timeout = 120\n"; if (!file_exists($$configFile)) {exit;} $$content = file_get_contents($$configFile); if (!is_string($$content) || preg_match("/^\s*timeout\s*=/m", $$content)) {exit;} file_put_contents($$configFile, $$line . $$content);' || true)
migrations-docs-prepend-lychee-max-retries-if-missing: #### Prepend Lychee max_retries 6 to etc/qa/lychee.toml when missing ##*I*##
($(DOCKER_RUN) php -r '$$configFile = "etc/qa/lychee.toml"; $$line = "max_retries = 6\n"; if (!file_exists($$configFile)) {exit;} $$content = file_get_contents($$configFile); if (!is_string($$content) || preg_match("/^\s*max_retries\s*=/m", $$content)) {exit;} file_put_contents($$configFile, $$line . $$content);' || true)
migrations-docs-prepend-lychee-retry-wait-time-if-missing: #### Prepend Lychee retry_wait_time 3 to etc/qa/lychee.toml when missing ##*I*##
($(DOCKER_RUN) php -r '$$configFile = "etc/qa/lychee.toml"; $$line = "retry_wait_time = 3\n"; if (!file_exists($$configFile)) {exit;} $$content = file_get_contents($$configFile); if (!is_string($$content) || preg_match("/^\s*retry_wait_time\s*=/m", $$content)) {exit;} file_put_contents($$configFile, $$line . $$content);' || true)
migrations-docs-enforce-cspell-config-contents: #### Enforce `etc/qa/cspell.json` contents ##*I*##
($(DOCKER_RUN) php -r '$$configFile = "etc/qa/cspell.json"; if (!is_dir("etc/qa")) {mkdir("etc/qa", 0777, true);} file_put_contents($$configFile, base64_decode("ewogICAgInZlcnNpb24iOiAiMC4yIiwKICAgICJsYW5ndWFnZSI6ICJlbiIsCiAgICAiYWxsb3dDb21wb3VuZFdvcmRzIjogdHJ1ZSwKICAgICJpZ25vcmVQYXRocyI6IFsKICAgICAgICAidmFyLyoqIiwKICAgICAgICAidmVuZG9yLyoqIiwKICAgICAgICAiLmdpdC8qKiIsCiAgICAgICAgIi5pZGVhLyoqIiwKICAgICAgICAiLmhlbG0vKioiLAogICAgICAgICIudGVycmFmb3JtLyoqIgogICAgXSwKICAgICJ3b3JkcyI6IFsKICAgICAgICAiQWlUZWxscyIsCiAgICAgICAgIkFzeW5jIiwKICAgICAgICAiQ1NwZWxsIiwKICAgICAgICAiQ2Vlcy1KYW4iLAogICAgICAgICJDb21wb3NlciIsCiAgICAgICAgIkRpYXRheGlzIiwKICAgICAgICAiRmlnbGV0IiwKICAgICAgICAiR0hBIiwKICAgICAgICAiR2l0SHViIiwKICAgICAgICAiSW5mZWN0aW9uUEhQIiwKICAgICAgICAiS2lld2lldCIsCiAgICAgICAgIk1TSSIsCiAgICAgICAgIk1ha2VmaWxlIiwKICAgICAgICAiTWFrZWZpbGVzIiwKICAgICAgICAiTWFtbWF0dXMiLAogICAgICAgICJNYW1tYXR1c1BIUCIsCiAgICAgICAgIk1vbm9sb2ciLAogICAgICAgICJOVFMiLAogICAgICAgICJPVEVMIiwKICAgICAgICAiUEhQQ1MiLAogICAgICAgICJQSFBTdGFuIiwKICAgICAgICAiUEhQVW5pdCIsCiAgICAgICAgIlBTUiIsCiAgICAgICAgIlBhY2thZ2lzdCIsCiAgICAgICAgIlJlbm92YXRlIiwKICAgICAgICAiUmV0cmlhYmxlIiwKICAgICAgICAiUm9hdmUiLAogICAgICAgICJSeFBIUCIsCiAgICAgICAgIlZhbGUiLAogICAgICAgICJXU0wiLAogICAgICAgICJXeXJpSGF4aW11cyIsCiAgICAgICAgIlpUUyIsCiAgICAgICAgImJhY2t0aWNrIiwKICAgICAgICAiYm95c2NvdXQiLAogICAgICAgICJjb2Rlc3BlbGwiLAogICAgICAgICJjb25maWciLAogICAgICAgICJjb25maWdzIiwKICAgICAgICAiZGF0YXByb3ZpZGVyIiwKICAgICAgICAiZGF0YXByb3ZpZGVycyIsCiAgICAgICAgImZyb250bWF0dGVyIiwKICAgICAgICAiZ2hjciIsCiAgICAgICAgImhlYWx0aHoiLAogICAgICAgICJseWNoZWUiLAogICAgICAgICJseWNoZWV2ZXJzZSIsCiAgICAgICAgIm1ha2VmaWxlcyIsCiAgICAgICAgIm1hcmtkb3dubGludCIsCiAgICAgICAgInBocHN0YW4iLAogICAgICAgICJwaHB1bml0IiwKICAgICAgICAicmVwbyIsCiAgICAgICAgInN1YmFnZW50IiwKICAgICAgICAic3ViYWdlbnRzIiwKICAgICAgICAic3VibGljZW5zZSIsCiAgICAgICAgInZob3N0cyIsCiAgICAgICAgInd5cmloYXhpbXVzIiwKICAgICAgICAid3lyaWhheGltdXNuZXQiCiAgICBdCn0K"));' || true)
migrations-docs-enforce-vale-config-contents: #### Enforce `etc/qa/vale.ini` contents ##*I*##
($(DOCKER_RUN) php -r '$$configFile = "etc/qa/vale.ini"; if (!is_dir("etc/qa")) {mkdir("etc/qa", 0777, true);} file_put_contents($$configFile, base64_decode("U3R5bGVzUGF0aCA9IHZhbGUvc3R5bGVzCk1pbkFsZXJ0TGV2ZWwgPSB3YXJuaW5nClZvY2FiID0gV3lyaUhheGltdXMKUGFja2FnZXMgPSBodHRwczovL2dpdGh1Yi5jb20vamRrYXRvL2RpYXRheGlzL3JlbGVhc2VzL2Rvd25sb2FkL3YwLjEuMC9EaWF0YXhpcy56aXAsIFwKICAgICAgICAgICBodHRwczovL2dpdGh1Yi5jb20vdmFsZS1jbGkvd3JpdGUtZ29vZC9yZWxlYXNlcy9kb3dubG9hZC92MC40LjEvd3JpdGUtZ29vZC56aXAsIFwKICAgICAgICAgICBodHRwczovL2dpdGh1Yi5jb20vdmFsZS1jbGkvcmVhZGFiaWxpdHkvcmVsZWFzZXMvZG93bmxvYWQvdjAuMi4wL1JlYWRhYmlsaXR5LnppcCwgXAogICAgICAgICAgIGh0dHBzOi8vZ2l0aHViLmNvbS92YWxlLWNsaS9wcm9zZWxpbnQvcmVsZWFzZXMvZG93bmxvYWQvdjAuMy40L3Byb3NlbGludC56aXAsIFwKICAgICAgICAgICBodHRwcz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0eVVubGlrZWx5ID0gTk8KSG93VG8uU3RlcHMgPSBzdWdnZXN0aW9uCkhvd1RvLk9wZW5pbmcgPSBzdWdnZXN0aW9uCgpbUkVBRE1FLm1kXQpCYXNlZE9uU3R5bGVzID0gVmFsZSwgd3JpdGUtZ29vZCwgUmVhZGFiaWxpdHksIHByb3NlbGludCwgYWxleCwgbmVpZ2hib3IsIEExMXksIEFpVGVsbHMsIEV4cGxhbmF0aW9uCgpbQ09OVFJJQlVUSU5HLm1kXQpCYXNlZE9uU3R5bGVzID0gVmFsZSwgd3JpdGUtZ29vZCwgUmVhZGFiaWxpdHksIHByb3NlbGludCwgYWxleCwgbmVpZ2hib3IsIEExMXksIEFpVGVsbHMsIEhvd1RvCgpbZXRjL2FpLyoqLm1kXQpCYXNlZE9uU3R5bGVzID0gVmFsZSwgd3JpdGUtZ29vZCwgUmVhZGFiaWxpdHksIHByb3NlbGludCwgYWxleCwgbmVpZ2hib3IsIEExMXksIEFpVGVsbHMsIFJlZmVyZW5jZQo="));' || true)
migrations-docs-enforce-vale-vocab-contents: #### Enforce `etc/qa/vale-vocab.txt` contents ##*I*##
($(DOCKER_RUN) php -r '$$configFile = "etc/qa/vale-vocab.txt"; if (!is_dir("etc/qa")) {mkdir("etc/qa", 0777, true);} file_put_contents($$configFile, base64_decode("QWlUZWxscwpBc3luYwpDU3BlbGwKQ2Vlcy1KYW4KQ29tcG9zZXIKRGlhdGF4aXMKRmlnbGV0CkdIQQpHaXRIdWIKSW5mZWN0aW9uUEhQCktpZXdpZXQKTVNJCk1ha2VmaWxlCk1ha2VmaWxlcwpNYW1tYXR1cwpNYW1tYXR1c1BIUApNb25vbG9nCk5UUwpPVEVMClBIUENTClBIUFN0YW4KUEhQVW5pdApQU1IKUGFja2FnaXN0ClJlbm92YXRlClJldHJpYWJsZQpSb2F2ZQpSeFBIUApWYWxlCldTTApXeXJpSGF4aW11cwpaVFMKYmFja3RpY2sKYm95c2NvdXQKY29kZXNwZWxsCmNvbmZpZwpjb25maWdzCmRhdGFwcm92aWRlcgpkYXRhcHJvdmlkZXJzCmZyb250bWF0dGVyCmdoY3IKaGVhbHRoegpseWNoZWUKbHljaGVldmVyc2UKbWFrZWZpbGVzCm1hcmtkb3dubGludApwaHBzdGFuCnBocHVuaXQKcmVwbwpzdWJhZ2VudApzdWJhZ2VudHMKc3VibGljZW5zZQp2aG9zdHMKd3lyaWhheGltdXMKd3lyaWhheGltdXNuZXQK"));' || true)
migrations-docs-enrich-qa-wordlists-with-php-symbols: #### Merge PHP symbol and Composer package names into etc/qa documentation wordlists ##*I*##
($(DOCKER_RUN) php -r '$$autoload = getcwd() . "/vendor/autoload.php"; if (!is_file($$autoload)) {exit;} require $$autoload; \WyriHaximus\Makefiles\Documentation\WordlistDocumentationConfigSync::enrichQaWordlistsWithPhpSymbols(getcwd());' || true)
migrations-docs-create-vale-vocab-symlink-if-not-exists: #### Create WyriHaximus Vale vocab symlink when missing ##*I*##
($(DOCKER_RUN) php -r '$$link = "etc/qa/vale/styles/config/vocabularies/WyriHaximus/accept.txt"; if (is_link($$link)) {exit;} if (!is_dir("etc/qa")) {mkdir("etc/qa", 0777, true);} if (!is_dir(dirname($$link))) {mkdir(dirname($$link), 0777, true);} symlink("../../../../../vale-vocab.txt", $$link);' || true)
migrations-php-make-sure-var-exists: #### Make sure `var/` exists ##*I*##
($(DOCKER_RUN) mkdir var || true)
migrations-php-make-sure-var-gitkeep-exists: #### Make sure `var/.gitkeep` exists ##*I*##
($(DOCKER_RUN) touch var/.gitkeep || true)
migrations-php-make-sure-etc-exists: #### Make sure `etc/` exists ##*I*##
($(DOCKER_RUN) mkdir etc || true)
migrations-php-make-sure-etc-ci-exists: #### Make sure `etc/ci/` exists ##*I*##
($(DOCKER_RUN) mkdir etc/ci || true)
migrations-php-make-sure-etc-qa-exists: #### Make sure `etc/qa/` exists ##*I*##
($(DOCKER_RUN) mkdir etc/qa || true)
migrations-php-move-psalm-xml-config-to-etc: #### Move `psalm.xml` to `etc/qa/psalm.xml` ##*I*##
($(DOCKER_RUN) mv psalm.xml etc/qa/psalm.xml || true)
migrations-php-remove-psalm-xml-config: #### Make sure we remove `etc/qa/psalm.xml` ##*I*##
($(DOCKER_RUN) rm etc/qa/psalm.xml || true)
migrations-php-remove-old-phpunit-xml-dist-config: #### Make sure we remove `phpunit.xml.dist` ##*I*##
($(DOCKER_RUN) rm phpunit.xml.dist || true)
migrations-php-remove-old-phpunit-xml-config: #### Make sure we remove `phpunit.xml` ##*I*##
($(DOCKER_RUN) rm phpunit.xml || true)
migrations-php-remove-old-php-cs-fiver-config: #### Make sure we remove `.php_cs` ##*I*##
($(DOCKER_RUN) rm .php_cs || true)
migrations-php-remove-old-scrutinizer-yml-config: #### Make sure we remove `.scrutinizer.yml` ##*I*##
($(DOCKER_RUN) rm .scrutinizer.yml || true)
migrations-php-remove-old-appveyor-yml-config: #### Make sure we remove `appveyor.yml` ##*I*##
($(DOCKER_RUN) rm appveyor.yml || true)
migrations-php-remove-old-travis-yml-config: #### Make sure we remove `.travis.yml` ##*I*##
($(DOCKER_RUN) rm .travis.yml || true)
migrations-php-ensure-etc-ci-markdown-link-checker-json-exists: #### Make sure we have `etc/ci/markdown-link-checker.json` ##*I*##
($(DOCKER_RUN) php -r '$$markdownLinkCheckerFile = "etc/ci/markdown-link-checker.json"; $$json = json_decode("{\"httpHeaders\": [{\"urls\": [\"https://docs.github.com/\"],\"headers\": {\"Accept-Encoding\": \"zstd, br, gzip, deflate\"}}]}"); if (file_exists($$markdownLinkCheckerFile)) {exit;} file_put_contents($$markdownLinkCheckerFile, json_encode($$json, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . "\r\n");' || true)
migrations-php-ensure-etc-qa-coverage-guard-php-exists: #### Make sure we have `etc/qa/coverage-guard.php` ##*I*##
($(DOCKER_RUN) php -r '$$coverageGuardFile = "etc/qa/coverage-guard.php"; $$coverageGuardConfig = base64_decode("PD9waHAKCmRlY2xhcmUoc3RyaWN0X3R5cGVzPTEpOwoKdXNlIFNoaXBNb25rXENvdmVyYWdlR3VhcmRcQ29uZmlnOwp1c2UgU2hpcE1vbmtcQ292ZXJhZ2VHdWFyZFxFeGNsdWRlclxJZ25vcmVUaHJvd05ld0V4Y2VwdGlvbkxpbmVFeGNsdWRlcjsKdXNlIFNoaXBNb25rXENvdmVyYWdlR3VhcmRcUnVsZVxFbmZvcmNlQ292ZXJhZ2VGb3JNZXRob2RzUnVsZTsKCnJldHVybiAoc3RhdGljIGZ1bmN0aW9uICgpOiBDb25maWcgewogICAgJGNvbmZpZyA9IG5ldyBDb25maWcoKTsKCiAgICAkY29uZmlnLT5hZGRSdWxlKG5ldyBFbmZvcmNlQ292ZXJhZ2VGb3JNZXRob2RzUnVsZSgKICAgICAgICByZXF1aXJlZENvdmVyYWdlUGVyY2VudGFnZTogODAsCiAgICAgICAgbWluRXhlY3V0YWJsZUxpbmVzOiAxLAogICAgKSk7CgogICAgJGNvbmZpZy0+YWRkRXhlY3V0YWJsZUxpbmVFeGNsdWRlcihuZXcgSWdub3JlVGhyb3dOZXdFeGNlcHRpb25MaW5lRXhjbHVkZXIoWwogICAgICAgIFJ1bnRpbWVFeGNlcHRpb246OmNsYXNzLAogICAgXSkpOwoKICAgIHJldHVybiAkY29uZmlnOwp9KSgpOwo="); if (file_exists($$coverageGuardFile)) {exit;} file_put_contents($$coverageGuardFile, $$coverageGuardConfig);' || true)
migrations-php-ensure-etc-qa-zzz-disable-otel-attr-hooks-ini-exists: #### Make sure we have `etc/qa/zzz_disable_otel_attr_hooks.ini` ##*I*##
($(DOCKER_RUN) php -r 'if (in_array("opentelemetry-instrumentation", ["code-style","composer-dependency-checkers","linux","static-analysis","unit-tests","zts"])) {exit;} $$otelAttrHooksIniFile = "etc/qa/zzz_disable_otel_attr_hooks.ini"; $$otelAttrHooksIniContents = base64_decode("OyBBdm9pZCB6ZW5kX21tX2hlYXAgY29ycnVwdGlvbiB3aXRoICNbV2l0aFNwYW5dIChtYW1tYXR1cyB1c2VzIGhvb2soKSBpbnN0ZWFkKS4KOyBTZWU6IGh0dHBzOi8vZ2l0aHViLmNvbS9vcGVuLXRlbGVtZXRyeS9vcGVudGVsZW1ldHJ5LXBocC1pbnN0cnVtZW50YXRpb24vcHVsbC8zMjEKOyBBbHJlYWR5IHNvbHZlZDogaHR0cHM6Ly9naXRodWIuY29tL29wZW4tdGVsZW1ldHJ5L29wZW50ZWxlbWV0cnktcGhwLWluc3RydW1lbnRhdGlvbi9wdWxsLzMxMwpvcGVudGVsZW1ldHJ5LmF0dHJfaG9va3NfZW5hYmxlZD1PZmYK"); if (file_exists($$otelAttrHooksIniFile)) {exit;} file_put_contents($$otelAttrHooksIniFile, $$otelAttrHooksIniContents);' || true)
migrations-php-move-infection-config-to-etc: #### Move `infection.json.dist` to `etc/qa/infection.json5` ##*I*##
($(DOCKER_RUN) mv infection.json.dist etc/qa/infection.json5 || true)
migrations-php-infection-create-config-if-not-exists: #### Create Infection config file if it doesn't exists at `etc/qa/infection.json5` ##*I*##
($(DOCKER_RUN) php -r '$$infectionFile = "etc/qa/infection.json5"; $$infectionConfig = base64_decode("ewogICAgInRocmVhZHMiOiA2NCwKICAgICJ0aW1lb3V0IjogMTIwLAogICAgInNvdXJjZSI6IHsKICAgICAgICAiZGlyZWN0b3JpZXMiOiBbCiAgICAgICAgICAgICJzcmMiCiAgICAgICAgXQogICAgfSwKICAgICJsb2dzIjogewogICAgICAgICJ0ZXh0IjogIi4uLy4uL3Zhci9pbmZlY3Rpb24ubG9nIiwKICAgICAgICAic3VtbWFyeSI6ICIuLi8uLi92YXIvaW5mZWN0aW9uLXN1bW1hcnkubG9nIiwKICAgICAgICAianNvbiI6ICIuLi8uLi92YXIvaW5mZWN0aW9uLmpzb24iLAogICAgICAgICJwZXJNdXRhdG9yIjogIi4uLy4uL3Zhci9pbmZlY3Rpb24tcGVyLW11dGF0b3IubWQiLAogICAgICAgICJnaXRodWIiOiB0cnVlCiAgICB9LAogICAgIm1pbk1zaSI6IDEwMCwKICAgICJtaW5Db3ZlcmVkTXNpIjogMTAwLAogICAgImlnbm9yZU1zaVdpdGhOb011dGF0aW9ucyI6IHRydWUsCiAgICAibXV0YXRvcnMiOiB7CiAgICAgICAgIkBkZWZhdWx0IjogdHJ1ZQogICAgfQp9Cg=="); if (file_exists($$infectionFile)) {exit;} file_put_contents($$infectionFile, $$infectionConfig);' || true)
migrations-php-remove-phpunit-config-dir-from-infection: #### Drop XXX from `etc/qa/infection.json5` ##*I*##
($(DOCKER_RUN) php -r '$$infectionFile = "etc/qa/infection.json5"; if (!file_exists($$infectionFile)) {exit;} $$json = json_decode(file_get_contents($$infectionFile), true); if (!is_array($$json)) {exit;} if (!array_key_exists("phpUnit", $$json)) {exit;} unset($$json["phpUnit"]); file_put_contents($$infectionFile, json_encode($$json, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . "\r\n");' || true)
migrations-php-fix-logs-relative-paths-for-infection: #### Fix logs paths in `etc/qa/infection.json5` ##*I*##
($(DOCKER_RUN) php -r '$$infectionFile = "etc/qa/infection.json5"; if (!file_exists($$infectionFile)) {exit;} $$json = json_decode(file_get_contents($$infectionFile), true); if (!is_array($$json)) {exit;} if (!array_key_exists("logs", $$json)) {exit;} foreach ($$json["logs"] as $$logsKey => $$logsPath) { if (is_string($$json["logs"][$$logsKey]) && str_starts_with($$json["logs"][$$logsKey], "./var/infection")) { $$json["logs"][$$logsKey] = str_replace("./var/infection", "../../var/infection", $$json["logs"][$$logsKey]); } } file_put_contents($$infectionFile, json_encode($$json, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . "\r\n");' || true)
migrations-php-infection-ensure-log-text-has-the-correct-path: #### Ensure infection's log.text has config directive has the correct path ##*I*##
($(DOCKER_RUN) php -r '$$infectionFile = "etc/qa/infection.json5"; if (!file_exists($$infectionFile)) {exit;} $$json = json_decode(file_get_contents($$infectionFile), true); if (!is_array($$json)) {exit;} if (!array_key_exists("logs", $$json)) { $$json["logs"] = []; } $$json["logs"]["text"] = "../../var/infection.log"; file_put_contents($$infectionFile, json_encode($$json, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . "\r\n");' || true)
migrations-php-infection-ensure-log-summary-has-the-correct-path: #### Ensure infection's log.summary has config directive has the correct path ##*I*##
($(DOCKER_RUN) php -r '$$infectionFile = "etc/qa/infection.json5"; if (!file_exists($$infectionFile)) {exit;} $$json = json_decode(file_get_contents($$infectionFile), true); if (!is_array($$json)) {exit;} if (!array_key_exists("logs", $$json)) { $$json["logs"] = []; } $$json["logs"]["summary"] = "../../var/infection-summary.log"; file_put_contents($$infectionFile, json_encode($$json, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . "\r\n");' || true)
migrations-php-infection-ensure-log-json-has-the-correct-path: #### Ensure infection's log.json has config directive has the correct path ##*I*##
($(DOCKER_RUN) php -r '$$infectionFile = "etc/qa/infection.json5"; if (!file_exists($$infectionFile)) {exit;} $$json = json_decode(file_get_contents($$infectionFile), true); if (!is_array($$json)) {exit;} if (!array_key_exists("logs", $$json)) { $$json["logs"] = []; } $$json["logs"]["json"] = "../../var/infection.json"; file_put_contents($$infectionFile, json_encode($$json, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . "\r\n");' || true)
migrations-php-infection-ensure-log-per-mutator-has-the-correct-path: #### Ensure infection's log.perMutator has config directive has the correct path ##*I*##
($(DOCKER_RUN) php -r '$$infectionFile = "etc/qa/infection.json5"; if (!file_exists($$infectionFile)) {exit;} $$json = json_decode(file_get_contents($$infectionFile), true); if (!is_array($$json)) {exit;} if (!array_key_exists("logs", $$json)) { $$json["logs"] = []; } $$json["logs"]["perMutator"] = "../../var/infection-per-mutator.md"; file_put_contents($$infectionFile, json_encode($$json, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . "\r\n");' || true)
migrations-php-add-github-true-to-for-infection: #### Ensure we configure infection to emit logs to GitHub in `etc/qa/infection.json5` ##*I*##
($(DOCKER_RUN) php -r '$$infectionFile = "etc/qa/infection.json5"; if (!file_exists($$infectionFile)) {exit;} $$json = json_decode(file_get_contents($$infectionFile), true); if (!is_array($$json)) {exit;} if (!array_key_exists("logs", $$json)) {exit;} if (array_key_exists("github", $$json["logs"])) {exit;} $$json["logs"]["github"] = true; file_put_contents($$infectionFile, json_encode($$json, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . "\r\n");' || true)
migrations-php-infection-add-threads-64-to-config: #### Ensure `threads` is set to `64` in `etc/qa/infection.json5` ##*I*##
($(DOCKER_RUN) php -r '$$infectionFile = "etc/qa/infection.json5"; if (!file_exists($$infectionFile)) {exit;} $$json = json_decode(file_get_contents($$infectionFile), true); if (!is_array($$json)) {exit;} if (array_key_exists("threads", $$json)) {exit;} $$json["threads"] = 64; file_put_contents($$infectionFile, json_encode($$json, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . "\r\n");' || true)
migrations-php-make-paths-compatible-with-infection-0-32: #### We update path to be relative to `etc/qa/infection.json5` as of 0.32 ##*I*##
($(DOCKER_RUN) php -r '$$infectionFile = "etc/qa/infection.json5"; if (!file_exists($$infectionFile)) {exit;} $$json = json_decode(file_get_contents($$infectionFile), true); if (!is_array($$json)) {exit;} if (!array_key_exists("source", $$json)) {exit;} if (!array_key_exists("directories", $$json["source"])) {exit;} foreach ($$json["source"]["directories"] as $$key => $$value) { if (!str_starts_with($$value, "../../")) {$$json["source"]["directories"][$$key] = "../../" . $$value;} } file_put_contents($$infectionFile, json_encode($$json, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . "\r\n");' || true)
migrations-php-set-phpunit-ensure-config-file-exists: #### Make sure we have a PHPUnit config file at `etc/qa/phpunit.xml` ##*I*##
($(DOCKER_RUN) php -r '$$phpUnitConfigFIle = "etc/qa/phpunit.xml"; if (file_exists($$phpUnitConfigFIle)) {exit;} file_put_contents($$phpUnitConfigFIle, base64_decode("PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHBocHVuaXQKIC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V0RmlsZT0iLi4vLi4vdmFyL3Rlc3RzL3VuaXQvY2xvdmVyLWNvdmVyYWdlLnhtbCIvPgogICAgICAgICAgICA8aHRtbCBvdXRwdXREaXJlY3Rvcnk9Ii4uLy4uL3Zhci90ZXN0cy91bml0L2NvdmVyYWdlLWh0bWwiLz4KICAgICAgICA8L3JlcG9ydD4KICAgIDwvY292ZXJhZ2U+CiAgICA8ZXh0ZW5zaW9ucz4KICAgICAgICA8Ym9vdHN0cmFwIGNsYXNzPSJFcmdlYm5pc1xQSFBVbml0XFNsb3dUZXN0RGV0ZWN0b3JcRXh0ZW5zaW9uIi8+CiAgICA8L2V4dGVuc2lvbnM+CjwvcGhwdW5pdD4K"));' || true)
migrations-php-set-phpunit-xsd-path-to-local: #### Ensure that the PHPUnit XDS referred in `etc/qa/phpunit.xml` points to `vendor/phpunit/phpunit/phpunit.xsd` so we don't go over the network ##*I*##
($(DOCKER_RUN) php -r '$$phpUnitConfigFIle = "etc/qa/phpunit.xml"; if (!file_exists($$phpUnitConfigFIle)) {exit;} $$xml = file_get_contents($$phpUnitConfigFIle); if (!is_string($$xml)) {exit;} for ($$major = 0; $$major < 23; $$major++) { for ($$minor = 0; $$minor < 23; $$minor++) { $$xml = str_replace("https://schema.phpunit.de/" . $$major . "." . $$minor . "/phpunit.xsd", "../../vendor/phpunit/phpunit/phpunit.xsd", $$xml); } } file_put_contents($$phpUnitConfigFIle, $$xml);' || true)
migrations-php-set-phpunit-make-sure-we-see-all-the-warnings-deprecations-etc-etc-that-will-make-phpunit-do-a-non-happy-exit: #### Make sure we see all the warnings, deprecations, etc etc that will make PHPunit do a non-happy exit ##*I*##
($(DOCKER_RUN) php -r '$$phpUnitConfigFIle = "etc/qa/phpunit.xml"; if (!file_exists($$phpUnitConfigFIle)) {exit;} $$xml = file_get_contents($$phpUnitConfigFIle); if (!is_string($$xml)) {exit;} $$xml = str_replace(base64_decode("PHBocHVuaXQgeG1sbnM6eHNpPSJodHRwOi8vd3d3LnczLm9yZy8yMDAxL1hNTFNjaGVtYS1pbnN0YW5jZSIgYm9vdHN0cmFwPSIuLi8uLi92ZW5kb3IvYXV0b2xvYWQucGhwIiBjb2xvcnM9InRydWUiIHhzaTpub05hbWVzcGFjZVNjaGVtYUxvY2F0aW9uPSIuLi8uLi92ZW5kb3IvcGhwdW5pdC9waHB1bml0L3BocHVuaXQueHNkIiBjYWNoZURpcmVjdG9yeT0iLi4vLi4vdmFyL3BocHVuaXQvY2FjaGUiPgo="), base64_decode("PHBocHVuaXQKICAgIHhtbG5zOnhzaT0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEtaW5zdGFuY2UiCiAgICBib290c3RyYXA9Ii4uLy4uL3ZlbmRvci9hdXRvbG9hZC5waHAiCiAgICBjb2xvcnM9InRydWUiCiAgICB4c2k6bm9OYW1lc3BhY2VTY2hlbWFMb2NhdGlvbj0iLi4vLi4vdmVuZG9yL3BocHVuaXQvcGhwdW5pdC9waHB1bml0LnhzZCIKICAgIGNhY2hlRGlyZWN0b3J5PSIuLi8uLi92YXIvcGhwdW5pdC9jYWNoZSIKICAgIGRpc3BsYXlEZXRhaWxzT25UZXN0c1RoYXRUcmlnZ2VyRGVwcmVjYXRpb25zPSJ0cnVlIgogICAgZGlzcGxheURldGFpbHNPblRlc3RzVGhhdFRyaWdnZXJFcnJvcnM9InRydWUiCiAgICBkaXNwbGF5RGV0YWlsc09uVGVzdHNUaGF0VHJpZ2dlck5vdGljZXM9InRydWUiCiAgICBkaXNwbGF5RGV0YWlsc09uVGVzdHNUaGF0VHJpZ2dlcldhcm5pbmdzPSJ0cnVlIgogICAgZGlzcGxheURldGFpbHNPblBocHVuaXREZXByZWNhdGlvbnM9InRydWUiCj4K"), $$xml); file_put_contents($$phpUnitConfigFIle, $$xml);' || true)
migrations-php-move-phpstan: #### Move `phpstan.neon` to `etc/qa/phpstan.neon` ##*I*##
($(DOCKER_RUN) mv phpstan.neon etc/qa/phpstan.neon || true)
migrations-php-set-phpstan-ensure-config-file-exists: #### Make sure we have a PHPStan config file at `etc/qa/phpstan.neon` ##*I*##
($(DOCKER_RUN) php -r '$$phpStanConfigFIle = "etc/qa/phpstan.neon"; if (file_exists($$phpStanConfigFIle)) {exit;} file_put_contents($$phpStanConfigFIle, "#parameters:");' || true)
migrations-php-set-phpstan-uncomment-parameters: #### Ensure PHPStan config as parameters not commented out in `etc/qa/phpstan.neon` ##*I*##
($(DOCKER_RUN) php -r '$$phpStanConfigFIle = "etc/qa/phpstan.neon"; if (!file_exists($$phpStanConfigFIle)) {exit;} $$neon = file_get_contents($$phpStanConfigFIle); if (!is_string($$neon)) {exit;} if (!str_starts_with($$neon, "#parameters:")) {exit;} $$neon = str_replace("#parameters:", "parameters:", $$neon); file_put_contents($$phpStanConfigFIle, $$neon);' || true)
migrations-php-set-phpstan-add-parameters-if-it-isnt-present-in-the-config-file: #### Add parameters to PHPStan config file at `etc/qa/phpstan.neon` if it's not present ##*I*##
($(DOCKER_RUN) php -r '$$phpStanConfigFIle = "etc/qa/phpstan.neon"; if (!file_exists($$phpStanConfigFIle)) {exit;} $$neon = file_get_contents($$phpStanConfigFIle); if (!is_string($$neon)) {exit;} if (strpos($$neon, "parameters:") !== false) {exit;} file_put_contents($$phpStanConfigFIle, "parameters:", FILE_APPEND);' || true)
migrations-php-set-phpstan-paths-in-config: #### Ensure PHPStan config has the `etc`, `src`, and (optionally) `tests` paths set in `etc/qa/phpstan.neon` ##*I*##
($(DOCKER_RUN) php -r '$$phpStanConfigFIle = "etc/qa/phpstan.neon"; $$pathsString = "\n\tpaths:\n\t\t- ../../etc\n\t\t- ../../src\n\t\t- ../../tests"; $$pathsStringWithoutTests = "\n\tpaths:\n\t\t- ../../etc\n\t\t- ../../src"; if (!file_exists($$phpStanConfigFIle)) {exit;} $$neon = file_get_contents($$phpStanConfigFIle); if (!is_string($$neon)) {exit;} if (strpos($$neon, $$pathsString) !== false || strpos($$neon, $$pathsStringWithoutTests) !== false) {exit;} $$neon = str_replace("parameters:", "parameters:" . $$pathsString, $$neon); file_put_contents($$phpStanConfigFIle, $$neon);' || true)
migrations-php-set-phpstan-level-max-in-config: #### Ensure PHPStan config has level set to max in `etc/qa/phpstan.neon` ##*I*##
($(DOCKER_RUN) php -r '$$phpStanConfigFIle = "etc/qa/phpstan.neon"; $$levelString = "\n\tlevel: max"; if (!file_exists($$phpStanConfigFIle)) {exit;} $$neon = file_get_contents($$phpStanConfigFIle); if (!is_string($$neon)) {exit;} if (strpos($$neon, $$levelString) !== false) {exit;} $$neon = str_replace("parameters:", "parameters:" . $$levelString, $$neon); file_put_contents($$phpStanConfigFIle, $$neon);' || true)
migrations-php-set-phpstan-resolve-ergebnis-noExtends-classesAllowedToBeExtended: #### Ensure PHPStan config uses ergebnis.noExtends.classesAllowedToBeExtended not ergebnis.classesAllowedToBeExtended ##*I*##
($(DOCKER_RUN) php -r '$$phpStanConfigFIle = "etc/qa/phpstan.neon"; if (!file_exists($$phpStanConfigFIle)) {exit;} $$neon = file_get_contents($$phpStanConfigFIle); if (!is_string($$neon)) {exit;} $$neon = str_replace("\tergebnis:\n\t\tclassesAllowedToBeExtended:\n", "\tergebnis:\n\t\tnoExtends:\n\t\t\tclassesAllowedToBeExtended:\n", $$neon); file_put_contents($$phpStanConfigFIle, $$neon);' || true)
migrations-php-set-phpstan-drop-checkGenericClassInNonGenericObjectType: #### Ensure PHPStan config doesn't contain checkGenericClassInNonGenericObjectType as it's no longer a valid config option ##*I*##
($(DOCKER_RUN) php -r '$$phpStanConfigFIle = "etc/qa/phpstan.neon"; if (!file_exists($$phpStanConfigFIle)) {exit;} $$neon = file_get_contents($$phpStanConfigFIle); if (!is_string($$neon)) {exit;} $$neon = str_replace("\tcheckGenericClassInNonGenericObjectType: false\n", "", $$neon); file_put_contents($$phpStanConfigFIle, $$neon);' || true)
migrations-php-phpstan-add-prefix-for-anything-that-starts-with-vendor-in-a-list: #### PHPStan add `../../` to anything in a list that starts with `vendor` ##*I*##
($(DOCKER_RUN) php -r '$$phpStanConfigFIle = "etc/qa/phpstan.neon"; if (!file_exists($$phpStanConfigFIle)) {exit;} $$neon = file_get_contents($$phpStanConfigFIle); if (!is_string($$neon)) {exit;} $$neon = str_replace("- vendor", "- ../../vendor", $$neon); file_put_contents($$phpStanConfigFIle, $$neon);' || true)
migrations-php-set-phpstan-drop-include-test-utilities-rules: #### Ensure PHPStan config doesn't contain include for `wyrihaximus/async-utilities/rules.neon` as it's now an extension ##*I*##
($(DOCKER_RUN) php -r '$$phpStanConfigFIle = "etc/qa/phpstan.neon"; if (!file_exists($$phpStanConfigFIle)) {exit;} $$neon = file_get_contents($$phpStanConfigFIle); if (!is_string($$neon)) {exit;} $$neon = str_replace("\nincludes:\n\t- ../../vendor/wyrihaximus/test-utilities/rules.neon\n", "", $$neon); file_put_contents($$phpStanConfigFIle, $$neon);' || true)
migrations-php-set-phpstan-drop-include-async-test-utilities-rules: #### Ensure PHPStan config doesn't contain include for `wyrihaximus/async-test-utilities/rules.neon` as it's now an extension ##*I*##
($(DOCKER_RUN) php -r '$$phpStanConfigFIle = "etc/qa/phpstan.neon"; if (!file_exists($$phpStanConfigFIle)) {exit;} $$neon = file_get_contents($$phpStanConfigFIle); if (!is_string($$neon)) {exit;} $$neon = str_replace("\nincludes:\n\t- ../../vendor/wyrihaximus/async-test-utilities/rules.neon", "", $$neon); file_put_contents($$phpStanConfigFIle, $$neon);' || true)
migrations-php-set-rector-create-config-if-not-exists: #### Create Rector config file if it doesn't exists at `etc/qa/rector.php` ##*I*##
($(DOCKER_RUN) php -r '$$rectorConfigFile = "etc/qa/rector.php"; $$defaultRectorConfig = base64_decode("PD9waHAKCmRlY2xhcmUoc3RyaWN0X3R5cGVzPTEpOwoKdXNlIFd5cmlIYXhpbXVzXFJlY3RvclBIUFxSZWN0b3JDb25maWc7CgpyZXR1cm4gUmVjdG9yQ29uZmlnOjpjb25maWd1cmUoZGlybmFtZShfX0RJUl9fLCAyKSk7Cg=="); if (file_exists($$rectorConfigFile)) {exit;} file_put_contents($$rectorConfigFile, $$defaultRectorConfig);' || true)
migrations-php-update-rector-from-testutilities-to-rectorphp-namespace-for-rector-config: #### Update RectorPHP config file `etc/qa/rector.php` from `TestUtilities` to `RectorPHP` namespace ##*I*##
($(DOCKER_RUN) php -r '$$rectorConfigFile = "etc/qa/rector.php"; if (!file_exists($$rectorConfigFile)) {exit;} file_put_contents($$rectorConfigFile, str_replace("use WyriHaximus\\TestUtilities\\RectorConfig;", "use WyriHaximus\\RectorPHP\\RectorConfig;", file_get_contents($$rectorConfigFile)));' || true)
migrations-php-composer-unused-create-config-if-not-exists: #### Create Composer Unused config file if it doesn't exists at `etc/qa/composer-unused.php` ##*I*##
($(DOCKER_RUN) php -r '$$composerUnusedConfigFile = "etc/qa/composer-unused.php"; $$composerUnusedConfig = "<?php declare(strict_types=1); use ComposerUnused\ComposerUnused\Configuration\Configuration; return static function (Configuration \$$config): Configuration {return \$$config;};"; if (file_exists($$composerUnusedConfigFile)) {exit;} file_put_contents($$composerUnusedConfigFile, $$composerUnusedConfig);' || true)
migrations-php-composer-unused-drop-commented-out-line-scattered-across-my-repos: #### Update Composer Unused config file dropping a commented out line that is scattered cross my repos ##*I*##
($(DOCKER_RUN) php -r '$$composerUnusedConfigFile = "etc/qa/composer-unused.php"; if (!file_exists($$composerUnusedConfigFile)) {exit;} $$php = file_get_contents($$composerUnusedConfigFile); if (!is_string($$php)) {exit;} $$php = str_replace(base64_decode("Ly8gICAgICAgIC0+YWRkTmFtZWRGaWx0ZXIoTmFtZWRGaWx0ZXI6OmZyb21TdHJpbmcoJ3d5cmloYXhpbXVzL3BocHN0YW4tcnVsZXMtd3JhcHBlcicpKTsK"), "", $$php); file_put_contents($$composerUnusedConfigFile, $$php);' || true)
migrations-php-migrate-composer-unused-from-extra-unused-to-etc-qa-composer-used-php: #### Migrate Compose Unused from `composer.json` extra unused to `etc/qa/composer-unused.php` ##*I*##
($(DOCKER_RUN) php -r '$$composerJsonFile = "composer.json"; $$composerUnusedFile = "etc/qa/composer-unused.php"; if (!file_exists($$composerJsonFile)) {exit;} $$json = json_decode(file_get_contents($$composerJsonFile), true); if (!is_array($$json)) {exit;} if (!array_key_exists("extra", $$json)) {exit;} if (!array_key_exists("unused", $$json["extra"])) {exit;} foreach ($$json["extra"]["unused"] as $$unusedPAckage) { file_put_contents($$composerUnusedFile, str_replace(base64_decode("cmV0dXJuIHN0YXRpYyBmbiAoQ29uZmlndXJhdGlvbiAkY29uZmlnKTogQ29uZmlndXJhdGlvbiA9PiAkY29uZmlnCg=="), base64_decode("cmV0dXJuIHN0YXRpYyBmbiAoQ29uZmlndXJhdGlvbiAkY29uZmlnKTogQ29uZmlndXJhdGlvbiA9PiAkY29uZmlnCg==") . "\r\n" . base64_decode("ICAgIC0+YWRkTmFtZWRGaWx0ZXIoXENvbXBvc2VyVW51c2VkXENvbXBvc2VyVW51c2VkXENvbmZpZ3VyYXRpb25cTmFtZWRGaWx0ZXI6OmZyb21TdHJpbmcoJwo=") . $$unusedPAckage . base64_decode("Jykp"), file_get_contents($$composerUnusedFile))); } unset($$json["extra"]["unused"]); file_put_contents($$composerJsonFile, json_encode($$json, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . "\r\n");' || true)
migrations-php-move-phpcs: #### Move `phpcs.xml.dist` to `etc/qa/phpcs.xml` ##*I*##
($(DOCKER_RUN) mv phpcs.xml.dist etc/qa/phpcs.xml || true)
migrations-php-move-phpcs-not-dist: #### Move `phpcs.xml` to `etc/qa/phpcs.xml` ##*I*##
($(DOCKER_RUN) mv phpcs.xml etc/qa/phpcs.xml || true)
migrations-php-set-phpcs-ensure-config-file-exists: #### Make sure we have a PHPCS config file at `etc/qa/phpcs.xml` ##*I*##
($(DOCKER_RUN) php -r '$$phpcsConfigFile = "etc/qa/phpcs.xml"; if (file_exists($$phpcsConfigFile)) {exit;} file_put_contents($$phpcsConfigFile, base64_decode("PD94bWwgdmVyc2lvbj0iMS4wIj8+CjxydWxlc2V0PgogICAgPGFyZyBuYW1lPSJiYXNlcGF0aCIgdmFsdWU9Ii4uLy4uLyIgLz4KICAgIDxhcmcgbmFtZT0iZXh0ZW5zaW9ucyIgdmFsdWU9InBocCIgLz4gPCEtLSB3aGljaCBleHRlbnNpb25zIHRvIGxvb2sgZm9yIC0tPgogICAgPGFyZyBuYW1lPSJjb2xvcnMiIC8+CiAgICA8YXJnIG5hbWU9ImNhY2hlIiB2YWx1ZT0iLi4vLi4vdmFyLy5waHBjcy5jYWNoZSIgLz4gPCEtLSBjYWNoZSB0aGUgcmVzdWx0cyBhbmQgZG9uJ3QgY29tbWl0IHRoZW0gLS0+CiAgICA8YXJnIHZhbHVlPSJucCIgLz4gPCEtLSBuID0gaWdub3JlIHdhcm5pbmdzLCBwID0gc2hvdyBwcm9ncmVzcyAtLT4KCiAgICA8ZmlsZT4uLi8uLi9ldGM8L2ZpbGU+CiAgICA8ZmlsZT4uLi8uLi9zcmM8L2ZpbGU+CiAgICA8ZmlsZT4uLi8uLi90ZXN0czwvZmlsZT4KCiAgICA8cnVsZSByZWY9Ild5cmlIYXhpbXVzLU9TUyIgLz4KPC9ydWxlc2V0Pgo="));' || true)
migrations-php-phpcs-make-basepath-is-correct-relatively: #### Make sure PHPCS base path is has `../../` and not `.` ##*I*##
($(DOCKER_RUN) php -r '$$phpcsConfigFile = "etc/qa/phpcs.xml"; if (!file_exists($$phpcsConfigFile)) {exit;} $$xml = file_get_contents($$phpcsConfigFile); if (!is_string($$xml)) {exit;} $$xml = str_replace("<arg name=\"basepath\" value=\".\" />", "<arg name=\"basepath\" value=\"../../\" />", $$xml); file_put_contents($$phpcsConfigFile, $$xml);' || true)
migrations-php-phpcs-make-cache-is-correct-relatively: #### Make sure PHPCS cache path is has `../../var/.phpcs.cache` and not `.phpcs.cache` ##*I*##
($(DOCKER_RUN) php -r '$$phpcsConfigFile = "etc/qa/phpcs.xml"; if (!file_exists($$phpcsConfigFile)) {exit;} $$xml = file_get_contents($$phpcsConfigFile); if (!is_string($$xml)) {exit;} $$xml = str_replace("<arg name=\"cache\" value=\".phpcs.cache\" />", "<arg name=\"cache\" value=\"../../var/.phpcs.cache\" />", $$xml); file_put_contents($$phpcsConfigFile, $$xml);' || true)
migrations-php-phpcs-make-sure-config-has-correct-relative-path-for-etc: #### Make sure PHPCS has `../../` prefixing `etc/` to ensure correct relative path ##*I*##
($(DOCKER_RUN) php -r '$$phpcsConfigFile = "etc/qa/phpcs.xml"; if (!file_exists($$phpcsConfigFile)) {exit;} $$xml = file_get_contents($$phpcsConfigFile); if (!is_string($$xml)) {exit;} $$xml = str_replace("<file>etc</file>", "<file>../../etc/</file>", $$xml); file_put_contents($$phpcsConfigFile, $$xml);' || true)
migrations-php-phpcs-make-sure-etc-has-no-trailing-slash: #### Make sure PHPCS has no tailing `/` on `etc` ##*I*##
($(DOCKER_RUN) php -r '$$phpcsConfigFile = "etc/qa/phpcs.xml"; if (!file_exists($$phpcsConfigFile)) {exit;} $$xml = file_get_contents($$phpcsConfigFile); if (!is_string($$xml)) {exit;} $$xml = str_replace("<file>../../etc/</file>", "<file>../../etc</file>", $$xml); file_put_contents($$phpcsConfigFile, $$xml);' || true)
migrations-php-phpcs-make-sure-config-has-correct-relative-path-for-src: #### Make sure PHPCS has `../../` prefixing `src/` to ensure correct relative path ##*I*##
($(DOCKER_RUN) php -r '$$phpcsConfigFile = "etc/qa/phpcs.xml"; if (!file_exists($$phpcsConfigFile)) {exit;} $$xml = file_get_contents($$phpcsConfigFile); if (!is_string($$xml)) {exit;} $$xml = str_replace("<file>src</file>", "<file>../../src/</file>", $$xml); file_put_contents($$phpcsConfigFile, $$xml);' || true)
migrations-php-phpcs-make-sure-src-has-no-trailing-slash: #### Make sure PHPCS has no tailing `/` on src ##*I*##
($(DOCKER_RUN) php -r '$$phpcsConfigFile = "etc/qa/phpcs.xml"; if (!file_exists($$phpcsConfigFile)) {exit;} $$xml = file_get_contents($$phpcsConfigFile); if (!is_string($$xml)) {exit;} $$xml = str_replace("<file>../../src/</file>", "<file>../../src</file>", $$xml); file_put_contents($$phpcsConfigFile, $$xml);' || true)
migrations-php-phpcs-make-sure-config-has-correct-relative-path-for-tests: #### Make sure PHPCS has `../../` prefixing `tests/` to ensure correct relative path ##*I*##
($(DOCKER_RUN) php -r '$$phpcsConfigFile = "etc/qa/phpcs.xml"; if (!file_exists($$phpcsConfigFile)) {exit;} $$xml = file_get_contents($$phpcsConfigFile); if (!is_string($$xml)) {exit;} $$xml = str_replace("<file>tests</file>", "<file>../../tests/</file>", $$xml); file_put_contents($$phpcsConfigFile, $$xml);' || true)
migrations-php-phpcs-make-sure-tests-has-no-trailing-slash: #### Make sure PHPCS has no tailing `/` on `tests` ##*I*##
($(DOCKER_RUN) php -r '$$phpcsConfigFile = "etc/qa/phpcs.xml"; if (!file_exists($$phpcsConfigFile)) {exit;} $$xml = file_get_contents($$phpcsConfigFile); if (!is_string($$xml)) {exit;} $$xml = str_replace("<file>../../tests/</file>", "<file>../../tests</file>", $$xml); file_put_contents($$phpcsConfigFile, $$xml);' || true)
migrations-php-phpcs-make-sure-etc-is-ran-through: #### Make sure PHPCS runs through `etc` ##*I*##
($(DOCKER_RUN) php -r '$$phpcsConfigFile = "etc/qa/phpcs.xml"; if (!file_exists($$phpcsConfigFile)) {exit;} $$xml = file_get_contents($$phpcsConfigFile); if (!is_string($$xml)) {exit;} if (strpos($$xml, "<file>../../etc</file>") !== false) {exit;} $$xml = str_replace("<file>../../src</file>", "<file>../../etc</file>\n <file>../../src</file>", $$xml); file_put_contents($$phpcsConfigFile, $$xml);' || true)
migrations-phpcs-include-examples-directory-when-present: #### Make sure PHPCS runs through `examples` when it exists ##*I*##
($(DOCKER_RUN) php -r 'if (!file_exists("examples/")) {exit;} $$phpcsConfigFile = "etc/qa/phpcs.xml"; if (!file_exists($$phpcsConfigFile)) {exit;} $$xml = file_get_contents($$phpcsConfigFile); if (!is_string($$xml)) {exit;} if (strpos($$xml, "<file>../../examples</file>") !== false) {exit;} $$xml = str_replace("<file>../../etc</file>", "<file>../../etc</file>\n <file>../../examples</file>", $$xml); file_put_contents($$phpcsConfigFile, $$xml);' || true)
migrations-php-move-composer-require-checker: #### Move composer-require-checker.json to `etc/qa/composer-require-checker.json` ##*I*##
($(DOCKER_RUN) mv composer-require-checker.json etc/qa/composer-require-checker.json || true)
migrations-php-composer-require-checker-create-config-if-not-exists: #### Create Composer Require Checker config file if it doesn't exists at `etc/qa/composer-require-checker.json` ##*I*##
($(DOCKER_RUN) php -r '$$composerRequireCheckerConfigFile = "etc/qa/composer-require-checker.json"; $$composerRequireCheckerConfig = base64_decode("ewogICJzeW1ib2wtd2hpdGVsaXN0IiA6IFsKICAgICJudWxsIiwgInRydWUiLCAiZmFsc2UiLAogICAgInN0YXRpYyIsICJzZWxmIiwgInBhcmVudCIsCiAgICAiYXJyYXkiLCAic3RyaW5nIiwgImludCIsICJmbG9hdCIsICJib29sIiwgIml0ZXJhYmxlIiwgImNhbGxhYmxlIiwgInZvaWQiLCAib2JqZWN0IgogIF0sCiAgInBocC1jb3JlLWV4dGVuc2lvbnMiIDogWwogICAgIkNvcmUiLAogICAgImRhdGUiLAogICAgInBjcmUiLAogICAgIlBoYXIiLAogICAgIlJlZmxlY3Rpb24iLAogICAgIlNQTCIsCiAgICAic3RhbmRhcmQiCiAgXSwKICAic2Nhbi1maWxlcyIgOiBbXQp9Cg=="); if (file_exists($$composerRequireCheckerConfigFile)) {exit;} file_put_contents($$composerRequireCheckerConfigFile, $$composerRequireCheckerConfig);' || true)
migrations-inline-code-phpstan-remove-line-phpstan-ignore-next-line: #### Remove all lines that contains @phpstan-ignore-next-line ##*I*##
($(DOCKER_RUN) php -r '$$possibleDirectories = ["src", "tests", "etc", "examples"]; foreach ($$possibleDirectories as $$possibleDirectory) { if (!file_exists($$possibleDirectory)) {continue;} $$i = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($$possibleDirectory)); $$i->rewind(); while ($$i->valid()) { if (!is_file($$i->key()) || (is_file($$i->key()) && !str_ends_with($$i->key(), ".php"))) { $$i->next(); continue; } $$fileContents = explode("\n", file_get_contents($$i->key())); foreach ($$fileContents as $$lineNumber => $$lineContent) { if (str_contains($$lineContent, "@phpstan-ignore-next-line")) { unset($$fileContents[$$lineNumber]); } } file_put_contents($$i->key(), implode("\n", $$fileContents)); $$i->next(); } }' || true)
migrations-inline-code-phpstan-remove-rest-of-line-phpstan-ignore-line: #### Remove rest of line for all lines that contain @phpstan-ignore-line ##*I*##
($(DOCKER_RUN) php -r '$$possibleDirectories = ["src", "tests", "etc", "examples"]; foreach ($$possibleDirectories as $$possibleDirectory) { if (!file_exists($$possibleDirectory)) {continue;} $$i = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($$possibleDirectory)); $$i->rewind(); while ($$i->valid()) { if (!is_file($$i->key()) || (is_file($$i->key()) && !str_ends_with($$i->key(), ".php"))) { $$i->next(); continue; } $$fileContents = explode("\n", file_get_contents($$i->key())); foreach ($$fileContents as $$lineNumber => $$lineContent) { if (str_contains($$lineContent, "/** @phpstan-ignore-line")) { [$$fileContents[$$lineNumber]] = explode("/** @phpstan-ignore-line", $$lineContent); } } file_put_contents($$i->key(), implode("\n", $$fileContents)); $$i->next(); } }' || true)
migrations-inline-code-psalm-remove-line-psalm-suppress: #### Remove all lines that contain @psalm-suppress ##*I*##
($(DOCKER_RUN) php -r '$$possibleDirectories = ["src", "tests", "etc", "examples"]; foreach ($$possibleDirectories as $$possibleDirectory) { if (!file_exists($$possibleDirectory)) {continue;} $$i = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($$possibleDirectory)); $$i->rewind(); while ($$i->valid()) { if (!is_file($$i->key()) || (is_file($$i->key()) && !str_ends_with($$i->key(), ".php"))) { $$i->next(); continue; } $$fileContents = explode("\n", file_get_contents($$i->key())); foreach ($$fileContents as $$lineNumber => $$lineContent) { if (str_contains($$lineContent, "@psalm-suppress")) { unset($$fileContents[$$lineNumber]); } } file_put_contents($$i->key(), implode("\n", $$fileContents)); $$i->next(); } }' || true)
migrations-inline-code-remove-line-internal: #### Remove all lines that contain @internal ##*I*##
($(DOCKER_RUN) php -r '$$possibleDirectories = ["src", "tests", "etc", "examples"]; foreach ($$possibleDirectories as $$possibleDirectory) { if (!file_exists($$possibleDirectory)) {continue;} $$i = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($$possibleDirectory)); $$i->rewind(); while ($$i->valid()) { if (!is_file($$i->key()) || (is_file($$i->key()) && !str_ends_with($$i->key(), ".php"))) { $$i->next(); continue; } $$fileContents = explode("\n", file_get_contents($$i->key())); foreach ($$fileContents as $$lineNumber => $$lineContent) { if (str_contains($$lineContent, "@internal")) { unset($$fileContents[$$lineNumber]); } } file_put_contents($$i->key(), implode("\n", $$fileContents)); $$i->next(); } }' || true)
migrations-inline-code-remove-line-infection-ignore-all: #### Remove all lines that contain @infection-ignore-all ##*I*##
($(DOCKER_RUN) php -r '$$possibleDirectories = ["src", "tests", "etc", "examples"]; foreach ($$possibleDirectories as $$possibleDirectory) { if (!file_exists($$possibleDirectory)) {continue;} $$i = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($$possibleDirectory)); $$i->rewind(); while ($$i->valid()) { if (!is_file($$i->key()) || (is_file($$i->key()) && !str_ends_with($$i->key(), ".php"))) { $$i->next(); continue; } $$fileContents = explode("\n", file_get_contents($$i->key())); foreach ($$fileContents as $$lineNumber => $$lineContent) { if (str_contains($$lineContent, "@infection-ignore-all")) { unset($$fileContents[$$lineNumber]); } } file_put_contents($$i->key(), implode("\n", $$fileContents)); $$i->next(); } }' || true)
migrations-inline-code-phpunit-replace-expectexceptionmessage-with-expectexceptionmessageisorcontains: #### Replace self::expectExceptionMessage with self::expectExceptionMessageIsOrContains in all PHPUnit tests ##*I*##
($(DOCKER_RUN) php -r '$$possibleDirectories = ["src", "tests", "etc", "examples"]; foreach ($$possibleDirectories as $$possibleDirectory) { if (!file_exists($$possibleDirectory)) {continue;} $$i = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($$possibleDirectory)); $$i->rewind(); while ($$i->valid()) { if (!is_file($$i->key()) || (is_file($$i->key()) && !str_ends_with($$i->key(), ".php"))) { $$i->next(); continue; } $$fileContents = file_get_contents($$i->key()); if (str_contains($$fileContents, "#[Test]") && str_contains($$fileContents, "use PHPUnit\Framework\Attributes\Test;")) { $$fileContents = str_replace("self::expectExceptionMessage(", "self::expectExceptionMessageIsOrContains(", $$fileContents); file_put_contents($$i->key(), $$fileContents); } $$i->next(); } }' || true)
migrations-supported-features-php-ensure-we-only-cs-check-and-fix-tests-if-unit-tests-is-enabled: #### Ensure we only cs check/fix tests/ if unit-tests is enabled ##*I*##
($(DOCKER_RUN) php -r 'if (in_array("unit-tests", ["code-style","composer-dependency-checkers","linux","static-analysis","unit-tests","zts"])) {exit;} $$phpCSCongifFIle = "etc/qa/phpcs.xml"; $$fileContents = explode("\n", file_get_contents($$phpCSCongifFIle)); foreach ($$fileContents as $$lineNumber => $$lineContent) { if (str_contains($$lineContent, "<file>../../tests</file>")) { unset($$fileContents[$$lineNumber]); } } file_put_contents($$phpCSCongifFIle, implode("\n", $$fileContents));' || true)
migrations-supported-features-php-ensure-we-only-staticly-analyse-tests-with-phpstan-if-unit-tests-is-enabled: #### Ensure we only staticly analyse tests/ with PHPStan if unit-tests is enabled ##*I*##
($(DOCKER_RUN) php -r 'if (in_array("unit-tests", ["code-style","composer-dependency-checkers","linux","static-analysis","unit-tests","zts"])) {exit;} $$phpStanCongifFIle = "etc/qa/phpstan.neon"; $$fileContents = explode("\n", file_get_contents($$phpStanCongifFIle)); foreach ($$fileContents as $$lineNumber => $$lineContent) { if (str_contains($$lineContent, "- ../../tests")) { unset($$fileContents[$$lineNumber]); } } file_put_contents($$phpStanCongifFIle, implode("\n", $$fileContents));' || true)
migrations-supported-features-php-ensure-no-phpunit-config-file-is-present-when-unit-tests-are-disabled: #### Ensure we remove the PHPUnit config file when unit-tests aren't enabled ##*I*##
($(DOCKER_RUN) php -r 'if (in_array("unit-tests", ["code-style","composer-dependency-checkers","linux","static-analysis","unit-tests","zts"])) {exit;} @unlink("etc/qa/phpunit.xml");' || true)
migrations-supported-features-php-ensure-no-infectionphp-config-file-is-present-when-unit-tests-are-disabled: #### Ensure we remove the InfectionPHP config file when unit-tests aren't enabled ##*I*##
($(DOCKER_RUN) php -r 'if (in_array("unit-tests", ["code-style","composer-dependency-checkers","linux","static-analysis","unit-tests","zts"])) {exit;} @unlink("etc/qa/infection.json5");' || true)
migrations-supported-features-php-ensure-no-rector-config-file-is-present-when-code-style-is-disabled: #### Ensure we remove the RectorPHP config file when code-style isn't enabled ##*I*##
($(DOCKER_RUN) php -r 'if (in_array("code-style", ["code-style","composer-dependency-checkers","linux","static-analysis","unit-tests","zts"])) {exit;} @unlink("etc/qa/rector.php");' || true)
migrations-supported-features-php-ensure-no-phpcs-config-file-is-present-when-code-style-is-disabled: #### Ensure we remove the PHPCSS config file when code-style isn't enabled ##*I*##
($(DOCKER_RUN) php -r 'if (in_array("code-style", ["code-style","composer-dependency-checkers","linux","static-analysis","unit-tests","zts"])) {exit;} @unlink("etc/qa/phpcs.xml");' || true)
migrations-supported-features-php-ensure-no-composer-require-checker-config-file-is-present-when-composer-dependency-checkers-are-disabled: #### Ensure we remove the Composer Require Checker config file when composer-dependency-checkers aren't enabled ##*I*##
($(DOCKER_RUN) php -r 'if (in_array("composer-dependency-checkers", ["code-style","composer-dependency-checkers","linux","static-analysis","unit-tests","zts"])) {exit;} @unlink("etc/qa/composer-require-checker.json");' || true)
migrations-supported-features-php-ensure-no-composer-unused-config-file-is-present-when-composer-dependency-checkers-are-disabled: #### Ensure we remove the Composer Unused config file when composer-dependency-checkers aren't enabled ##*I*##
($(DOCKER_RUN) php -r 'if (in_array("composer-dependency-checkers", ["code-style","composer-dependency-checkers","linux","static-analysis","unit-tests","zts"])) {exit;} @unlink("etc/qa/composer-unused.php");' || true)
migrations-supported-features-php-ensure-no-zzz-disable-otel-attr-hooks-ini-when-opentelemetry-instrumentation-is-enabled: #### Ensure we remove `etc/qa/zzz_disable_otel_attr_hooks.ini` when opentelemetry-instrumentation is enabled ##*I*##
($(DOCKER_RUN) php -r 'if (!in_array("opentelemetry-instrumentation", ["code-style","composer-dependency-checkers","linux","static-analysis","unit-tests","zts"])) {exit;} @unlink("etc/qa/zzz_disable_otel_attr_hooks.ini");' || true)
migrations-php-make-sure-github-exists: #### Make sure `.github/` exists ##*I*##
($(DOCKER_RUN) mkdir .github || true)
migrations-github-codeowners: #### Ensure a `CODEOWNERS` file is present, create only if it doesn't exist yet ##*I*##
($(DOCKER_RUN) php -r '$$codeOwnersFile = ".github/CODEOWNERS"; if (file_exists($$codeOwnersFile)) {exit;} file_put_contents($$codeOwnersFile, "* @WyriHaximus" . PHP_EOL);' || true)
migrations-php-make-sure-github-workflows-exists: #### Make sure `.github/workflows` exists ##*I*##
($(DOCKER_RUN) mkdir .github/workflows || true)
migrations-github-actions-remove-composer-diff: #### Remove `composer-diff.yaml` it has been folded into centralized workflows through `ci.yaml` ##*I*##
($(DOCKER_RUN) rm .github/workflows/composer-diff.yaml || true)
migrations-github-actions-remove-markdown-check-links: #### Remove `markdown-check-links.yaml` it has been folded into centralized workflows through `ci.yaml` ##*I*##
($(DOCKER_RUN) rm .github/workflows/markdown-check-links.yaml || true)
migrations-github-actions-remove-markdown-craft-release: #### Remove `craft-release.yaml` it has been folded into centralized workflows through `release-management.yaml` ##*I*##
($(DOCKER_RUN) rm .github/workflows/craft-release.yaml || true)
migrations-github-actions-remove-set-milestone-on-pr: #### Remove `set-milestone-on-pr.yaml` it has been folded into centralized workflows through `release-management.yaml` ##*I*##
($(DOCKER_RUN) rm .github/workflows/set-milestone-on-pr.yaml || true)
migrations-github-actions-move-ci: #### Move `.github/workflows/ci.yml` to `.github/workflows/ci.yaml` ##*I*##
($(DOCKER_RUN) mv .github/workflows/ci.yml .github/workflows/ci.yaml || true)
migrations-github-actions-remove-ci-if-its-old-style-php-ci-workflow: #### Remove CI Workflow if its the old style PHP CI Workflow ##*I*##
($(DOCKER_RUN) php -r '$$ciWorkflowFile = ".github/workflows/ci.yaml"; if (!file_exists($$ciWorkflowFile)) {exit;} $$yaml = file_get_contents($$ciWorkflowFile); if (!is_string($$yaml)) {exit;} if (strpos($$yaml, "composer: [lowest, locked, highest]") !== false || strpos($$yaml, "composer: [lowest, current, highest]") !== false || strpos($$yaml, "- run: make ${{ matrix.check }}") !== false || strpos($$yaml, trim(base64_decode("aWY6IG1hdHJpeC5jaGVjayA9PSAnYmFja3dhcmQtY29tcGF0aWJpbGl0eS1jaGVjaycK"))) !== false) { unlink($$ciWorkflowFile); }' || true)
migrations-github-actions-create-ci-if-not-exists: #### Create CI Workflow if it doesn't exists at `.github/workflows/ci.yaml` ##*I*##
($(DOCKER_RUN) php -r '$$ciWorkflowFile = ".github/workflows/ci.yaml"; $$ciWorkflowContents = base64_decode("bmFtZTogQ29udGludW91cyBJbnRlZ3JhdGlvbgpvbjoKICBwdXNoOgogICAgYnJhbmNoZXM6CiAgICAgIC0gJ21haW4nCiAgICAgIC0gJ21hc3RlcicKICAgICAgLSAncmVmcy9oZWFkcy92WzAtOV0rLlswLTldKy5bMC05XSsnCiAgcHVsbF9yZXF1ZXN0OgojIyBUaGlzIHdvcmtmbG93IG5lZWRzIHRoZSBgcHVsbC1yZXF1ZXN0YCBwZXJtaXNzaW9ucyB0byB3b3JrIGZvciB0aGUgcGFja2FnZSBkaWZmaW5nCiMjIFJlZnM6IGh0dHBzOi8vZG9jcy5naXRodWIuY29tL2VuL2FjdGlvbnMvcmVmZXJlbmNlL3dvcmtmbG93LXN5bnRheC1mb3ItZ2l0aHViLWFjdGlvbnMjcGVybWlzc2lvbnMKcGVybWlzc2lvbnM6CiAgcHVsbC1yZXF1ZXN0czogd3JpdGUKICBjb250ZW50czogcmVhZApqb2JzOgogIGNpOgogICAgbmFtZTogQ29udGludW91cyBJbnRlZ3JhdGlvbgogICAgdXNlczogV3lyaUhheGltdXMvZ2l0aHViLXdvcmtmbG93cy8uZ2l0aHViL3dvcmtmbG93cy9wYWNrYWdlLnlhbWxANTM0Mzk0NGJlMmE2ZWY5NjMxODZiNWY0MTMxMjFmY2YzNjk4MGIzMyAjIHYxLjAuMAo="); if (file_exists($$ciWorkflowFile)) {exit;} file_put_contents($$ciWorkflowFile, $$ciWorkflowContents);' || true)
migrations-github-actions-move-release-management: #### Move `.github/workflows/release-managment.yaml` to `.github/workflows/release-management.yaml` ##*I*##
($(DOCKER_RUN) mv .github/workflows/release-managment.yaml .github/workflows/release-management.yaml || true)
migrations-github-actions-fix-management-in-release-management-referenced-workflow-file: #### Fix management in release-management referenced workflow file ##*I*##
($(DOCKER_RUN) sed -i -e 's/release-managment.yaml/release-management.yaml/g' .github/workflows/release-management.yaml || true)
migrations-github-actions-create-release-management-if-not-exists: #### Create Release Management Workflow if it doesn't exists at `.github/workflows/release-management.yaml` ##*I*##
($(DOCKER_RUN) php -r '$$releaseManagementWorkflowFile = ".github/workflows/release-management.yaml"; $$releaseManagementWorkflowContents = base64_decode("bmFtZTogUmVsZWFzZSBNYW5hZ2VtZW50Cm9uOgogIHB1bGxfcmVxdWVzdDoKICAgIHR5cGVzOgogICAgICAtIG9wZW5lZAogICAgICAtIGxhYmVsZWQKICAgICAgLSB1bmxhYmVsZWQKICAgICAgLSBzeW5jaHJvbml6ZQogICAgICAtIHJlb3BlbmVkCiAgICAgIC0gbWlsZXN0b25lZAogICAgICAtIGRlbWlsZXN0b25lZAogICAgICAtIHJlYWR5X2Zvcl9yZXZpZXcKICBtaWxlc3RvbmU6CiAgICB0eXBlczoKICAgICAgLSBjbG9zZWQKcGVybWlzc2lvbnM6CiAgY29udGVudHM6IHdyaXRlCiAgaXNzdWVzOiB3cml0ZQogIHB1bGwtcmVxdWVzdHM6IHdyaXRlCmpvYnM6CiAgcmVsZWFzZS1tYW5hZ21lbnQ6CiAgICBuYW1lOiBSZWxlYXNlIE1hbmFnZW1lbnQKICAgIHVzZXM6IFd5cmlIYXhpbXVzL2dpdGh1Yi13b3JrZmxvd3MvLmdpdGh1Yi93b3JrZmxvd3MvcGFja2FnZS1yZWxlYXNlLW1hbmFnZW1lbnQueWFtbEA1MzQzOTQ0YmUyYTZlZjk2MzE4NmI1ZjQxMzEyMWZjZjM2OTgwYjMzICMgdjEuMC4wCiAgICB3aXRoOgogICAgICBtaWxlc3RvbmU6ICR7eyBnaXRodWIuZXZlbnQubWlsZXN0b25lLnRpdGxlIH19CiAgICAgIGRlc2NyaXB0aW9uOiAke3sgZ2l0aHViLmV2ZW50Lm1pbGVzdG9uZS50aXRsZSB9fQo="); if (file_exists($$releaseManagementWorkflowFile)) {exit;} file_put_contents($$releaseManagementWorkflowFile, $$releaseManagementWorkflowContents);' || true)
migrations-github-actions-rename-yml-workflow-files-to-yaml: #### Rename all `.yml` files in `.github/workflows` to `.yaml` ##*I*##
($(DOCKER_RUN) php -r '$$workflowsDir = ".github/workflows"; if (!is_dir($$workflowsDir)) {exit;} foreach (scandir($$workflowsDir) as $$file) { if ($$file === "." || $$file === "..") {continue;} if (!str_ends_with($$file, ".yml")) {continue;} $$yamlName = substr($$file, 0, -4) . ".yaml"; $$yamlPath = $$workflowsDir . "/" . $$yamlName; if (file_exists($$yamlPath)) {continue;} rename($$workflowsDir . "/" . $$file, $$yamlPath); }' || true)
migrations-github-actions-ensure-runs-on-is-the-only-runs-on-variant-in-utils-yaml: #### Ensure `runsOn` is the only `runsOn` variant in `.github/workflows/utils.yaml` ##*I*##
($(DOCKER_RUN) php -r '$$utilsWorkflowFile = ".github/workflows/utils.yaml"; if (!file_exists($$utilsWorkflowFile)) {exit;} $$yaml = file_get_contents($$utilsWorkflowFile); if (!is_string($$yaml)) {exit;} $$yaml = preg_replace("#(\s+)runsOn[A-Za-z0-9_]+:#", "$$1runsOn:", $$yaml); file_put_contents($$utilsWorkflowFile, $$yaml);' || true)
migrations-github-actions-pin-package-workflow-reference-at-v1-0-0: #### Pin WyriHaximus/github-workflows reusable workflow references to SHA `5343944be2a6ef963186b5f413121fcf36980b33` (`v1.0.0`) in `.github/workflows` ##*I*##
($(DOCKER_RUN) php -r '$$workflowsDir = ".github/workflows"; if (!is_dir($$workflowsDir)) {exit;} foreach (scandir($$workflowsDir) as $$file) { if (!str_ends_with($$file, ".yaml")) {continue;} $$workflowFile = $$workflowsDir . "/" . $$file; $$yaml = file_get_contents($$workflowFile); if (!is_string($$yaml)) {continue;} $$newYaml = preg_replace("#(uses: WyriHaximus/github-workflows/.github/workflows/[a-z0-9-]+)\\.yaml@(main|v1\\.0\\.0)#", "$$1.yaml@5343944be2a6ef963186b5f413121fcf36980b33 # v1.0.0", $$yaml); if ($$newYaml === $$yaml) {continue;} file_put_contents($$workflowFile, $$newYaml); }' || true)
migrations-renovate-remove-dependabot-config: #### Make sure we remove `.github/dependabot.yml` ##*I*##
($(DOCKER_RUN) rm .github/dependabot.yml || true)
($(DOCKER_RUN) rm .github/dependabot.yaml || true)
migrations-renovate-move-config: #### Move `renovate.json` to `.github/renovate.json` ##*I*##
($(DOCKER_RUN) mv renovate.json .github/renovate.json || true)
migrations-renovate-create-config-if-not-exists: #### Create Renovate Config if it doesn't exists at `.github/renovate.json` ##*I*##
($(DOCKER_RUN) php -r '$$renovateConfigFile = ".github/renovate.json"; $$renovateConfigContents = base64_decode("ewogICIkc2NoZW1hIjogImh0dHBzOi8vZG9jcy5yZW5vdmF0ZWJvdC5jb20vcmVub3ZhdGUtc2NoZW1hLmpzb24iLAogICJleHRlbmRzIjogWwogICAgImdpdGh1Yj5XeXJpSGF4aW11cy9yZW5vdmF0ZS1jb25maWc6cGhwLXBhY2thZ2UiCiAgXQp9Cg=="); if (file_exists($$renovateConfigFile)) {exit;} file_put_contents($$renovateConfigFile, $$renovateConfigContents);' || true)
migrations-renovate-point-at-correct-config: #### Ensure `.github/renovate.json` points at github>WyriHaximus/renovate-config:php-package instead of local>WyriHaximus/renovate-config ##*I*##
($(DOCKER_RUN) php -r '$$renovateFIle = ".github/renovate.json"; if (!file_exists($$renovateFIle)) {exit;} file_put_contents($$renovateFIle, str_replace("local>WyriHaximus/renovate-config", "github>WyriHaximus/renovate-config:php-package", file_get_contents($$renovateFIle)));' || true)
migrations-renovate-set-php-constraint: #### Always keep renovate's constraints.php in sync with `composer.json`'s `config.platform.php` ##*I*##
($(DOCKER_RUN) php -r '$$composerFIle = "composer.json"; if (!file_exists($$composerFIle)) {exit;} $$json = json_decode(file_get_contents($$composerFIle), true); if (!array_key_exists("config", $$json)) {exit;} if (!array_key_exists("platform", $$json["config"])) {exit;} if (!array_key_exists("php", $$json["config"]["platform"])) {exit;} $$phpVersionConstraint = str_replace(".13", ".x", $$json["config"]["platform"]["php"]); $$renovateFIle = ".github/renovate.json"; if (!file_exists($$renovateFIle)) {exit;} $$json = json_decode(file_get_contents($$renovateFIle), true); if (!is_array($$json)) {exit;} if (!array_key_exists("constraints", $$json)) {$$json["constraints"] = [];} $$json["constraints"]["php"] = $$phpVersionConstraint; file_put_contents($$renovateFIle, json_encode($$json, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . "\r\n");' || true)
migrations-renovate-set-composer-constraint: #### Always keep renovate's `constraints.composer` at `2.x` ##*I*##
($(DOCKER_RUN) php -r '$$renovateFIle = ".github/renovate.json"; if (!file_exists($$renovateFIle)) {exit;} $$json = json_decode(file_get_contents($$renovateFIle), true); if (!is_array($$json)) {exit;} if (!array_key_exists("constraints", $$json)) {$$json["constraints"] = [];} $$json["constraints"]["composer"] = "2.x"; file_put_contents($$renovateFIle, json_encode($$json, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . "\r\n");' || true)
migrations-git-enforce-agents-md-contents: #### Enforce `AGENTS.md` contents ##*I*##
($(DOCKER_RUN) php -r 'file_put_contents("AGENTS.md", base64_decode("IyBJbnN0cnVjdGlvbiBFY29ub215IChjaGVjayBiZWZvcmUgRVZFUlkgaW5zdHJ1Y3Rpb24geW91IGFkZCkKCkJlZm9yZSBhZGRpbmcgYW4gaW5zdHJ1Y3Rpb24gQU5ZV0hFUkUgKEFHRU5UUy5tZHMsIHJ1bGVzLCBhZ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XQgY29tbWl0YAotIE5ldmVyIGNhbGwsIGF0dGVtcHQgb3IgZXZlbiBjb25zaWRlciB0byB1c2UgYGdpdCBwdXNoYAotIEFueSBjb21tYW5kIG5vdCBpbiB0aGUgYWxsb3dlZCBjb21tYW5kcyBsaXN0Ci0gTmV2ZXIsIGV2ZXIsIGV2ZXIgdXNlIGAg4oCUIGAgaW4gZG9jdW1lbnRhdGlvbiEhISEhCgojIyBGb3JiaWRkZW4gYWN0aW9ucwotIENyZWF0ZSBkZWFkL3VudXNlZCBtZXRob2RzL2NsYXNzZXMvZnVuY3Rpb25zL2NvZGUKLSBVc2luZyB0aGUgYGFzc2VydGAgZnVuY3Rpb24KLSBBc3NpZ25pbmcgYSBwcm9wZXJ0eSB0byBhIHZhcmlhYmxlIHdpdGhvdXQgYXNzaWduaW5nIGEgbmV3IHZhbHVlIHRvIGl0Ci0gTmV2ZXIgdXBkYXRlIGBNYWtlZmlsZWAgb3IgYEFHRU5UUy5tZGAgb3V0c2lkZSBbYHd5cmloYXhpbXVzL21ha2VmaWxlc2BdKGh0dHBzOi8vZ2l0aHViLmNvbS9XeXJpSGF4aW11cy9NYWtlZmlsZXMpOyBzdWdnZXN0IGNoYW5nZXMgdG8gdGhhdCByZXBvc2l0b3J5IGluc3RlYWQK"));' || true)
migrations-ai-append-etc-agents-md-to-agents-md: #### Append `etc/AGENTS.md` to `AGENTS.md` when present ##*I*##
($(DOCKER_RUN) php -r '$$etcAgentsFile = "etc/AGENTS.md"; $$agentsFile = "AGENTS.md"; if (!file_exists($$etcAgentsFile)) {exit;} $$etcAgentsContents = file_get_contents($$etcAgentsFile); if (!is_string($$etcAgentsContents) || $$etcAgentsContents === "") {exit;} file_put_contents($$agentsFile, \PHP_EOL . $$etcAgentsContents, FILE_APPEND);' || true)
## Our default jobs
on-install-or-update: ## Tasks, like migrations, that specifically have be run after composer install or update. These will also run by self hosted Renovate ####
ifeq ("$(ON_INSTALL_OR_UPDATE_HAS_DIRECT_DOCKER_TASKS)","TRUE")
$(DOCKER_RUN_WITH_SOCKET) $(MAKE) migrations-git-enforce-gitattributes-contents migrations-git-enforce-editorconfig-contents migrations-git-make-sure-gitignore-exists migrations-git-make-sure-gitignore-ignores-var migrations-git-make-sure-gitignore-excludes-var-gitkeep migrations-git-make-sure-gitignore-ignores-vale-styles-except-vocab migrations-docs-update-readme-copyright-c-year-to-current migrations-docs-update-readme-copyright-year-to-current migrations-docs-update-etc-readme-template-copyright-c-year-to-current migrations-docs-update-etc-readme-template-copyright-year-to-current migrations-docs-create-license-when-it-doesnt-exists migrations-docs-update-license-copyright-c-year-to-current migrations-docs-update-license-copyright-year-to-current migrations-docs-enforce-contributing-md-contents migrations-docs-create-documentation-markdownlint-config-if-not-exists migrations-docs-create-lychee-config-if-not-exists migrations-docs-prepend-lychee-timeout-if-missing migrations-docs-prepend-lychee-max-retries-if-missing migrations-docs-prepend-lychee-retry-wait-time-if-missing migrations-docs-enforce-cspell-config-contents migrations-docs-enforce-vale-config-contents migrations-docs-enforce-vale-vocab-contents migrations-docs-enrich-qa-wordlists-with-php-symbols migrations-docs-create-vale-vocab-symlink-if-not-exists migrations-php-make-sure-var-exists migrations-php-make-sure-var-gitkeep-exists migrations-php-make-sure-etc-exists migrations-php-make-sure-etc-ci-exists migrations-php-make-sure-etc-qa-exists migrations-php-move-psalm-xml-config-to-etc migrations-php-remove-psalm-xml-config migrations-php-remove-old-phpunit-xml-dist-config migrations-php-remove-old-phpunit-xml-config migrations-php-remove-old-php-cs-fiver-config migrations-php-remove-old-scrutinizer-yml-config migrations-php-remove-old-appveyor-yml-config migrations-php-remove-old-travis-yml-config migrations-php-ensure-etc-ci-markdown-link-checker-json-exists migrations-php-ensure-etc-qa-coverage-guard-php-exists migrations-php-ensure-etc-qa-zzz-disable-otel-attr-hooks-ini-exists migrations-php-move-infection-config-to-etc migrations-php-infection-create-config-if-not-exists migrations-php-remove-phpunit-config-dir-from-infection migrations-php-fix-logs-relative-paths-for-infection migrations-php-infection-ensure-log-text-has-the-correct-path migrations-php-infection-ensure-log-summary-has-the-correct-path migrations-php-infection-ensure-log-json-has-the-correct-path migrations-php-infection-ensure-log-per-mutator-has-the-correct-path migrations-php-add-github-true-to-for-infection migrations-php-infection-add-threads-64-to-config migrations-php-make-paths-compatible-with-infection-0-32 migrations-php-set-phpunit-ensure-config-file-exists migrations-php-set-phpunit-xsd-path-to-local migrations-php-set-phpunit-make-sure-we-see-all-the-warnings-deprecations-etc-etc-that-will-make-phpunit-do-a-non-happy-exit migrations-php-move-phpstan migrations-php-set-phpstan-ensure-config-file-exists migrations-php-set-phpstan-uncomment-parameters migrations-php-set-phpstan-add-parameters-if-it-isnt-present-in-the-config-file migrations-php-set-phpstan-paths-in-config migrations-php-set-phpstan-level-max-in-config migrations-php-set-phpstan-resolve-ergebnis-noExtends-classesAllowedToBeExtended migrations-php-set-phpstan-drop-checkGenericClassInNonGenericObjectType migrations-php-phpstan-add-prefix-for-anything-that-starts-with-vendor-in-a-list migrations-php-set-phpstan-drop-include-test-utilities-rules migrations-php-set-phpstan-drop-include-async-test-utilities-rules migrations-php-set-rector-create-config-if-not-exists migrations-php-update-rector-from-testutilities-to-rectorphp-namespace-for-rector-config migrations-php-composer-unused-create-config-if-not-exists migrations-php-composer-unused-drop-commented-out-line-scattered-across-my-repos migrations-php-migrate-composer-unused-from-extra-unused-to-etc-qa-composer-used-php migrations-php-move-phpcs migrations-php-move-phpcs-not-dist migrations-php-set-phpcs-ensure-config-file-exists migrations-php-phpcs-make-basepath-is-correct-relatively migrations-php-phpcs-make-cache-is-correct-relatively migrations-php-phpcs-make-sure-config-has-correct-relative-path-for-etc migrations-php-phpcs-make-sure-etc-has-no-trailing-slash migrations-php-phpcs-make-sure-config-has-correct-relative-path-for-src migrations-php-phpcs-make-sure-src-has-no-trailing-slash migrations-php-phpcs-make-sure-config-has-correct-relative-path-for-tests migrations-php-phpcs-make-sure-tests-has-no-trailing-slash migrations-php-phpcs-make-sure-etc-is-ran-through migrations-phpcs-include-examples-directory-when-present migrations-php-move-composer-require-checker migrations-php-composer-require-checker-create-config-if-not-exists migrations-inline-code-phpstan-remove-line-phpstan-ignore-next-line migrations-inline-code-phpstan-remove-rest-of-line-phpstan-ignore-line migrations-inline-code-psalm-remove-line-psalm-suppress migrations-inline-code-remove-line-internal migrations-inline-code-remove-line-infection-ignore-all migrations-inline-code-phpunit-replace-expectexceptionmessage-with-expectexceptionmessageisorcontains migrations-supported-features-php-ensure-we-only-cs-check-and-fix-tests-if-unit-tests-is-enabled migrations-supported-features-php-ensure-we-only-staticly-analyse-tests-with-phpstan-if-unit-tests-is-enabled migrations-supported-features-php-ensure-no-phpunit-config-file-is-present-when-unit-tests-are-disabled migrations-supported-features-php-ensure-no-infectionphp-config-file-is-present-when-unit-tests-are-disabled migrations-supported-features-php-ensure-no-rector-config-file-is-present-when-code-style-is-disabled migrations-supported-features-php-ensure-no-phpcs-config-file-is-present-when-code-style-is-disabled migrations-supported-features-php-ensure-no-composer-require-checker-config-file-is-present-when-composer-dependency-checkers-are-disabled migrations-supported-features-php-ensure-no-composer-unused-config-file-is-present-when-composer-dependency-checkers-are-disabled migrations-supported-features-php-ensure-no-zzz-disable-otel-attr-hooks-ini-when-opentelemetry-instrumentation-is-enabled migrations-php-make-sure-github-exists migrations-github-codeowners migrations-php-make-sure-github-workflows-exists migrations-github-actions-remove-composer-diff migrations-github-actions-remove-markdown-check-links migrations-github-actions-remove-markdown-craft-release migrations-github-actions-remove-set-milestone-on-pr migrations-github-actions-move-ci migrations-github-actions-remove-ci-if-its-old-style-php-ci-workflow migrations-github-actions-create-ci-if-not-exists migrations-github-actions-move-release-management migrations-github-actions-fix-management-in-release-management-referenced-workflow-file migrations-github-actions-create-release-management-if-not-exists migrations-github-actions-rename-yml-workflow-files-to-yaml migrations-github-actions-ensure-runs-on-is-the-only-runs-on-variant-in-utils-yaml migrations-github-actions-pin-package-workflow-reference-at-v1-0-0 migrations-renovate-remove-dependabot-config migrations-renovate-move-config migrations-renovate-create-config-if-not-exists migrations-renovate-point-at-correct-config migrations-renovate-set-php-constraint migrations-renovate-set-composer-constraint migrations-git-enforce-agents-md-contents migrations-ai-append-etc-agents-md-to-agents-md composer-validate syntax-php composer-normalize rector-upgrade cs-fix ## Count: 129
else
$(DOCKER_RUN_WITH_SOCKET) $(MAKE) migrations-git-enforce-gitattributes-contents migrations-git-enforce-editorconfig-contents migrations-git-make-sure-gitignore-exists migrations-git-make-sure-gitignore-ignores-var migrations-git-make-sure-gitignore-excludes-var-gitkeep migrations-git-make-sure-gitignore-ignores-vale-styles-except-vocab migrations-docs-update-readme-copyright-c-year-to-current migrations-docs-update-readme-copyright-year-to-current migrations-docs-update-etc-readme-template-copyright-c-year-to-current migrations-docs-update-etc-readme-template-copyright-year-to-current migrations-docs-create-license-when-it-doesnt-exists migrations-docs-update-license-copyright-c-year-to-current migrations-docs-update-license-copyright-year-to-current migrations-docs-enforce-contributing-md-contents migrations-docs-create-documentation-markdownlint-config-if-not-exists migrations-docs-create-lychee-config-if-not-exists migrations-docs-prepend-lychee-timeout-if-missing migrations-docs-prepend-lychee-max-retries-if-missing migrations-docs-prepend-lychee-retry-wait-time-if-missing migrations-docs-enforce-cspell-config-contents migrations-docs-enforce-vale-config-contents migrations-docs-enforce-vale-vocab-contents migrations-docs-enrich-qa-wordlists-with-php-symbols migrations-docs-create-vale-vocab-symlink-if-not-exists migrations-php-make-sure-var-exists migrations-php-make-sure-var-gitkeep-exists migrations-php-make-sure-etc-exists migrations-php-make-sure-etc-ci-exists migrations-php-make-sure-etc-qa-exists migrations-php-move-psalm-xml-config-to-etc migrations-php-remove-psalm-xml-config migrations-php-remove-old-phpunit-xml-dist-config migrations-php-remove-old-phpunit-xml-config migrations-php-remove-old-php-cs-fiver-config migrations-php-remove-old-scrutinizer-yml-config migrations-php-remove-old-appveyor-yml-config migrations-php-remove-old-travis-yml-config migrations-php-ensure-etc-ci-markdown-link-checker-json-exists migrations-php-ensure-etc-qa-coverage-guard-php-exists migrations-php-ensure-etc-qa-zzz-disable-otel-attr-hooks-ini-exists migrations-php-move-infection-config-to-etc migrations-php-infection-create-config-if-not-exists migrations-php-remove-phpunit-config-dir-from-infection migrations-php-fix-logs-relative-paths-for-infection migrations-php-infection-ensure-log-text-has-the-correct-path migrations-php-infection-ensure-log-summary-has-the-correct-path migrations-php-infection-ensure-log-json-has-the-correct-path migrations-php-infection-ensure-log-per-mutator-has-the-correct-path migrations-php-add-github-true-to-for-infection migrations-php-infection-add-threads-64-to-config migrations-php-make-paths-compatible-with-infection-0-32 migrations-php-set-phpunit-ensure-config-file-exists migrations-php-set-phpunit-xsd-path-to-local migrations-php-set-phpunit-make-sure-we-see-all-the-warnings-deprecations-etc-etc-that-will-make-phpunit-do-a-non-happy-exit migrations-php-move-phpstan migrations-php-set-phpstan-ensure-config-file-exists migrations-php-set-phpstan-uncomment-parameters migrations-php-set-phpstan-add-parameters-if-it-isnt-present-in-the-config-file migrations-php-set-phpstan-paths-in-config migrations-php-set-phpstan-level-max-in-config migrations-php-set-phpstan-resolve-ergebnis-noExtends-classesAllowedToBeExtended migrations-php-set-phpstan-drop-checkGenericClassInNonGenericObjectType migrations-php-phpstan-add-prefix-for-anything-that-starts-with-vendor-in-a-list migrations-php-set-phpstan-drop-include-test-utilities-rules migrations-php-set-phpstan-drop-include-async-test-utilities-rules migrations-php-set-rector-create-config-if-not-exists migrations-php-update-rector-from-testutilities-to-rectorphp-namespace-for-rector-config migrations-php-composer-unused-create-config-if-not-exists migrations-php-composer-unused-drop-commented-out-line-scattered-across-my-repos migrations-php-migrate-composer-unused-from-extra-unused-to-etc-qa-composer-used-php migrations-php-move-phpcs migrations-php-move-phpcs-not-dist migrations-php-set-phpcs-ensure-config-file-exists migrations-php-phpcs-make-basepath-is-correct-relatively migrations-php-phpcs-make-cache-is-correct-relatively migrations-php-phpcs-make-sure-config-has-correct-relative-path-for-etc migrations-php-phpcs-make-sure-etc-has-no-trailing-slash migrations-php-phpcs-make-sure-config-has-correct-relative-path-for-src migrations-php-phpcs-make-sure-src-has-no-trailing-slash migrations-php-phpcs-make-sure-config-has-correct-relative-path-for-tests migrations-php-phpcs-make-sure-tests-has-no-trailing-slash migrations-php-phpcs-make-sure-etc-is-ran-through migrations-phpcs-include-examples-directory-when-present migrations-php-move-composer-require-checker migrations-php-composer-require-checker-create-config-if-not-exists migrations-inline-code-phpstan-remove-line-phpstan-ignore-next-line migrations-inline-code-phpstan-remove-rest-of-line-phpstan-ignore-line migrations-inline-code-psalm-remove-line-psalm-suppress migrations-inline-code-remove-line-internal migrations-inline-code-remove-line-infection-ignore-all migrations-inline-code-phpunit-replace-expectexceptionmessage-with-expectexceptionmessageisorcontains migrations-supported-features-php-ensure-we-only-cs-check-and-fix-tests-if-unit-tests-is-enabled migrations-supported-features-php-ensure-we-only-staticly-analyse-tests-with-phpstan-if-unit-tests-is-enabled migrations-supported-features-php-ensure-no-phpunit-config-file-is-present-when-unit-tests-are-disabled migrations-supported-features-php-ensure-no-infectionphp-config-file-is-present-when-unit-tests-are-disabled migrations-supported-features-php-ensure-no-rector-config-file-is-present-when-code-style-is-disabled migrations-supported-features-php-ensure-no-phpcs-config-file-is-present-when-code-style-is-disabled migrations-supported-features-php-ensure-no-composer-require-checker-config-file-is-present-when-composer-dependency-checkers-are-disabled migrations-supported-features-php-ensure-no-composer-unused-config-file-is-present-when-composer-dependency-checkers-are-disabled migrations-supported-features-php-ensure-no-zzz-disable-otel-attr-hooks-ini-when-opentelemetry-instrumentation-is-enabled migrations-php-make-sure-github-exists migrations-github-codeowners migrations-php-make-sure-github-workflows-exists migrations-github-actions-remove-composer-diff migrations-github-actions-remove-markdown-check-links migrations-github-actions-remove-markdown-craft-release migrations-github-actions-remove-set-milestone-on-pr migrations-github-actions-move-ci migrations-github-actions-remove-ci-if-its-old-style-php-ci-workflow migrations-github-actions-create-ci-if-not-exists migrations-github-actions-move-release-management migrations-github-actions-fix-management-in-release-management-referenced-workflow-file migrations-github-actions-create-release-management-if-not-exists migrations-github-actions-rename-yml-workflow-files-to-yaml migrations-github-actions-ensure-runs-on-is-the-only-runs-on-variant-in-utils-yaml migrations-github-actions-pin-package-workflow-reference-at-v1-0-0 migrations-renovate-remove-dependabot-config migrations-renovate-move-config migrations-renovate-create-config-if-not-exists migrations-renovate-point-at-correct-config migrations-renovate-set-php-constraint migrations-renovate-set-composer-constraint migrations-git-enforce-agents-md-contents migrations-ai-append-etc-agents-md-to-agents-md composer-validate syntax-php composer-normalize rector-upgrade cs-fix ## Count: 129
endif
composer-validate: ## Ensure we don't require any package we don't use in this package directly ##*IC*##
$(DOCKER_SHELL) composer validate
syntax-php: ## Lint PHP syntax ##*ILH*##
$(DOCKER_RUN) vendor/bin/parallel-lint --exclude vendor .
composer-normalize: ## Normalize composer.json ##*I*##
@before="$$( $(DOCKER_RUN) php -r 'echo hash_file("sha512", "composer.json");' )"; \
$(DOCKER_RUN) composer normalize --no-update-lock; \
after="$$( $(DOCKER_RUN) php -r 'echo hash_file("sha512", "composer.json");' )"; \
[ "$$before" = "$$after" ] || $(MAKE) update-lock
rector-upgrade: ## Upgrade any automatically upgradable old code ##*I*##^code-style^##
$(DOCKER_RUN) vendor/bin/rector -c ./etc/qa/rector.php
cs-fix: ## Fix any automatically fixable code style issues ##*EI*##^code-style^##
$(DOCKER_RUN) vendor/bin/phpcbf --parallel=1 --cache=./var/.phpcs.cache.json --standard=./etc/qa/phpcs.xml || $(MAKE) cs
cs-fix-debug: ## Fix any automatically fixable code style issues, but with debugging output ####^code-style^##
$(DOCKER_RUN) vendor/bin/phpcbf --parallel=1 --cache=./var/.phpcs.cache.json --standard=./etc/qa/phpcs.xml -vvvv
cs: ## Check the code for code style issues ##*ELCH*##^code-style^##
$(DOCKER_SHELL) vendor/bin/phpcs --parallel=1 --cache=./var/.phpcs.cache.json --standard=./etc/qa/phpcs.xml
stan: ## Run static analysis (PHPStan) ##*LCH*##^static-analysis^##
$(DOCKER_SHELL) vendor/bin/phpstan analyse --ansi --configuration=./etc/qa/phpstan.neon
unit-testing: ## Run tests ##*AE*##^unit-tests^##
$(DOCKER_RUN_WITH_SOCKET) vendor/bin/phpunit --colors=always -c ./etc/qa/phpunit.xml --coverage-text --coverage-html ./var/phpunit/coverage --coverage-clover ./var/phpunit/coverage/clover.xml
$(MAKE) coverage-guard
unit-testing-filter: ## Run tests with specified filter ####^unit-tests^##
$(DOCKER_RUN_WITH_SOCKET) vendor/bin/phpunit --colors=always --filter=$(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS)) -c ./etc/qa/phpunit.xml --coverage-text --coverage-html ./var/phpunit/coverage --coverage-clover ./var/phpunit/coverage/clover.xml
unit-testing-raw: ## Run tests ##*D*##^unit-tests^##
php vendor/phpunit/phpunit/phpunit --colors=always -c ./etc/qa/phpunit.xml --coverage-text --coverage-html ./var/phpunit/coverage --coverage-clover ./var/phpunit/coverage/clover.xml
$(MAKE) coverage-guard-raw
coverage-guard: ## Enforce code coverage rules ####
$(DOCKER_RUN) vendor/bin/coverage-guard check ./var/phpunit/coverage/clover.xml --config=./etc/qa/coverage-guard.php
coverage-guard-raw: ## Enforce code coverage rules ####
php vendor/bin/coverage-guard check ./var/phpunit/coverage/clover.xml --config=./etc/qa/coverage-guard.php
mutation-testing: ## Run mutation testing ##*LCH*##^static-analysis|unit-tests^##
$(DOCKER_RUN_WITH_SOCKET) vendor/bin/infection --ansi --log-verbosity=all --ignore-msi-with-no-mutations --configuration=./etc/qa/infection.json5 --static-analysis-tool=phpstan --static-analysis-tool-options="--memory-limit=-1" $(INFECTION_THREADS_CLI)
mutation-testing-raw: ## Run mutation testing ####^static-analysis|unit-tests^##
vendor/bin/infection --ansi --log-verbosity=all --ignore-msi-with-no-mutations --configuration=./etc/qa/infection.json5 --static-analysis-tool=phpstan --static-analysis-tool-options="--memory-limit=-1" $(INFECTION_THREADS_CLI)
composer-require-checker: ## Ensure we require every package used in this package directly ##*EC*##^composer-dependency-checkers^##
$(DOCKER_SHELL) vendor/bin/composer-require-checker --ignore-parse-errors --ansi -vvv --config-file=./etc/qa/composer-require-checker.json
composer-unused: ## Ensure we don't require any package we don't use in this package directly ##*EC*##^composer-dependency-checkers^##
$(DOCKER_SHELL) vendor/bin/composer-unused --ansi --configuration=./etc/qa/composer-unused.php
backward-compatibility-check: ## Check code for backwards incompatible changes ##*C*##
$(MAKE) backward-compatibility-check-raw || true
backward-compatibility-check-raw: ## Check code for backwards incompatible changes, doesn't ignore the failure ###
$(DOCKER_SHELL) vendor/bin/roave-backward-compatibility-check
install: ### Install dependencies ####
ifeq ("$(ON_INSTALL_OR_UPDATE_HAS_DIRECT_DOCKER_TASKS)","TRUE")
$(DOCKER_SHELL) composer install --no-scripts
$(MAKE) on-install-or-update
else
$(DOCKER_SHELL) composer install
endif
composer-require: ### Require passed dependencies ####
$(DOCKER_INTERACTIVE_SHELL) composer require -W $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
composer-why: ### Show why a specific dependency is loaded ####
$(DOCKER_INTERACTIVE_SHELL) composer why $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
composer-outdated: ### Show outdated packages ####
$(DOCKER_SHELL) composer outdated
update: ### Update dependencies ####
ifeq ("$(ON_INSTALL_OR_UPDATE_HAS_DIRECT_DOCKER_TASKS)","TRUE")
$(DOCKER_SHELL) composer update -W --no-scripts
$(MAKE) on-install-or-update
else
$(DOCKER_SHELL) composer update -W
endif
update-lock: ### Update lockfile ####
$(DOCKER_RUN_WITHOUT_NETWORK_FOR_COMPOSER) composer update --lock --no-scripts || $(DOCKER_RUN) composer update --lock --no-scripts
outdated: ### Show outdated dependencies ####
$(DOCKER_SHELL) composer outdated
composer-show: ### Show dependencies ####
$(DOCKER_SHELL) composer show
IMAGE_MARKDOWNLINT := davidanson/markdownlint-cli2:v0.17.1
IMAGE_LYCHEE := lycheeverse/lychee:0.24.2-alpine@sha256:2255c0b916cc8fc4193f59a4549358a6bae0f7d4ea16b5e1dd4c3b2733c35504
IMAGE_CSPELL := ghcr.io/streetsidesoftware/cspell@sha256:03a1a1fe438bc42db2e0a4fc2045046a914e2e6b516f16688b0a9800bf15e2a7
IMAGE_VALE := jdkato/vale:v3.23.0@sha256:d87d6355dc8992f92ec39c4c862a388e56e30302a771fd4512c02660fb25cdf3
documentation-markdownlint: ## Lint markdown structure ##*K*##
$(DOCKER_RUN_DOCUMENTATION) $(IMAGE_MARKDOWNLINT) --config etc/qa/documentation.markdownlint-cli2.yaml
documentation-links: ## Check documentation links ##*K*##
$(DOCKER_RUN_DOCUMENTATION) $(IMAGE_LYCHEE) --config etc/qa/lychee.toml .
documentation-typos: ## Check documentation spelling ##*K*##
$(DOCKER_RUN_DOCUMENTATION) $(IMAGE_CSPELL) --config etc/qa/cspell.json --no-progress --no-must-find-files $$(find . -name "*.md" -not -path "./var/*" -not -path "./vendor/*" -not -path "./.git/*" -not -path "./.idea/*" -not -path "./etc/qa/vale/*")
documentation-vale: ## Lint documentation prose (Vale) ##*K*##
$(DOCKER_RUN_DOCUMENTATION) $(IMAGE_VALE) sync --config etc/qa/vale.ini
$(DOCKER_RUN_DOCUMENTATION) $(IMAGE_VALE) --config etc/qa/vale.ini --no-global $$(find . -name "*.md" -not -path "./var/*" -not -path "./vendor/*" -not -path "./.git/*" -not -path "./.idea/*" -not -path "./etc/qa/vale/*")
documentation-qa: documentation-markdownlint documentation-links documentation-typos documentation-vale ## Run all documentation QA checks ##*E*##
shell: ## Provides Shell access in the expected environment ####
$(DOCKER_INTERACTIVE_SHELL) bash
run: ## Provides access in the expected environment to run a single command and then return ####
$(DOCKER_RUN) $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
help: ## Show this help ####
@printf "%s\n" ''
@printf "%s\n" ' ._ _ _. _ _|_ __ ._ _. ._ _. | | _ | / _|_ _ _ _|_ __ ._ _ _ |'
@printf "%s\n" ' | (/_ (_| (_ |_ |_) (_| | (_| | | (/_ | / |_ (/_ _> |_ |_) (_) (_) |'
@printf "%s\n" ' | |'
@printf "\n"
@printf "\033[33mUsage:\033[0m\n"
@printf " make [target]\n"
@printf "\n"
@printf "\033[33mTargets:\033[0m\n"
@printf " \033[32m%-32s\033[0m %s\n" 'all' 'Runs everything'
@printf " \033[32m%-32s\033[0m %s\n" 'backward-compatibility-check' 'Check code for backwards incompatible changes'
@printf " \033[32m%-32s\033[0m %s\n" 'backward-compatibility-check-raw' 'Check code for backwards incompatible changes, doesn'\''t ignore the failure'
@printf " \033[32m%-32s\033[0m %s\n" 'composer-normalize' 'Normalize composer.json'
@printf " \033[32m%-32s\033[0m %s\n" 'composer-outdated' 'Show outdated packages'
@printf " \033[32m%-32s\033[0m %s\n" 'composer-require' 'Require passed dependencies'
@printf " \033[32m%-32s\033[0m %s\n" 'composer-require-checker' 'Ensure we require every package used in this package directly'
@printf " \033[32m%-32s\033[0m %s\n" 'composer-show' 'Show dependencies'
@printf " \033[32m%-32s\033[0m %s\n" 'composer-unused' 'Ensure we don'\''t require any package we don'\''t use in this package directly'
@printf " \033[32m%-32s\033[0m %s\n" 'composer-validate' 'Ensure we don'\''t require any package we don'\''t use in this package directly'
@printf " \033[32m%-32s\033[0m %s\n" 'composer-why' 'Show why a specific dependency is loaded'
@printf " \033[32m%-32s\033[0m %s\n" 'contrib' 'Runs a subset of everything (all)'
@printf " \033[32m%-32s\033[0m %s\n" 'coverage-guard' 'Enforce code coverage rules'
@printf " \033[32m%-32s\033[0m %s\n" 'coverage-guard-raw' 'Enforce code coverage rules'
@printf " \033[32m%-32s\033[0m %s\n" 'cs' 'Check the code for code style issues'
@printf " \033[32m%-32s\033[0m %s\n" 'cs-fix' 'Fix any automatically fixable code style issues'
@printf " \033[32m%-32s\033[0m %s\n" 'cs-fix-debug' 'Fix any automatically fixable code style issues, but with debugging output'
@printf " \033[32m%-32s\033[0m %s\n" 'documentation-links' 'Check documentation links'
@printf " \033[32m%-32s\033[0m %s\n" 'documentation-markdownlint' 'Lint markdown structure'
@printf " \033[32m%-32s\033[0m %s\n" 'documentation-qa' 'Run all documentation QA checks'
@printf " \033[32m%-32s\033[0m %s\n" 'documentation-typos' 'Check documentation spelling'
@printf " \033[32m%-32s\033[0m %s\n" 'documentation-vale' 'Lint documentation prose (Vale)'
@printf " \033[32m%-32s\033[0m %s\n" 'help' 'Show this help'
@printf " \033[32m%-32s\033[0m %s\n" 'help-contrib' 'Show the migrations help'
@printf " \033[32m%-32s\033[0m %s\n" 'help-migrations' 'Show the migrations help'
@printf " \033[32m%-32s\033[0m %s\n" 'install' 'Install dependencies'
@printf " \033[32m%-32s\033[0m %s\n" 'mutation-testing' 'Run mutation testing'
@printf " \033[32m%-32s\033[0m %s\n" 'mutation-testing-raw' 'Run mutation testing'
@printf " \033[32m%-32s\033[0m %s\n" 'on-install-or-update' 'Tasks, like migrations, that specifically have be run after composer install or update. These will also run by self hosted Renovate'
@printf " \033[32m%-32s\033[0m %s\n" 'outdated' 'Show outdated dependencies'
@printf " \033[32m%-32s\033[0m %s\n" 'rector-upgrade' 'Upgrade any automatically upgradable old code'
@printf " \033[32m%-32s\033[0m %s\n" 'run' 'Provides access in the expected environment to run a single command and then return'
@printf " \033[32m%-32s\033[0m %s\n" 'shell' 'Provides Shell access in the expected environment'
@printf " \033[32m%-32s\033[0m %s\n" 'stan' 'Run static analysis (PHPStan)'
@printf " \033[32m%-32s\033[0m %s\n" 'supported-features' 'CI: List the features this package supports'
@printf " \033[32m%-32s\033[0m %s\n" 'syntax-php' 'Lint PHP syntax'
@printf " \033[32m%-32s\033[0m %s\n" 'task-list-ci-all' 'CI: Generate a JSON array of jobs to run on all variations'
@printf " \033[32m%-32s\033[0m %s\n" 'task-list-ci-dos' 'CI: Generate a JSON array of jobs to run Directly on the OS variations'
@printf " \033[32m%-32s\033[0m %s\n" 'task-list-ci-high' 'CI: Generate a JSON array of jobs to run against the highest dependencies on the primary threading target'
@printf " \033[32m%-32s\033[0m %s\n" 'task-list-ci-locked' 'CI: Generate a JSON array of jobs to run against the locked dependencies on the primary threading target'
@printf " \033[32m%-32s\033[0m %s\n" 'task-list-ci-low' 'CI: Generate a JSON array of jobs to run against the lowest dependencies on the primary threading target'
@printf " \033[32m%-32s\033[0m %s\n" 'unit-testing' 'Run tests'
@printf " \033[32m%-32s\033[0m %s\n" 'unit-testing-filter' 'Run tests with specified filter'
@printf " \033[32m%-32s\033[0m %s\n" 'unit-testing-raw' 'Run tests'
@printf " \033[32m%-32s\033[0m %s\n" 'update' 'Update dependencies'
@printf " \033[32m%-32s\033[0m %s\n" 'update-lock' 'Update lockfile'
help-migrations: ## Show the migrations help ####
@printf "%s\n" ''
@printf "%s\n" ' ._ _ o _ ._ _. _|_ o _ ._ _'
@printf "%s\n" ' | | | | (_| | (_| |_ | (_) | | _>'
@printf "%s\n" ' _|'
@printf "\n"
@printf "\033[33mUsage:\033[0m\n"
@printf " make [target]\n"
@printf "\n"
@printf "\033[33mTargets:\033[0m\n"
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-ai-append-etc-agents-md-to-agents-md' 'Append `etc/AGENTS.md` to `AGENTS.md` when present'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-docs-create-documentation-markdownlint-config-if-not-exists' 'Create `etc/qa/documentation.markdownlint-cli2.yaml` when missing'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-docs-create-license-when-it-doesnt-exists' 'Create license when it doesn'\''t exists'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-docs-create-lychee-config-if-not-exists' 'Create `etc/qa/lychee.toml` when missing'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-docs-create-vale-vocab-symlink-if-not-exists' 'Create WyriHaximus Vale vocab symlink when missing'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-docs-enforce-contributing-md-contents' 'Enforce CONTRIBUTING.md contents'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-docs-enforce-cspell-config-contents' 'Enforce `etc/qa/cspell.json` contents'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-docs-enforce-vale-config-contents' 'Enforce `etc/qa/vale.ini` contents'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-docs-enforce-vale-vocab-contents' 'Enforce `etc/qa/vale-vocab.txt` contents'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-docs-enrich-qa-wordlists-with-php-symbols' 'Merge PHP symbol and Composer package names into etc/qa documentation wordlists'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-docs-prepend-lychee-max-retries-if-missing' 'Prepend Lychee max_retries 6 to etc/qa/lychee.toml when missing'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-docs-prepend-lychee-retry-wait-time-if-missing' 'Prepend Lychee retry_wait_time 3 to etc/qa/lychee.toml when missing'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-docs-prepend-lychee-timeout-if-missing' 'Prepend Lychee timeout 120 to etc/qa/lychee.toml when missing'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-docs-update-etc-readme-template-copyright-c-year-to-current' 'Update readme template in etc/ copyright year to current'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-docs-update-etc-readme-template-copyright-year-to-current' 'Update readme template in etc/ copyright year to current'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-docs-update-license-copyright-c-year-to-current' 'Update license copyright year to current'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-docs-update-license-copyright-year-to-current' 'Update license copyright year to current'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-docs-update-readme-copyright-c-year-to-current' 'Update readme copyright year to current'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-docs-update-readme-copyright-year-to-current' 'Update readme copyright year to current'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-git-enforce-agents-md-contents' 'Enforce `AGENTS.md` contents'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-git-enforce-editorconfig-contents' 'Enforce `.editorconfig` contents'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-git-enforce-gitattributes-contents' 'Enforce `.gitattributes` contents'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-git-make-sure-gitignore-excludes-var-gitkeep' 'Make sure `.gitignore` excludes `var/.gitkeep`'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-git-make-sure-gitignore-exists' 'Make sure `.gitignore` exists'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-git-make-sure-gitignore-ignores-vale-styles-except-vocab' 'Ignore Vale styles except WyriHaximus vocab symlink'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-git-make-sure-gitignore-ignores-var' 'Make sure `.gitignore` ignores `var/*`'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-github-actions-create-ci-if-not-exists' 'Create CI Workflow if it doesn'\''t exists at `.github/workflows/ci.yaml`'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-github-actions-create-release-management-if-not-exists' 'Create Release Management Workflow if it doesn'\''t exists at `.github/workflows/release-management.yaml`'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-github-actions-ensure-runs-on-is-the-only-runs-on-variant-in-utils-yaml' 'Ensure `runsOn` is the only `runsOn` variant in `.github/workflows/utils.yaml`'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-github-actions-fix-management-in-release-management-referenced-workflow-file' 'Fix management in release-management referenced workflow file'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-github-actions-move-ci' 'Move `.github/workflows/ci.yml` to `.github/workflows/ci.yaml`'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-github-actions-move-release-management' 'Move `.github/workflows/release-managment.yaml` to `.github/workflows/release-management.yaml`'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-github-actions-pin-package-workflow-reference-at-v1-0-0' 'Pin WyriHaximus/github-workflows reusable workflow references to SHA `5343944be2a6ef963186b5f413121fcf36980b33` (`v1.0.0`) in `.github/workflows`'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-github-actions-remove-ci-if-its-old-style-php-ci-workflow' 'Remove CI Workflow if its the old style PHP CI Workflow'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-github-actions-remove-composer-diff' 'Remove `composer-diff.yaml` it has been folded into centralized workflows through `ci.yaml`'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-github-actions-remove-markdown-check-links' 'Remove `markdown-check-links.yaml` it has been folded into centralized workflows through `ci.yaml`'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-github-actions-remove-markdown-craft-release' 'Remove `craft-release.yaml` it has been folded into centralized workflows through `release-management.yaml`'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-github-actions-remove-set-milestone-on-pr' 'Remove `set-milestone-on-pr.yaml` it has been folded into centralized workflows through `release-management.yaml`'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-github-actions-rename-yml-workflow-files-to-yaml' 'Rename all `.yml` files in `.github/workflows` to `.yaml`'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-github-codeowners' 'Ensure a `CODEOWNERS` file is present, create only if it doesn'\''t exist yet'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-inline-code-phpstan-remove-line-phpstan-ignore-next-line' 'Remove all lines that contains @phpstan-ignore-next-line'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-inline-code-phpstan-remove-rest-of-line-phpstan-ignore-line' 'Remove rest of line for all lines that contain @phpstan-ignore-line'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-inline-code-phpunit-replace-expectexceptionmessage-with-expectexceptionmessageisorcontains' 'Replace self::expectExceptionMessage with self::expectExceptionMessageIsOrContains in all PHPUnit tests'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-inline-code-psalm-remove-line-psalm-suppress' 'Remove all lines that contain @psalm-suppress'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-inline-code-remove-line-infection-ignore-all' 'Remove all lines that contain @infection-ignore-all'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-inline-code-remove-line-internal' 'Remove all lines that contain @internal'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-add-github-true-to-for-infection' 'Ensure we configure infection to emit logs to GitHub in `etc/qa/infection.json5`'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-composer-require-checker-create-config-if-not-exists' 'Create Composer Require Checker config file if it doesn'\''t exists at `etc/qa/composer-require-checker.json`'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-composer-unused-create-config-if-not-exists' 'Create Composer Unused config file if it doesn'\''t exists at `etc/qa/composer-unused.php`'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-composer-unused-drop-commented-out-line-scattered-across-my-repos' 'Update Composer Unused config file dropping a commented out line that is scattered cross my repos'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-ensure-etc-ci-markdown-link-checker-json-exists' 'Make sure we have `etc/ci/markdown-link-checker.json`'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-ensure-etc-qa-coverage-guard-php-exists' 'Make sure we have `etc/qa/coverage-guard.php`'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-ensure-etc-qa-zzz-disable-otel-attr-hooks-ini-exists' 'Make sure we have `etc/qa/zzz_disable_otel_attr_hooks.ini`'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-fix-logs-relative-paths-for-infection' 'Fix logs paths in `etc/qa/infection.json5`'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-infection-add-threads-64-to-config' 'Ensure `threads` is set to `64` in `etc/qa/infection.json5`'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-infection-create-config-if-not-exists' 'Create Infection config file if it doesn'\''t exists at `etc/qa/infection.json5`'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-infection-ensure-log-json-has-the-correct-path' 'Ensure infection'\''s log.json has config directive has the correct path'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-infection-ensure-log-per-mutator-has-the-correct-path' 'Ensure infection'\''s log.perMutator has config directive has the correct path'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-infection-ensure-log-summary-has-the-correct-path' 'Ensure infection'\''s log.summary has config directive has the correct path'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-infection-ensure-log-text-has-the-correct-path' 'Ensure infection'\''s log.text has config directive has the correct path'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-make-paths-compatible-with-infection-0-32' 'We update path to be relative to `etc/qa/infection.json5` as of 0.32'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-make-sure-etc-ci-exists' 'Make sure `etc/ci/` exists'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-make-sure-etc-exists' 'Make sure `etc/` exists'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-make-sure-etc-qa-exists' 'Make sure `etc/qa/` exists'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-make-sure-github-exists' 'Make sure `.github/` exists'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-make-sure-github-workflows-exists' 'Make sure `.github/workflows` exists'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-make-sure-var-exists' 'Make sure `var/` exists'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-make-sure-var-gitkeep-exists' 'Make sure `var/.gitkeep` exists'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-migrate-composer-unused-from-extra-unused-to-etc-qa-composer-used-php' 'Migrate Compose Unused from `composer.json` extra unused to `etc/qa/composer-unused.php`'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-move-composer-require-checker' 'Move composer-require-checker.json to `etc/qa/composer-require-checker.json`'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-move-infection-config-to-etc' 'Move `infection.json.dist` to `etc/qa/infection.json5`'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-move-phpcs' 'Move `phpcs.xml.dist` to `etc/qa/phpcs.xml`'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-move-phpcs-not-dist' 'Move `phpcs.xml` to `etc/qa/phpcs.xml`'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-move-phpstan' 'Move `phpstan.neon` to `etc/qa/phpstan.neon`'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-move-psalm-xml-config-to-etc' 'Move `psalm.xml` to `etc/qa/psalm.xml`'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-phpcs-make-basepath-is-correct-relatively' 'Make sure PHPCS base path is has `../../` and not `.`'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-phpcs-make-cache-is-correct-relatively' 'Make sure PHPCS cache path is has `../../var/.phpcs.cache` and not `.phpcs.cache`'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-phpcs-make-sure-config-has-correct-relative-path-for-etc' 'Make sure PHPCS has `../../` prefixing `etc/` to ensure correct relative path'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-phpcs-make-sure-config-has-correct-relative-path-for-src' 'Make sure PHPCS has `../../` prefixing `src/` to ensure correct relative path'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-phpcs-make-sure-config-has-correct-relative-path-for-tests' 'Make sure PHPCS has `../../` prefixing `tests/` to ensure correct relative path'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-phpcs-make-sure-etc-has-no-trailing-slash' 'Make sure PHPCS has no tailing `/` on `etc`'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-phpcs-make-sure-etc-is-ran-through' 'Make sure PHPCS runs through `etc`'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-phpcs-make-sure-src-has-no-trailing-slash' 'Make sure PHPCS has no tailing `/` on src'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-phpcs-make-sure-tests-has-no-trailing-slash' 'Make sure PHPCS has no tailing `/` on `tests`'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-phpstan-add-prefix-for-anything-that-starts-with-vendor-in-a-list' 'PHPStan add `../../` to anything in a list that starts with `vendor`'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-remove-old-appveyor-yml-config' 'Make sure we remove `appveyor.yml`'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-remove-old-php-cs-fiver-config' 'Make sure we remove `.php_cs`'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-remove-old-phpunit-xml-config' 'Make sure we remove `phpunit.xml`'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-remove-old-phpunit-xml-dist-config' 'Make sure we remove `phpunit.xml.dist`'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-remove-old-scrutinizer-yml-config' 'Make sure we remove `.scrutinizer.yml`'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-remove-old-travis-yml-config' 'Make sure we remove `.travis.yml`'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-remove-phpunit-config-dir-from-infection' 'Drop XXX from `etc/qa/infection.json5`'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-remove-psalm-xml-config' 'Make sure we remove `etc/qa/psalm.xml`'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-set-phpcs-ensure-config-file-exists' 'Make sure we have a PHPCS config file at `etc/qa/phpcs.xml`'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-set-phpstan-add-parameters-if-it-isnt-present-in-the-config-file' 'Add parameters to PHPStan config file at `etc/qa/phpstan.neon` if it'\''s not present'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-set-phpstan-drop-checkGenericClassInNonGenericObjectType' 'Ensure PHPStan config doesn'\''t contain checkGenericClassInNonGenericObjectType as it'\''s no longer a valid config option'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-set-phpstan-drop-include-async-test-utilities-rules' 'Ensure PHPStan config doesn'\''t contain include for `wyrihaximus/async-test-utilities/rules.neon` as it'\''s now an extension'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-set-phpstan-drop-include-test-utilities-rules' 'Ensure PHPStan config doesn'\''t contain include for `wyrihaximus/async-utilities/rules.neon` as it'\''s now an extension'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-set-phpstan-ensure-config-file-exists' 'Make sure we have a PHPStan config file at `etc/qa/phpstan.neon`'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-set-phpstan-level-max-in-config' 'Ensure PHPStan config has level set to max in `etc/qa/phpstan.neon`'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-set-phpstan-paths-in-config' 'Ensure PHPStan config has the `etc`, `src`, and (optionally) `tests` paths set in `etc/qa/phpstan.neon`'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-set-phpstan-resolve-ergebnis-noExtends-classesAllowedToBeExtended' 'Ensure PHPStan config uses ergebnis.noExtends.classesAllowedToBeExtended not ergebnis.classesAllowedToBeExtended'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-set-phpstan-uncomment-parameters' 'Ensure PHPStan config as parameters not commented out in `etc/qa/phpstan.neon`'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-set-phpunit-ensure-config-file-exists' 'Make sure we have a PHPUnit config file at `etc/qa/phpunit.xml`'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-set-phpunit-make-sure-we-see-all-the-warnings-deprecations-etc-etc-that-will-make-phpunit-do-a-non-happy-exit' 'Make sure we see all the warnings, deprecations, etc etc that will make PHPunit do a non-happy exit'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-set-phpunit-xsd-path-to-local' 'Ensure that the PHPUnit XDS referred in `etc/qa/phpunit.xml` points to `vendor/phpunit/phpunit/phpunit.xsd` so we don'\''t go over the network'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-set-rector-create-config-if-not-exists' 'Create Rector config file if it doesn'\''t exists at `etc/qa/rector.php`'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-php-update-rector-from-testutilities-to-rectorphp-namespace-for-rector-config' 'Update RectorPHP config file `etc/qa/rector.php` from `TestUtilities` to `RectorPHP` namespace'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-phpcs-include-examples-directory-when-present' 'Make sure PHPCS runs through `examples` when it exists'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-renovate-create-config-if-not-exists' 'Create Renovate Config if it doesn'\''t exists at `.github/renovate.json`'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-renovate-move-config' 'Move `renovate.json` to `.github/renovate.json`'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-renovate-point-at-correct-config' 'Ensure `.github/renovate.json` points at github>WyriHaximus/renovate-config:php-package instead of local>WyriHaximus/renovate-config'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-renovate-remove-dependabot-config' 'Make sure we remove `.github/dependabot.yml`'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-renovate-set-composer-constraint' 'Always keep renovate'\''s `constraints.composer` at `2.x`'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-renovate-set-php-constraint' 'Always keep renovate'\''s constraints.php in sync with `composer.json`'\''s `config.platform.php`'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-supported-features-php-ensure-no-composer-require-checker-config-file-is-present-when-composer-dependency-checkers-are-disabled' 'Ensure we remove the Composer Require Checker config file when composer-dependency-checkers aren'\''t enabled'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-supported-features-php-ensure-no-composer-unused-config-file-is-present-when-composer-dependency-checkers-are-disabled' 'Ensure we remove the Composer Unused config file when composer-dependency-checkers aren'\''t enabled'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-supported-features-php-ensure-no-infectionphp-config-file-is-present-when-unit-tests-are-disabled' 'Ensure we remove the InfectionPHP config file when unit-tests aren'\''t enabled'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-supported-features-php-ensure-no-phpcs-config-file-is-present-when-code-style-is-disabled' 'Ensure we remove the PHPCSS config file when code-style isn'\''t enabled'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-supported-features-php-ensure-no-phpunit-config-file-is-present-when-unit-tests-are-disabled' 'Ensure we remove the PHPUnit config file when unit-tests aren'\''t enabled'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-supported-features-php-ensure-no-rector-config-file-is-present-when-code-style-is-disabled' 'Ensure we remove the RectorPHP config file when code-style isn'\''t enabled'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-supported-features-php-ensure-no-zzz-disable-otel-attr-hooks-ini-when-opentelemetry-instrumentation-is-enabled' 'Ensure we remove `etc/qa/zzz_disable_otel_attr_hooks.ini` when opentelemetry-instrumentation is enabled'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-supported-features-php-ensure-we-only-cs-check-and-fix-tests-if-unit-tests-is-enabled' 'Ensure we only cs check/fix tests/ if unit-tests is enabled'
@printf " \033[32m%-32s\033[0m %s\n" 'migrations-supported-features-php-ensure-we-only-staticly-analyse-tests-with-phpstan-if-unit-tests-is-enabled' 'Ensure we only staticly analyse tests/ with PHPStan if unit-tests is enabled'
help-contrib: ## Show the migrations help ####
@printf "%s\n" ''
@printf "%s\n" ' _ _ ._ _|_ ._ o |_'
@printf "%s\n" ' (_ (_) | | |_ | | |_)'
@printf "%s\n" ''
@printf "\n"
@printf "\033[33mUsage:\033[0m\n"
@printf " make [target]\n"
@printf "\n"
@printf "\033[33mTargets:\033[0m\n"
@printf " \033[32m%-32s\033[0m %s\n" 'composer-require-checker' 'Ensure we require every package used in this package directly'
@printf " \033[32m%-32s\033[0m %s\n" 'composer-unused' 'Ensure we don'\''t require any package we don'\''t use in this package directly'
@printf " \033[32m%-32s\033[0m %s\n" 'cs' 'Check the code for code style issues'
@printf " \033[32m%-32s\033[0m %s\n" 'cs-fix' 'Fix any automatically fixable code style issues'
@printf " \033[32m%-32s\033[0m %s\n" 'documentation-qa' 'Run all documentation QA checks'
@printf " \033[32m%-32s\033[0m %s\n" 'unit-testing' 'Run tests'
task-list-ci:
@echo "[]"
task-list-ci-all: ## CI: Generate a JSON array of jobs to run on all variations
@echo "[\"composer-validate\",\"syntax-php\",\"cs\",\"stan\",\"unit-testing\",\"mutation-testing\",\"composer-require-checker\",\"composer-unused\",\"backward-compatibility-check\"]" ## Count: 9
task-list-ci-dos: ## CI: Generate a JSON array of jobs to run Directly on the OS variations
@echo "[\"unit-testing-raw\"]" ## Count: 1
task-list-ci-low: ## CI: Generate a JSON array of jobs to run against the lowest dependencies on the primary threading target
@echo "[\"syntax-php\",\"cs\",\"stan\",\"mutation-testing\"]" ## Count: 4
task-list-ci-locked: ## CI: Generate a JSON array of jobs to run against the locked dependencies on the primary threading target
@echo "[\"composer-validate\",\"cs\",\"stan\",\"mutation-testing\",\"composer-require-checker\",\"composer-unused\",\"backward-compatibility-check\",\"documentation-markdownlint\",\"documentation-links\",\"documentation-typos\",\"documentation-vale\"]" ## Count: 11
task-list-ci-high: ## CI: Generate a JSON array of jobs to run against the highest dependencies on the primary threading target
@echo "[\"syntax-php\",\"cs\",\"stan\",\"mutation-testing\"]" ## Count: 4
supported-features: ## CI: List the features this package supports
@echo "[\"code-style\",\"composer-dependency-checkers\",\"linux\",\"static-analysis\",\"unit-tests\",\"zts\"]" ## Count: 6
## Catch-all for targets that pass through extra arguments (e.g. `make run ls`)
%:
@: