‪TYPO3CMS  9.5
TcaMigrationTest.php
Go to the documentation of this file.
1 <?php
2 declare(strict_types = 1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
20 
24 class ‪TcaMigrationTest extends UnitTestCase
25 {
29  public function ‪missingTypeThrowsException(): void
30  {
31  $input = [
32  'aTable' => [
33  'columns' => [
34  'field_a' => [
35  'label' => 'aLabel',
36  'config' => [
37  'type' => 'text',
38  ],
39  ],
40  'field_b' => [
41  'label' => 'bLabel',
42  'config' => [
43  'rows' => 42,
44  'wizards' => []
45  ],
46  ],
47  ],
48  ],
49  ];
50  $this->expectException(\RuntimeException::class);
51  $this->expectExceptionCode(1482394401);
52  $subject = new ‪TcaMigration();
53  $subject->migrate($input);
54  }
55 
60  {
61  $input = $expected = [
62  'aTable' => [
63  'ctrl' => [
64  'aKey' => 'aValue',
65  ],
66  'columns' => [
67  'aField' => [
68  'label' => 'foo',
69  'config' => [
70  'type' => 'aType',
71  'lolli' => 'did this',
72  ]
73  ],
74  ],
75  'types' => [
76  0 => [
77  'showitem' => 'this,should;stay,this,too',
78  ],
79  ],
80  ],
81  ];
82  $subject = new ‪TcaMigration();
83  $this->assertEquals($expected, $subject->migrate($input));
84  }
85 
89  public function ‪migrateAddsMissingColumnsConfig(): void
90  {
91  $input = [
92  'aTable' => [
93  'columns' => [
94  'aField' => [
95  'exclude' => true,
96  ],
97  'bField' => [
98  ],
99  'cField' => [
100  'config' => 'i am a string but should be an array',
101  ],
102  'dField' => [
103  // This kept as is, 'config' is not added. This is relevant
104  // for "flex" data structure arrays with section containers
105  // that have 'type'=>'array' on this level and an 'el' sub array
106  // with details.
107  'type' => 'array',
108  ],
109  ]
110  ],
111  ];
112  $expected = [
113  'aTable' => [
114  'columns' => [
115  'aField' => [
116  'exclude' => true,
117  'config' => [
118  'type' => 'none',
119  ],
120  ],
121  'bField' => [
122  'config' => [
123  'type' => 'none',
124  ],
125  ],
126  'cField' => [
127  'config' => [
128  'type' => 'none',
129  ],
130  ],
131  'dField' => [
132  'type' => 'array',
133  ],
134  ],
135  ],
136  ];
137  $subject = new ‪TcaMigration();
138  $this->assertEquals($expected, $subject->migrate($input));
139  }
140 
145  {
146  $input = [
147  'aTable' => [
148  'columns' => [
149  'bodytext' => [
150  'exclude' => true,
151  'label' => 'aLabel',
152  'config' => [
153  'type' => 'text',
154  'rows' => 42,
155  'wizards' => [
156  't3editor' => [
157  'type' => 'userFunc',
158  'userFunc' => 'TYPO3\CMS\T3editor\FormWizard->main',
159  'title' => 't3editor',
160  'icon' => 'content-table',
161  'module' => [
162  'name' => 'wizard_table'
163  ],
164  'params' => [
165  'format' => 'html',
166  'style' => 'width:98%; height: 60%;'
167  ],
168  ],
169  ],
170  ],
171  ],
172  ],
173  ],
174  ];
175  $expected = [
176  'aTable' => [
177  'columns' => [
178  'bodytext' => [
179  'exclude' => true,
180  'label' => 'aLabel',
181  'config' => [
182  'type' => 'text',
183  'renderType' => 't3editor',
184  'format' => 'html',
185  'rows' => 42,
186  ],
187  ],
188  ],
189  ],
190  ];
191  $subject = new ‪TcaMigration();
192  $this->assertEquals($expected, $subject->migrate($input));
193  }
194 
199  {
200  $input = [
201  'aTable' => [
202  'types' => [
203  0 => [
204  'showitem' => 'aField,anotherField;with;;;style-pointer,thirdField',
205  ],
206  1 => [
207  'showitem' => 'aField,;;;;only-a-style-pointer,anotherField',
208  ],
209  ],
210  ],
211  ];
212  $expected = [
213  'aTable' => [
214  'types' => [
215  0 => [
216  'showitem' => 'aField,anotherField;with,thirdField',
217  ],
218  1 => [
219  'showitem' => 'aField,anotherField',
220  ],
221  ],
222  ],
223  ];
224  $subject = new ‪TcaMigration();
225  $this->assertEquals($expected, $subject->migrate($input));
226  }
227 
232  {
233  $input = [
234  'aTable' => [
235  'types' => [
236  0 => [
237  'showitem' => 'aField,anotherField;with;;nowrap,thirdField',
238  ],
239  ],
240  ],
241  ];
242  $expected = [
243  'aTable' => [
244  'types' => [
245  0 => [
246  'showitem' => 'aField,anotherField;with,thirdField',
247  'columnsOverrides' => [
248  'anotherField' => [
249  'config' => [
250  'wrap' => 'off',
251  ]
252  ],
253  ],
254  ],
255  ],
256  ],
257  ];
258  $subject = new ‪TcaMigration();
259  $this->assertEquals($expected, $subject->migrate($input));
260  }
261 
266  {
267  $input = [
268  'aTable' => [
269  'columns' => [
270  'anotherField' => [
271  'defaultExtras' => 'nowrap',
272  'config' => [
273  'type' => 'text',
274  ],
275  ],
276  ],
277  'types' => [
278  0 => [
279  'showitem' => 'aField,anotherField;with;;enable-tab,thirdField',
280  ],
281  ],
282  ],
283  ];
284  $expected = [
285  'aTable' => [
286  'columns' => [
287  'anotherField' => [
288  'config' => [
289  'wrap' => 'off',
290  'type' => 'text',
291  ],
292  ],
293  ],
294  'types' => [
295  0 => [
296  'showitem' => 'aField,anotherField;with,thirdField',
297  'columnsOverrides' => [
298  'anotherField' => [
299  'config' => [
300  'wrap' => 'off',
301  'enableTabulator' => true,
302  ],
303  ],
304  ],
305  ],
306  ],
307  ],
308  ];
309  $subject = new ‪TcaMigration();
310  $this->assertEquals($expected, $subject->migrate($input));
311  }
312 
317  {
318  $input = [
319  'aTable' => [
320  'columns' => [
321  'bodytext' => [
322  'exclude' => true,
323  'label' => 'aLabel',
324  'config' => [
325  'type' => 'text',
326  'rows' => 42,
327  'wizards' => [
328  't3editorHtml' => [
329  'type' => 'userFunc',
330  'userFunc' => 'TYPO3\CMS\T3editor\FormWizard->main',
331  'enableByTypeConfig' => 1,
332  'title' => 't3editor',
333  'icon' => 'content-table',
334  'module' => [
335  'name' => 'wizard_table'
336  ],
337  'params' => [
338  'format' => 'html',
339  'style' => 'width:98%; height: 60%;'
340  ],
341  ],
342  't3editorTypoScript' => [
343  'type' => 'userFunc',
344  'userFunc' => 'TYPO3\CMS\T3editor\FormWizard->main',
345  'enableByTypeConfig' => 1,
346  'title' => 't3editor',
347  'icon' => 'content-table',
348  'module' => [
349  'name' => 'wizard_table'
350  ],
351  'params' => [
352  'format' => 'typoscript',
353  'style' => 'width:98%; height: 60%;'
354  ],
355  ],
356  ],
357  ],
358  ],
359  ],
360  'types' => [
361  'firstType' => [
362  'showitem' => 'foo,bodytext;;;wizards[t3editorTypoScript|someOtherWizard],bar',
363  ],
364  'secondType' => [
365  'showitem' => 'foo,bodytext;;;nowrap:wizards[t3editorHtml], bar',
366  ],
367  ],
368  ],
369  ];
370  $expected = [
371  'aTable' => [
372  'columns' => [
373  'bodytext' => [
374  'exclude' => true,
375  'label' => 'aLabel',
376  'config' => [
377  'type' => 'text',
378  'rows' => 42,
379  ],
380  ],
381  ],
382  'types' => [
383  'firstType' => [
384  'showitem' => 'foo,bodytext,bar',
385  'columnsOverrides' => [
386  'bodytext' => [
387  'config' => [
388  'format' => 'typoscript',
389  'renderType' => 't3editor',
390  ],
391  ],
392  ],
393  ],
394  'secondType' => [
395  'showitem' => 'foo,bodytext,bar',
396  'columnsOverrides' => [
397  'bodytext' => [
398  'config' => [
399  'format' => 'html',
400  'renderType' => 't3editor',
401  'wrap' => 'off',
402  ],
403  ],
404  ],
405  ],
406  ],
407  ],
408  ];
409  $subject = new ‪TcaMigration();
410  $this->assertEquals($expected, $subject->migrate($input));
411  }
412 
417  {
418  $input = [
419  'aTable' => [
420  'columns' => [
421  'bodytext' => [
422  'exclude' => true,
423  'label' => 'aLabel',
424  'config' => [
425  'type' => 'text',
426  'rows' => 42,
427  'wizards' => [
428  't3editorHtml' => [
429  'type' => 'userFunc',
430  'userFunc' => 'TYPO3\CMS\T3editor\FormWizard->main',
431  'enableByTypeConfig' => 1,
432  'title' => 't3editor',
433  'icon' => 'content-table',
434  'module' => [
435  'name' => 'wizard_table'
436  ],
437  'params' => [
438  'format' => 'html',
439  'style' => 'width:98%; height: 60%;'
440  ],
441  ],
442  ],
443  ],
444  ],
445  ],
446  ],
447  ];
448  $expected = [
449  'aTable' => [
450  'columns' => [
451  'bodytext' => [
452  'exclude' => true,
453  'label' => 'aLabel',
454  'config' => [
455  'type' => 'text',
456  'rows' => 42,
457  ],
458  ],
459  ],
460  ],
461  ];
462  $subject = new ‪TcaMigration();
463  $this->assertEquals($expected, $subject->migrate($input));
464  }
465 
470  {
471  $input = [
472  'aTable' => [
473  'columns' => [
474  'anotherField' => [
475  'config' => [
476  'type' => 'text',
477  ],
478  ],
479  ],
480  'types' => [
481  0 => [
482  'showitem' => 'aField;;;',
483  ],
484  1 => []
485  ],
486  ],
487  ];
488  $subject = new ‪TcaMigration();
489  $subject->migrate($input);
490  $this->assertEmpty($subject->getMessages());
491  }
492 
497  {
498  $input = [
499  'aTable' => [
500  'types' => [
501  'firstType' => [
502  'showitem' => 'field1;field1Label,field2;fieldLabel2;palette1,field2;;palette2',
503  ],
504  ],
505  ],
506  ];
507  $expected = [
508  'aTable' => [
509  'types' => [
510  'firstType' => [
511  'showitem' => 'field1;field1Label,field2;fieldLabel2,--palette--;;palette1,field2,--palette--;;palette2',
512  ],
513  ],
514  ],
515  ];
516  $subject = new ‪TcaMigration();
517  $this->assertEquals($expected, $subject->migrate($input));
518  }
519 
524  {
525  $input = [
526  'aTable' => [
527  'columns' => [
528  'bodytext' => [
529  'config' => [
530  'type' => 'text',
531  'wizards' => [
532  't3editorHtml' => [
533  'icon' => 'wizard_table.gif',
534  ],
535  ],
536  ],
537  ],
538  ],
539  ],
540  ];
541 
542  $expected = [
543  'aTable' => [
544  'columns' => [
545  'bodytext' => [
546  'config' => [
547  'type' => 'text',
548  'wizards' => [
549  't3editorHtml' => [
550  'icon' => 'content-table',
551  ],
552  ],
553  ],
554  ],
555  ],
556  ],
557  ];
558 
559  $subject = new ‪TcaMigration();
560  $this->assertEquals($expected, $subject->migrate($input));
561  }
562 
566  public function ‪migrateExtAndSysextPathToEXTPath(): void
567  {
568  $input = [
569  'aTable' => [
570  'columns' => [
571  'foo' => [
572  'config' => [
573  'type' => 'select',
574  'items' => [
575  ['foo', 0, 'ext/myext/foo/bar.gif'],
576  ['bar', 1, 'sysext/myext/foo/bar.gif'],
577  ],
578  ],
579  ],
580  ],
581  ],
582  ];
583 
584  $expected = [
585  'aTable' => [
586  'columns' => [
587  'foo' => [
588  'config' => [
589  'type' => 'select',
590  'renderType' => 'selectSingle',
591  'items' => [
592  ['foo', 0, 'EXT:myext/foo/bar.gif'],
593  ['bar', 1, 'EXT:myext/foo/bar.gif'],
594  ],
595  ],
596  ],
597  ],
598  ],
599  ];
600 
601  $subject = new ‪TcaMigration();
602  $this->assertEquals($expected, $subject->migrate($input));
603  }
604 
609  {
610  $input = [
611  'aTable' => [
612  'columns' => [
613  'foo' => [
614  'config' => [
615  'type' => 'select',
616  'items' => [
617  ['foo', 0, 'i/tt_content.gif'],
618  ],
619  ],
620  ],
621  ],
622  ],
623  ];
624 
625  $expected = [
626  'aTable' => [
627  'columns' => [
628  'foo' => [
629  'config' => [
630  'type' => 'select',
631  'renderType' => 'selectSingle',
632  'items' => [
633  ['foo', 0, 'EXT:backend/Resources/Public/Images/tt_content.gif'],
634  ],
635  ],
636  ],
637  ],
638  ],
639  ];
640 
641  $subject = new ‪TcaMigration();
642  $this->assertEquals($expected, $subject->migrate($input));
643  }
644 
648  public function ‪migrateRemovesIconsInOptionTags(): void
649  {
650  $input = [
651  'aTable' => [
652  'columns' => [
653  'foo' => [
654  'config' => [
655  'type' => 'select',
656  'iconsInOptionTags' => 1,
657  ],
658  ],
659  ],
660  ],
661  ];
662  $expected = [
663  'aTable' => [
664  'columns' => [
665  'foo' => [
666  'config' => [
667  'type' => 'select',
668  'renderType' => 'selectSingle',
669  ],
670  ],
671  ],
672  ],
673  ];
674 
675  $subject = new ‪TcaMigration();
676  $this->assertEquals($expected, $subject->migrate($input));
677  }
678 
683  {
684  $input = [
685  'aTable' => [
686  'ctrl' => [
687  'iconfile' => '../typo3conf/ext/myExt/iconfile.gif',
688  ],
689  ],
690  ];
691  $expected = [
692  'aTable' => [
693  'ctrl' => [
694  'iconfile' => 'EXT:myExt/iconfile.gif',
695  ],
696  ],
697  ];
698  $subject = new ‪TcaMigration();
699  $this->assertEquals($expected, $subject->migrate($input));
700  }
701 
706  {
707  $input = [
708  'aTable' => [
709  'ctrl' => [
710  'iconfile' => 'iconfile.gif',
711  ],
712  ],
713  ];
714  $expected = [
715  'aTable' => [
716  'ctrl' => [
717  'iconfile' => 'EXT:backend/Resources/Public/Images/iconfile.gif',
718  ],
719  ],
720  ];
721  $subject = new ‪TcaMigration();
722  $this->assertEquals($expected, $subject->migrate($input));
723  }
724 
729  {
730  $input = [
731  'aTable' => [
732  'ctrl' => [
733  'iconfile' => 'EXT:myExt/iconfile.gif',
734  ],
735  ],
736  ];
737  $expected = [
738  'aTable' => [
739  'ctrl' => [
740  'iconfile' => 'EXT:myExt/iconfile.gif',
741  ],
742  ],
743  ];
744  $subject = new ‪TcaMigration();
745  $this->assertEquals($expected, $subject->migrate($input));
746  }
747 
751  public function ‪migrateSelectFieldRenderType(): void
752  {
753  $input = [
754  'aTable-do-not-migrate-because-renderType-is-set' => [
755  'columns' => [
756  'a-column' => [
757  'config' => [
758  'type' => 'select',
759  'renderType' => 'fooBar'
760  ]
761  ]
762  ],
763  ],
764  'aTable-do-migrate-because-renderType-is-not-set' => [
765  'columns' => [
766  'a-tree-column' => [
767  'config' => [
768  'type' => 'select',
769  'renderMode' => 'tree'
770  ]
771  ],
772  'a-singlebox-column' => [
773  'config' => [
774  'type' => 'select',
775  'renderMode' => 'singlebox'
776  ]
777  ],
778  'a-checkbox-column' => [
779  'config' => [
780  'type' => 'select',
781  'renderMode' => 'checkbox'
782  ]
783  ],
784  'an-unknown-column' => [
785  'config' => [
786  'type' => 'select',
787  'renderMode' => 'unknown'
788  ]
789  ],
790  'a-maxitems-column-not-set' => [
791  'config' => [
792  'type' => 'select',
793  ]
794  ],
795  'a-maxitems-column-0' => [
796  'config' => [
797  'type' => 'select',
798  'maxitems' => '0'
799  ]
800  ],
801  'a-maxitems-column-1' => [
802  'config' => [
803  'type' => 'select',
804  'maxitems' => '1'
805  ]
806  ],
807  'a-maxitems-column-2' => [
808  'config' => [
809  'type' => 'select',
810  'maxitems' => '2'
811  ]
812  ],
813  'a-tree-column-with-maxitems' => [
814  'config' => [
815  'type' => 'select',
816  'renderMode' => 'tree',
817  'maxitems' => '1'
818  ]
819  ],
820  'a-singlebox-column-with-maxitems' => [
821  'config' => [
822  'type' => 'select',
823  'renderMode' => 'singlebox',
824  'maxitems' => '1'
825  ]
826  ],
827  'a-checkbox-column-with-maxitems' => [
828  'config' => [
829  'type' => 'select',
830  'renderMode' => 'checkbox',
831  'maxitems' => '1'
832  ]
833  ],
834  ],
835  ],
836  ];
837  $expected = [
838  'aTable-do-not-migrate-because-renderType-is-set' => [
839  'columns' => [
840  'a-column' => [
841  'config' => [
842  'type' => 'select',
843  'renderType' => 'fooBar'
844  ]
845  ]
846  ],
847  ],
848  'aTable-do-migrate-because-renderType-is-not-set' => [
849  'columns' => [
850  'a-tree-column' => [
851  'config' => [
852  'type' => 'select',
853  'renderMode' => 'tree',
854  'renderType' => 'selectTree'
855  ]
856  ],
857  'a-singlebox-column' => [
858  'config' => [
859  'type' => 'select',
860  'renderMode' => 'singlebox',
861  'renderType' => 'selectSingleBox'
862  ]
863  ],
864  'a-checkbox-column' => [
865  'config' => [
866  'type' => 'select',
867  'renderMode' => 'checkbox',
868  'renderType' => 'selectCheckBox'
869  ]
870  ],
871  'an-unknown-column' => [
872  'config' => [
873  'type' => 'select',
874  'renderMode' => 'unknown'
875  ]
876  ],
877  'a-maxitems-column-not-set' => [
878  'config' => [
879  'type' => 'select',
880  'renderType' => 'selectSingle'
881  ]
882  ],
883  'a-maxitems-column-0' => [
884  'config' => [
885  'type' => 'select',
886  'maxitems' => '0',
887  'renderType' => 'selectSingle'
888  ]
889  ],
890  'a-maxitems-column-1' => [
891  'config' => [
892  'type' => 'select',
893  'maxitems' => 1,
894  'renderType' => 'selectSingle'
895  ]
896  ],
897  'a-maxitems-column-2' => [
898  'config' => [
899  'type' => 'select',
900  'maxitems' => 2,
901  'renderType' => 'selectMultipleSideBySide'
902  ]
903  ],
904  'a-tree-column-with-maxitems' => [
905  'config' => [
906  'type' => 'select',
907  'renderMode' => 'tree',
908  'renderType' => 'selectTree',
909  'maxitems' => '1'
910  ]
911  ],
912  'a-singlebox-column-with-maxitems' => [
913  'config' => [
914  'type' => 'select',
915  'renderMode' => 'singlebox',
916  'renderType' => 'selectSingleBox',
917  'maxitems' => '1'
918  ]
919  ],
920  'a-checkbox-column-with-maxitems' => [
921  'config' => [
922  'type' => 'select',
923  'renderMode' => 'checkbox',
924  'renderType' => 'selectCheckBox',
925  'maxitems' => '1'
926  ]
927  ],
928  ],
929  ],
930  ];
931  $subject = new ‪TcaMigration();
932  $this->assertEquals($expected, $subject->migrate($input));
933  }
934 
939  {
940  return [
941  'not-a-select-is-kept' => [
942  [
943  // Given config section
944  'type' => 'input',
945  ],
946  [
947  // Expected config section
948  'type' => 'input',
949  ],
950  ],
951  'not-a-selectSingle-is-kept' => [
952  [
953  'type' => 'select',
954  'renderType' => 'selectCheckBox',
955  ],
956  [
957  'type' => 'select',
958  'renderType' => 'selectCheckBox',
959  ],
960  ],
961  'noIconsBelowSelect-true-is-removed' => [
962  [
963  'type' => 'select',
964  'renderType' => 'selectSingle',
965  'noIconsBelowSelect' => true,
966  ],
967  [
968  'type' => 'select',
969  'renderType' => 'selectSingle',
970  ],
971  ],
972  'noIconsBelowSelect-false-is-removed-sets-field-wizard' => [
973  [
974  'type' => 'select',
975  'renderType' => 'selectSingle',
976  'noIconsBelowSelect' => false,
977  ],
978  [
979  'type' => 'select',
980  'renderType' => 'selectSingle',
981  'fieldWizard' => [
982  'selectIcons' => [
983  'disabled' => false,
984  ],
985  ],
986  ],
987  ],
988  'noIconsBelowSelect-false-is-removes-given-showIconTable-false' => [
989  [
990  'type' => 'select',
991  'renderType' => 'selectSingle',
992  'noIconsBelowSelect' => false,
993  'showIconTable' => false,
994  ],
995  [
996  'type' => 'select',
997  'renderType' => 'selectSingle',
998  ],
999  ],
1000  'suppress-icons-1-is-removed' => [
1001  [
1002  'type' => 'select',
1003  'renderType' => 'selectSingle',
1004  'suppress_icons' => '1',
1005  ],
1006  [
1007  'type' => 'select',
1008  'renderType' => 'selectSingle',
1009  ],
1010  ],
1011  'suppress-icons-value-is-removed' => [
1012  [
1013  'type' => 'select',
1014  'renderType' => 'selectSingle',
1015  'suppress_icons' => 'IF_VALUE_FALSE',
1016  ],
1017  [
1018  'type' => 'select',
1019  'renderType' => 'selectSingle',
1020  ],
1021  ],
1022  'selicon-cols-is-removed' => [
1023  [
1024  'type' => 'select',
1025  'renderType' => 'selectSingle',
1026  'selicon_cols' => 16,
1027  ],
1028  [
1029  'type' => 'select',
1030  'renderType' => 'selectSingle',
1031  ],
1032  ],
1033  'foreign_table_loadIcons-is-removed' => [
1034  [
1035  'type' => 'select',
1036  'renderType' => 'selectSingle',
1037  'foreign_table_loadIcons' => true,
1038  ],
1039  [
1040  'type' => 'select',
1041  'renderType' => 'selectSingle',
1042  ],
1043  ],
1044  ];
1045  }
1046 
1053  public function ‪migrateSetsShowIconTableIfMissing(array $givenConfig, array $expectedConfig): void
1054  {
1055  $input = [
1056  'aTable' => [
1057  'columns' => [
1058  'aField' => [
1059  'config' => $givenConfig,
1060  ]
1061  ],
1062  ],
1063  ];
1064  $expected = $input;
1065  $expected['aTable']['columns']['aField']['config'] = $expectedConfig;
1066 
1067  $subject = new ‪TcaMigration();
1068  $this->assertEquals($expected, $subject->migrate($input));
1069  }
1070 
1075  {
1076  $input = [
1077  'aTable' => [
1078  'columns' => [
1079  'aCol' => [
1080  'config' => [
1081  'type' => 'input',
1082  'wizards' => [
1083  'link' => [
1084  'module' => [
1085  'name' => 'wizard_element_browser',
1086  'urlParameters' => [
1087  'mode' => 'wizard'
1088  ]
1089  ],
1090  ],
1091  ],
1092  ],
1093  ],
1094  ],
1095  ],
1096  ];
1097  $expected = [
1098  'aTable' => [
1099  'columns' => [
1100  'aCol' => [
1101  'config' => [
1102  'type' => 'input',
1103  'wizards' => [
1104  'link' => [
1105  'module' => [
1106  'name' => 'wizard_link',
1107  ],
1108  ],
1109  ],
1110  ],
1111  ],
1112  ],
1113  ],
1114  ];
1115 
1116  $subject = new ‪TcaMigration();
1117  $this->assertEquals($expected, $subject->migrate($input));
1118  }
1119 
1124  {
1125  return [
1126  'columns richtext configuration' => [
1127  [
1128  // Given config section
1129  'aTable' => [
1130  'columns' => [
1131  'aField' => [
1132  'config' => [
1133  'type' => 'text',
1134  ],
1135  'defaultExtras' => 'richtext:rte_transform[]'
1136  ]
1137  ]
1138  ]
1139  ],
1140  [
1141  // Expected config section
1142  'aTable' => [
1143  'columns' => [
1144  'aField' => [
1145  'config' => [
1146  'type' => 'text',
1147  'enableRichtext' => true,
1148  'richtextConfiguration' => 'default',
1149  ],
1150  ]
1151  ]
1152  ]
1153  ],
1154  ],
1155  'columns richtext configuration without bracket' => [
1156  [
1157  'aTable' => [
1158  'columns' => [
1159  'aField' => [
1160  'config' => [
1161  'type' => 'text',
1162  ],
1163  'defaultExtras' => 'richtext:rte_transform'
1164  ]
1165  ]
1166  ]
1167  ],
1168  [
1169  'aTable' => [
1170  'columns' => [
1171  'aField' => [
1172  'config' => [
1173  'type' => 'text',
1174  'enableRichtext' => true,
1175  'richtextConfiguration' => 'default',
1176  ],
1177  ]
1178  ]
1179  ]
1180  ],
1181  ],
1182  'columns richtext with mode' => [
1183  [
1184  'aTable' => [
1185  'columns' => [
1186  'aField' => [
1187  'config' => [
1188  'type' => 'text',
1189  ],
1190  'defaultExtras' => 'richtext:rte_transform[mode=ts_css]'
1191  ]
1192  ]
1193  ]
1194  ],
1195  [
1196  'aTable' => [
1197  'columns' => [
1198  'aField' => [
1199  'config' => [
1200  'type' => 'text',
1201  'enableRichtext' => true,
1202  'richtextConfiguration' => 'default',
1203  ],
1204  ]
1205  ]
1206  ]
1207  ],
1208  ],
1209  'columns richtext with mode and others' => [
1210  [
1211  'aTable' => [
1212  'columns' => [
1213  'aField' => [
1214  'config' => [
1215  'type' => 'text',
1216  ],
1217  'defaultExtras' => 'richtext:rte_transform[flag=rte_enabled|mode=ts_css]'
1218  ]
1219  ]
1220  ]
1221  ],
1222  [
1223  'aTable' => [
1224  'columns' => [
1225  'aField' => [
1226  'config' => [
1227  'type' => 'text',
1228  'enableRichtext' => true,
1229  'richtextConfiguration' => 'default',
1230  ],
1231  ]
1232  ]
1233  ]
1234  ],
1235  ],
1236  'columns richtext with array with mode and others' => [
1237  [
1238  'aTable' => [
1239  'columns' => [
1240  'aField' => [
1241  'config' => [
1242  'type' => 'text',
1243  ],
1244  'defaultExtras' => 'richtext[]:rte_transform[flag=rte_enabled|mode=ts_css]'
1245  ]
1246  ]
1247  ]
1248  ],
1249  [
1250  'aTable' => [
1251  'columns' => [
1252  'aField' => [
1253  'config' => [
1254  'type' => 'text',
1255  'enableRichtext' => true,
1256  'richtextConfiguration' => 'default',
1257  ],
1258  ]
1259  ]
1260  ]
1261  ],
1262  ],
1263  'columns richtext * with mode and others' => [
1264  [
1265  'aTable' => [
1266  'columns' => [
1267  'aField' => [
1268  'config' => [
1269  'type' => 'text',
1270  ],
1271  'defaultExtras' => 'richtext[*]:rte_transform[flag=rte_enabled|mode=ts_css]'
1272  ]
1273  ]
1274  ]
1275  ],
1276  [
1277  'aTable' => [
1278  'columns' => [
1279  'aField' => [
1280  'config' => [
1281  'type' => 'text',
1282  'enableRichtext' => true,
1283  'richtextConfiguration' => 'default',
1284  ],
1285  ]
1286  ]
1287  ]
1288  ],
1289  ],
1290  'columns richtext cut-copy-paste with mode and others' => [
1291  [
1292  'aTable' => [
1293  'columns' => [
1294  'aField' => [
1295  'config' => [
1296  'type' => 'text',
1297  ],
1298  'defaultExtras' => 'richtext[cut|copy|paste]:rte_transform[flag=rte_enabled|mode=ts_css]'
1299  ]
1300  ]
1301  ]
1302  ],
1303  [
1304  'aTable' => [
1305  'columns' => [
1306  'aField' => [
1307  'config' => [
1308  'type' => 'text',
1309  'enableRichtext' => true,
1310  'richtextConfiguration' => 'default',
1311  ],
1312  ]
1313  ]
1314  ]
1315  ],
1316  ],
1317  'columnsOverrides richtext with brackets' => [
1318  [
1319  'aTable' => [
1320  'columns' => [
1321  'aField' => [
1322  'config' => [
1323  'type' => 'text',
1324  ],
1325  ],
1326  ],
1327  'types' => [
1328  'aType' => [
1329  'columnsOverrides' => [
1330  'aField' => [
1331  'defaultExtras' => 'richtext:rte_transform[]'
1332  ]
1333  ]
1334  ]
1335  ]
1336  ]
1337  ],
1338  [
1339  'aTable' => [
1340  'columns' => [
1341  'aField' => [
1342  'config' => [
1343  'type' => 'text',
1344  ],
1345  ],
1346  ],
1347  'types' => [
1348  'aType' => [
1349  'columnsOverrides' => [
1350  'aField' => [
1351  'config' => [
1352  'enableRichtext' => true,
1353  'richtextConfiguration' => 'default',
1354  ],
1355  ]
1356  ]
1357  ]
1358  ]
1359  ]
1360  ],
1361  ],
1362  'columnsOverrides richtext' => [
1363  [
1364  'aTable' => [
1365  'columns' => [
1366  'aField' => [
1367  'config' => [
1368  'type' => 'text',
1369  ],
1370  ],
1371  ],
1372  'types' => [
1373  'aType' => [
1374  'columnsOverrides' => [
1375  'aField' => [
1376  'defaultExtras' => 'richtext:rte_transform'
1377  ]
1378  ]
1379  ]
1380  ]
1381  ]
1382  ],
1383  [
1384  'aTable' => [
1385  'columns' => [
1386  'aField' => [
1387  'config' => [
1388  'type' => 'text',
1389  ],
1390  ],
1391  ],
1392  'types' => [
1393  'aType' => [
1394  'columnsOverrides' => [
1395  'aField' => [
1396  'config' => [
1397  'enableRichtext' => true,
1398  'richtextConfiguration' => 'default',
1399  ],
1400  ]
1401  ]
1402  ]
1403  ]
1404  ]
1405  ],
1406  ],
1407  'columnsOverrides richtext with defalut mode' => [
1408  [
1409  'aTable' => [
1410  'columns' => [
1411  'aField' => [
1412  'config' => [
1413  'type' => 'text',
1414  ],
1415  ],
1416  ],
1417  'types' => [
1418  'aType' => [
1419  'columnsOverrides' => [
1420  'aField' => [
1421  'defaultExtras' => 'richtext:rte_transform[mode=ts_css]'
1422  ]
1423  ]
1424  ]
1425  ]
1426  ]
1427  ],
1428  [
1429  'aTable' => [
1430  'columns' => [
1431  'aField' => [
1432  'config' => [
1433  'type' => 'text',
1434  ],
1435  ],
1436  ],
1437  'types' => [
1438  'aType' => [
1439  'columnsOverrides' => [
1440  'aField' => [
1441  'config' => [
1442  'enableRichtext' => true,
1443  'richtextConfiguration' => 'default',
1444  ],
1445  ]
1446  ]
1447  ]
1448  ]
1449  ]
1450  ],
1451  ],
1452  'columnsOverrides richtext with mode and others' => [
1453  [
1454  'aTable' => [
1455  'columns' => [
1456  'aField' => [
1457  'config' => [
1458  'type' => 'text',
1459  ],
1460  ],
1461  ],
1462  'types' => [
1463  'aType' => [
1464  'columnsOverrides' => [
1465  'aField' => [
1466  'defaultExtras' => 'richtext:rte_transform[flag=rte_enabled|mode=ts_css]'
1467  ]
1468  ]
1469  ]
1470  ]
1471  ]
1472  ],
1473  [
1474  'aTable' => [
1475  'columns' => [
1476  'aField' => [
1477  'config' => [
1478  'type' => 'text',
1479  ],
1480  ],
1481  ],
1482  'types' => [
1483  'aType' => [
1484  'columnsOverrides' => [
1485  'aField' => [
1486  'config' => [
1487  'enableRichtext' => true,
1488  'richtextConfiguration' => 'default',
1489  ],
1490  ]
1491  ]
1492  ]
1493  ]
1494  ]
1495  ],
1496  ],
1497  'columnsOverrides richtext brackets mode and others' => [
1498  [
1499  'aTable' => [
1500  'columns' => [
1501  'aField' => [
1502  'config' => [
1503  'type' => 'text',
1504  ],
1505  ],
1506  ],
1507  'types' => [
1508  'aType' => [
1509  'columnsOverrides' => [
1510  'aField' => [
1511  'defaultExtras' => 'richtext[]:rte_transform[flag=rte_enabled|mode=ts_css]'
1512  ]
1513  ]
1514  ]
1515  ]
1516  ]
1517  ],
1518  [
1519  'aTable' => [
1520  'columns' => [
1521  'aField' => [
1522  'config' => [
1523  'type' => 'text',
1524  ],
1525  ],
1526  ],
1527  'types' => [
1528  'aType' => [
1529  'columnsOverrides' => [
1530  'aField' => [
1531  'config' => [
1532  'enableRichtext' => true,
1533  'richtextConfiguration' => 'default',
1534  ],
1535  ]
1536  ]
1537  ]
1538  ]
1539  ]
1540  ],
1541  ],
1542  'columnsOverrides richtext star with mode and others' => [
1543  [
1544  'aTable' => [
1545  'columns' => [
1546  'aField' => [
1547  'config' => [
1548  'type' => 'text',
1549  ],
1550  ],
1551  ],
1552  'types' => [
1553  'aType' => [
1554  'columnsOverrides' => [
1555  'aField' => [
1556  'defaultExtras' => 'richtext[*]:rte_transform[flag=rte_enabled|mode=ts_css]'
1557  ]
1558  ]
1559  ]
1560  ]
1561  ]
1562  ],
1563  [
1564  'aTable' => [
1565  'columns' => [
1566  'aField' => [
1567  'config' => [
1568  'type' => 'text',
1569  ],
1570  ],
1571  ],
1572  'types' => [
1573  'aType' => [
1574  'columnsOverrides' => [
1575  'aField' => [
1576  'config' => [
1577  'enableRichtext' => true,
1578  'richtextConfiguration' => 'default',
1579  ],
1580  ]
1581  ]
1582  ]
1583  ]
1584  ]
1585  ],
1586  ],
1587  'columnsOverrides richtext cut-copy-paste ith mode and others' => [
1588  [
1589  'aTable' => [
1590  'columns' => [
1591  'aField' => [
1592  'config' => [
1593  'type' => 'text',
1594  ],
1595  ],
1596  ],
1597  'types' => [
1598  'aType' => [
1599  'columnsOverrides' => [
1600  'aField' => [
1601  'defaultExtras' => 'richtext[copy|cut|paste]:rte_transform[flag=rte_enabled|mode=ts_css]'
1602  ]
1603  ]
1604  ]
1605  ]
1606  ]
1607  ],
1608  [
1609  'aTable' => [
1610  'columns' => [
1611  'aField' => [
1612  'config' => [
1613  'type' => 'text',
1614  ],
1615  ],
1616  ],
1617  'types' => [
1618  'aType' => [
1619  'columnsOverrides' => [
1620  'aField' => [
1621  'config' => [
1622  'enableRichtext' => true,
1623  'richtextConfiguration' => 'default',
1624  ],
1625  ]
1626  ]
1627  ]
1628  ]
1629  ]
1630  ],
1631  ],
1632  ];
1633  }
1634 
1641  public function ‪migrateRemovesRteTransformOptions(array $givenConfig, array $expectedConfig): void
1642  {
1643  $subject = new ‪TcaMigration();
1644  $this->assertEquals($expectedConfig, $subject->migrate($givenConfig));
1645  }
1646 
1651  {
1652  return [
1653  'remove width' => [
1654  [
1655  // Given config section
1656  'aTable' => [
1657  'columns' => [
1658  'aField' => [
1659  'config' => [
1660  'type' => 'select',
1661  'renderType' => 'selectTree',
1662  'treeConfig' => [
1663  'appearance' => [
1664  'width' => 200
1665  ]
1666  ]
1667  ]
1668  ]
1669  ]
1670  ]
1671  ],
1672  [
1673  // Expected config section
1674  'aTable' => [
1675  'columns' => [
1676  'aField' => [
1677  'config' => [
1678  'type' => 'select',
1679  'renderType' => 'selectTree',
1680  'treeConfig' => [
1681  'appearance' => [
1682  ]
1683  ]
1684  ]
1685  ]
1686  ]
1687  ]
1688  ]
1689  ],
1690  'remove allowRecursiveMode' => [
1691  [
1692  // Given config section
1693  'aTable' => [
1694  'columns' => [
1695  'aField' => [
1696  'config' => [
1697  'type' => 'select',
1698  'renderType' => 'selectTree',
1699  'treeConfig' => [
1700  'appearance' => [
1701  'someKey' => 'value',
1702  'allowRecursiveMode' => true
1703  ]
1704  ]
1705  ]
1706  ]
1707  ]
1708  ]
1709  ],
1710  [
1711  // Expected config section
1712  'aTable' => [
1713  'columns' => [
1714  'aField' => [
1715  'config' => [
1716  'type' => 'select',
1717  'renderType' => 'selectTree',
1718  'treeConfig' => [
1719  'appearance' => [
1720  'someKey' => 'value'
1721  ]
1722  ]
1723  ]
1724  ]
1725  ]
1726  ]
1727  ]
1728  ],
1729  'move autoSizeMax to size' => [
1730  [
1731  // Given config section
1732  'aTable' => [
1733  'columns' => [
1734  'aField' => [
1735  'config' => [
1736  'type' => 'select',
1737  'renderType' => 'selectTree',
1738  'autoSizeMax' => 20,
1739  'size' => 10
1740  ]
1741  ]
1742  ]
1743  ]
1744  ],
1745  [
1746  // Expected config section
1747  'aTable' => [
1748  'columns' => [
1749  'aField' => [
1750  'config' => [
1751  'type' => 'select',
1752  'renderType' => 'selectTree',
1753  'size' => 20
1754  ]
1755  ]
1756  ]
1757  ]
1758  ]
1759  ],
1760  'keep settings for non selectTree' => [
1761  [
1762  // Given config section
1763  'aTable' => [
1764  'columns' => [
1765  'aField' => [
1766  'config' => [
1767  'type' => 'select',
1768  'renderType' => 'not a select tree',
1769  'autoSizeMax' => 20,
1770  'size' => 10,
1771  'treeConfig' => [
1772  'appearance' => [
1773  'someKey' => 'value',
1774  'allowRecursiveMode' => true,
1775  'width' => 200
1776  ]
1777  ]
1778  ]
1779  ]
1780  ]
1781  ]
1782  ],
1783  [
1784  // Expected config section
1785  'aTable' => [
1786  'columns' => [
1787  'aField' => [
1788  'config' => [
1789  'type' => 'select',
1790  'renderType' => 'not a select tree',
1791  'autoSizeMax' => 20,
1792  'size' => 10,
1793  'treeConfig' => [
1794  'appearance' => [
1795  'someKey' => 'value',
1796  'allowRecursiveMode' => true,
1797  'width' => 200
1798  ]
1799  ]
1800  ]
1801  ]
1802  ]
1803  ]
1804  ]
1805  ]
1806  ];
1807  }
1808 
1815  public function ‪migrateSelectTreeOptions(array $input, array $expected): void
1816  {
1817  $subject = new ‪TcaMigration();
1818  $this->assertEquals($expected, $subject->migrate($input));
1819  }
1820 
1825  {
1826  return [
1827  'nothing removed' => [
1828  [
1829  'aTable' => [
1830  'columns' => [
1831  'aCol' => [
1832  'config' => [
1833  'type' => 'input',
1834  'softref' => 'email,somethingelse'
1835  ],
1836  ],
1837  ],
1838  ],
1839  ],
1840  [
1841  'aTable' => [
1842  'columns' => [
1843  'aCol' => [
1844  'config' => [
1845  'type' => 'input',
1846  'softref' => 'email,somethingelse',
1847  ],
1848  ],
1849  ],
1850  ],
1851  ]
1852  ],
1853  'TStemplate only' => [
1854  [
1855  'aTable' => [
1856  'columns' => [
1857  'aCol' => [
1858  'config' => [
1859  'type' => 'input',
1860  'softref' => 'TStemplate,somethingelse'
1861  ],
1862  ],
1863  ],
1864  ],
1865  ],
1866  [
1867  'aTable' => [
1868  'columns' => [
1869  'aCol' => [
1870  'config' => [
1871  'type' => 'input',
1872  'softref' => 'somethingelse',
1873  ],
1874  ],
1875  ],
1876  ],
1877  ]
1878  ],
1879  'TStemplate and TSconfig' => [
1880  [
1881  'aTable' => [
1882  'columns' => [
1883  'aCol' => [
1884  'config' => [
1885  'type' => 'input',
1886  'softref' => 'TStemplate,somethingelse,TSconfig'
1887  ],
1888  ],
1889  ],
1890  ],
1891  ],
1892  [
1893  'aTable' => [
1894  'columns' => [
1895  'aCol' => [
1896  'config' => [
1897  'type' => 'input',
1898  'softref' => 'somethingelse',
1899  ],
1900  ],
1901  ],
1902  ],
1903  ]
1904  ],
1905  ];
1906  }
1907 
1914  public function ‪migrateTsTemplateSoftReferences(array $givenConfig, array $expectedConfig): void
1915  {
1916  $subject = new ‪TcaMigration();
1917  $this->assertEquals($expectedConfig, $subject->migrate($givenConfig));
1918  }
1919 
1924  {
1925  return [
1926  'nothing removed' => [
1927  [
1928  'aTable' => [
1929  'columns' => [
1930  'aCol' => [
1931  'config' => [
1932  'type' => 'check'
1933  ],
1934  ],
1935  ],
1936  ],
1937  ],
1938  [
1939  'aTable' => [
1940  'columns' => [
1941  'aCol' => [
1942  'config' => [
1943  'type' => 'check'
1944  ],
1945  ],
1946  ],
1947  ],
1948  ]
1949  ],
1950  'Option removed' => [
1951  [
1952  'aTable' => [
1953  'columns' => [
1954  'aCol' => [
1955  'config' => [
1956  'type' => 'check',
1957  'showIfRTE' => false
1958  ],
1959  ],
1960  ],
1961  ],
1962  ],
1963  [
1964  'aTable' => [
1965  'columns' => [
1966  'aCol' => [
1967  'config' => [
1968  'type' => 'check'
1969  ],
1970  ],
1971  ],
1972  ],
1973  ]
1974 
1975  ],
1976  ];
1977  }
1978 
1985  public function ‪migrateShowIfRTESetting(array $givenConfig, array $expectedConfig): void
1986  {
1987  $subject = new ‪TcaMigration();
1988  $this->assertEquals($expectedConfig, $subject->migrate($givenConfig));
1989  }
1990 
1995  {
1996  return [
1997  'no workspaces enabled' => [
1998  [
1999  'aTable' => [
2000  'ctrl' => [
2001  'versioningWS' => false
2002  ],
2003  ],
2004  ],
2005  [
2006  'aTable' => [
2007  'ctrl' => [
2008  'versioningWS' => false
2009  ],
2010  ],
2011  ]
2012  ],
2013  'nothing activated' => [
2014  [
2015  'aTable' => [
2016  'ctrl' => [
2017  'label' => 'blabla'
2018  ],
2019  ],
2020  ],
2021  [
2022  'aTable' => [
2023  'ctrl' => [
2024  'label' => 'blabla'
2025  ],
2026  ],
2027  ]
2028  ],
2029  'nothing changed, workspaces enabled' => [
2030  [
2031  'aTable' => [
2032  'ctrl' => [
2033  'versioningWS' => true
2034  ],
2035  ],
2036  ],
2037  [
2038  'aTable' => [
2039  'ctrl' => [
2040  'versioningWS' => true
2041  ],
2042  ],
2043  ]
2044  ],
2045  'cast workspaces to bool' => [
2046  [
2047  'aTable' => [
2048  'ctrl' => [
2049  'versioningWS' => 1
2050  ],
2051  ],
2052  ],
2053  [
2054  'aTable' => [
2055  'ctrl' => [
2056  'versioningWS' => true
2057  ],
2058  ],
2059  ]
2060  ],
2061  'cast workspaces v2 to bool' => [
2062  [
2063  'aTable' => [
2064  'ctrl' => [
2065  'versioningWS' => 2
2066  ],
2067  ],
2068  ],
2069  [
2070  'aTable' => [
2071  'ctrl' => [
2072  'versioningWS' => true
2073  ],
2074  ],
2075  ]
2076  ],
2077  'cast workspaces v2 to bool and remove followpages' => [
2078  [
2079  'aTable' => [
2080  'ctrl' => [
2081  'versioningWS' => 2,
2082  'versioning_followPages' => true
2083  ],
2084  ],
2085  ],
2086  [
2087  'aTable' => [
2088  'ctrl' => [
2089  'versioningWS' => true
2090  ],
2091  ],
2092  ]
2093  ],
2094  ];
2095  }
2096 
2103  public function ‪migrateWorkspaceSettings(array $givenConfig, array $expectedConfig): void
2104  {
2105  $subject = new ‪TcaMigration();
2106  $this->assertEquals($expectedConfig, $subject->migrate($givenConfig));
2107  }
2108 
2113  {
2114  return [
2115  'remove transForeignTable' => [
2116  [
2117  'aTable' => [
2118  'ctrl' => [
2119  'transForeignTable' => 'pages_language_overlay',
2120  ],
2121  ],
2122  ],
2123  [
2124  'aTable' => [
2125  'ctrl' => [],
2126  ],
2127  ]
2128  ],
2129  'remove transOrigPointerTable' => [
2130  [
2131  'aTable' => [
2132  'ctrl' => [
2133  'transOrigPointerTable' => 'pages',
2134  ],
2135  ],
2136  ],
2137  [
2138  'aTable' => [
2139  'ctrl' => [],
2140  ],
2141  ]
2142  ]
2143  ];
2144  }
2145 
2152  public function ‪migrateTranslationTable(array $givenConfig, array $expectedConfig): void
2153  {
2154  $subject = new ‪TcaMigration();
2155  $this->assertEquals($expectedConfig, $subject->migrate($givenConfig));
2156  }
2157 
2162  {
2163  return [
2164  'remove l10n_mode noCopy' => [
2165  [
2166  'aTable' => [
2167  'columns' => [
2168  'aColumn' => [
2169  'l10n_mode' => 'noCopy',
2170  'config' => [
2171  'type' => 'text',
2172  ],
2173  ],
2174  ],
2175  ],
2176  ],
2177  [
2178  'aTable' => [
2179  'columns' => [
2180  'aColumn' => [
2181  'config' => [
2182  'type' => 'text',
2183  ],
2184  ],
2185  ],
2186  ],
2187  ]
2188  ],
2189  'remove l10n_mode mergeIfNotBlank' => [
2190  [
2191  'aTable' => [
2192  'columns' => [
2193  'aColumn' => [
2194  'l10n_mode' => 'mergeIfNotBlank',
2195  'config' => [
2196  'type' => 'text',
2197  ],
2198  ],
2199  ],
2200  ],
2201  ],
2202  [
2203  'aTable' => [
2204  'columns' => [
2205  'aColumn' => [
2206  'config' => [
2207  'type' => 'text',
2208  'behaviour' => [
2209  'allowLanguageSynchronization' => true,
2210  ]
2211  ]
2212  ],
2213  ],
2214  ],
2215  ]
2216  ],
2217  ];
2218  }
2219 
2226  public function ‪migrateL10nModeDefinitions(array $givenConfig, array $expectedConfig): void
2227  {
2228  $subject = new ‪TcaMigration();
2229  $this->assertEquals($expectedConfig, $subject->migrate($givenConfig));
2230  }
2231 
2236  {
2237  return [
2238  'missing l10n_mode' => [
2239  [
2240  'pages' => [
2241  'columns' => [
2242  'aColumn' => [
2243  'config' => [
2244  'type' => 'input',
2245  ],
2246  ],
2247  ],
2248  ],
2249  'pages_language_overlay' => [
2250  'columns' => [
2251  'aColumn' => [
2252  'config' => [
2253  'type' => 'input',
2254  ],
2255  'l10n_mode' => 'any-possible-value',
2256  ],
2257  ],
2258  ],
2259  ],
2260  [
2261  'pages' => [
2262  'columns' => [
2263  'aColumn' => [
2264  'config' => [
2265  'type' => 'input',
2266  ],
2267  'l10n_mode' => 'any-possible-value',
2268  ],
2269  ],
2270  ],
2271  ]
2272  ],
2273  'missing allowLanguageSynchronization' => [
2274  [
2275  'pages' => [
2276  'columns' => [
2277  'aColumn' => [
2278  'config' => [
2279  'type' => 'input',
2280  ],
2281  ],
2282  ],
2283  ],
2284  'pages_language_overlay' => [
2285  'columns' => [
2286  'aColumn' => [
2287  'config' => [
2288  'type' => 'input',
2289  'behaviour' => [
2290  'allowLanguageSynchronization' => true,
2291  ]
2292  ],
2293  ],
2294  ],
2295  ],
2296  ],
2297  [
2298  'pages' => [
2299  'columns' => [
2300  'aColumn' => [
2301  'config' => [
2302  'type' => 'input',
2303  'behaviour' => [
2304  'allowLanguageSynchronization' => true,
2305  ]
2306  ],
2307  ],
2308  ],
2309  ],
2310  ]
2311  ],
2312  ];
2313  }
2314 
2321  public function ‪migratePageLocalizationDefinitions(array $givenConfig, array $expectedConfig): void
2322  {
2323  $subject = new ‪TcaMigration();
2324  $this->assertEquals($expectedConfig, $subject->migrate($givenConfig));
2325  }
2326 
2331  {
2332  return [
2333  'remove counter-productive localizationMode=keep' => [
2334  [
2335  'aTable' => [
2336  'columns' => [
2337  'aColumn' => [
2338  'config' => [
2339  'type' => 'inline',
2340  'behaviour' => [
2341  'localizationMode' => 'keep',
2342  'allowLanguageSynchronization' => true,
2343  ],
2344  ]
2345  ],
2346  ],
2347  ],
2348  ],
2349  [
2350  'aTable' => [
2351  'columns' => [
2352  'aColumn' => [
2353  'config' => [
2354  'type' => 'inline',
2355  'behaviour' => [
2356  'allowLanguageSynchronization' => true,
2357  ],
2358  ],
2359  ],
2360  ],
2361  ],
2362  ]
2363  ],
2364  'keep deprecated localizationMode=keep' => [
2365  [
2366  'aTable' => [
2367  'columns' => [
2368  'aColumn' => [
2369  'config' => [
2370  'type' => 'inline',
2371  'behaviour' => [
2372  'localizationMode' => 'keep',
2373  ],
2374  ],
2375  ],
2376  ],
2377  ],
2378  ],
2379  [
2380  'aTable' => [
2381  'columns' => [
2382  'aColumn' => [
2383  'config' => [
2384  'type' => 'inline',
2385  'behaviour' => [
2386  'localizationMode' => 'keep',
2387  ],
2388  ]
2389  ],
2390  ],
2391  ],
2392  ]
2393  ],
2394  'keep deprecated localizationMode=select' => [
2395  [
2396  'aTable' => [
2397  'columns' => [
2398  'aColumn' => [
2399  'config' => [
2400  'type' => 'inline',
2401  'behaviour' => [
2402  'localizationMode' => 'select',
2403  ],
2404  ],
2405  ],
2406  ],
2407  ],
2408  ],
2409  [
2410  'aTable' => [
2411  'columns' => [
2412  'aColumn' => [
2413  'config' => [
2414  'type' => 'inline',
2415  'behaviour' => [
2416  'localizationMode' => 'select',
2417  ],
2418  ]
2419  ],
2420  ],
2421  ],
2422  ]
2423  ],
2424  ];
2425  }
2426 
2433  public function ‪migrateInlineLocalizationMode(array $givenConfig, array $expectedConfig): void
2434  {
2435  $subject = new ‪TcaMigration();
2436  $this->assertEquals($expectedConfig, $subject->migrate($givenConfig));
2437  $this->assertNotEmpty($subject->getMessages());
2438  }
2439 
2444  {
2445  return [
2446  'move single field name' => [
2447  [
2448  'aTable' => [
2449  'ctrl' => [
2450  'requestUpdate' => 'aField',
2451  ],
2452  'columns' => [
2453  'aField' => [
2454  'label' => 'foo',
2455  'config' => [
2456  'type' => 'input',
2457  ],
2458  ],
2459  ],
2460  ],
2461  ],
2462  [
2463  'aTable' => [
2464  'ctrl' => [],
2465  'columns' => [
2466  'aField' => [
2467  'label' => 'foo',
2468  'config' => [
2469  'type' => 'input',
2470  ],
2471  'onChange' => 'reload',
2472  ],
2473  ],
2474  ],
2475  ],
2476  ],
2477  'ignore missing field but migrate others' => [
2478  [
2479  'aTable' => [
2480  'ctrl' => [
2481  'requestUpdate' => 'aField, bField, cField, ',
2482  ],
2483  'columns' => [
2484  'aField' => [
2485  'config' => [
2486  'type' => 'none',
2487  ],
2488  ],
2489  'cField' => [
2490  'config' => [
2491  'type' => 'none',
2492  ],
2493  ],
2494  ],
2495  ],
2496  ],
2497  [
2498  'aTable' => [
2499  'ctrl' => [],
2500  'columns' => [
2501  'aField' => [
2502  'config' => [
2503  'type' => 'none',
2504  ],
2505  'onChange' => 'reload',
2506  ],
2507  'cField' => [
2508  'config' => [
2509  'type' => 'none',
2510  ],
2511  'onChange' => 'reload',
2512  ],
2513  ],
2514  ],
2515  ],
2516  ],
2517  ];
2518  }
2519 
2526  public function ‪migrateMovesRequestUpdateCtrlFieldToColumns(array $input, array $expected): void
2527  {
2528  $this->assertEquals($expected, (new ‪TcaMigration())->migrate($input));
2529  }
2530 
2535  {
2536  return [
2537  'simple input with eval date' => [
2538  [
2539  'aTable' => [
2540  'columns' => [
2541  'aField' => [
2542  'label' => 'foo',
2543  'config' => [
2544  'type' => 'input',
2545  'eval' => 'date',
2546  ],
2547  ],
2548  ],
2549  ],
2550  ],
2551  [
2552  'aTable' => [
2553  'columns' => [
2554  'aField' => [
2555  'label' => 'foo',
2556  'config' => [
2557  'type' => 'input',
2558  'eval' => 'date',
2559  'renderType' => 'inputDateTime',
2560  ],
2561  ],
2562  ],
2563  ],
2564  ]
2565  ],
2566  'simple input with eval datetime' => [
2567  [
2568  'aTable' => [
2569  'columns' => [
2570  'aField' => [
2571  'label' => 'foo',
2572  'config' => [
2573  'type' => 'input',
2574  'eval' => 'datetime',
2575  ],
2576  ],
2577  ],
2578  ],
2579  ],
2580  [
2581  'aTable' => [
2582  'columns' => [
2583  'aField' => [
2584  'label' => 'foo',
2585  'config' => [
2586  'type' => 'input',
2587  'eval' => 'datetime',
2588  'renderType' => 'inputDateTime',
2589  ],
2590  ],
2591  ],
2592  ],
2593  ]
2594  ],
2595  'simple input with eval time' => [
2596  [
2597  'aTable' => [
2598  'columns' => [
2599  'aField' => [
2600  'label' => 'foo',
2601  'config' => [
2602  'type' => 'input',
2603  'eval' => 'time',
2604  ],
2605  ],
2606  ],
2607  ],
2608  ],
2609  [
2610  'aTable' => [
2611  'columns' => [
2612  'aField' => [
2613  'label' => 'foo',
2614  'config' => [
2615  'type' => 'input',
2616  'eval' => 'time',
2617  'renderType' => 'inputDateTime',
2618  ],
2619  ],
2620  ],
2621  ],
2622  ]
2623  ],
2624  'simple input with eval timesec' => [
2625  [
2626  'aTable' => [
2627  'columns' => [
2628  'aField' => [
2629  'label' => 'foo',
2630  'config' => [
2631  'type' => 'input',
2632  'eval' => 'timesec',
2633  ],
2634  ],
2635  ],
2636  ],
2637  ],
2638  [
2639  'aTable' => [
2640  'columns' => [
2641  'aField' => [
2642  'label' => 'foo',
2643  'config' => [
2644  'type' => 'input',
2645  'eval' => 'timesec',
2646  'renderType' => 'inputDateTime',
2647  ],
2648  ],
2649  ],
2650  ],
2651  ]
2652  ],
2653  'input with multiple evals' => [
2654  [
2655  'aTable' => [
2656  'columns' => [
2657  'aField' => [
2658  'label' => 'foo',
2659  'config' => [
2660  'type' => 'input',
2661  'eval' => 'null,date, required',
2662  ],
2663  ],
2664  ],
2665  ],
2666  ],
2667  [
2668  'aTable' => [
2669  'columns' => [
2670  'aField' => [
2671  'label' => 'foo',
2672  'config' => [
2673  'type' => 'input',
2674  'eval' => 'null,date, required',
2675  'renderType' => 'inputDateTime',
2676  ],
2677  ],
2678  ],
2679  ],
2680  ]
2681  ],
2682  ];
2683  }
2684 
2691  public function ‪migrateMovesTypeInputDateTimeToRenderType(array $input, array $expected): void
2692  {
2693  $this->assertEquals($expected, (new ‪TcaMigration())->migrate($input));
2694  }
2695 
2700  {
2701  return [
2702  'enableByTypeConfig on multiple wizards' => [
2703  [
2704  'aTable' => [
2705  'columns' => [
2706  'aField' => [
2707  'exclude' => true,
2708  'label' => 'aLabel',
2709  'config' => [
2710  'type' => 'text',
2711  'wizards' => [
2712  'aWizard' => [
2713  'type' => 'aType',
2714  'title' => 'aTitle',
2715  'enableByTypeConfig' => '1',
2716  ],
2717  'anotherWizard' => [
2718  'type' => 'aType',
2719  'title' => 'anotherTitle',
2720  'enableByTypeConfig' => 1,
2721  ],
2722  'yetAnotherWizard' => [
2723  'type' => 'aType',
2724  'title' => 'yetAnotherTitle',
2725  ],
2726  'andYetAnotherWizard' => [
2727  'type' => 'aType',
2728  'title' => 'yetAnotherTitle',
2729  'enableByTypeConfig' => 0,
2730  ],
2731  ],
2732  ],
2733  ],
2734  ],
2735  'types' => [
2736  'firstType' => [
2737  'columnsOverrides' => [
2738  'aField' => [
2739  'defaultExtras' => 'nowrap:wizards[aWizard|anotherWizard|aNotExistingWizard]:enable-tab',
2740  ],
2741  ],
2742  ],
2743  'secondType' => [
2744  'columnsOverrides' => [
2745  'aField' => [
2746  'defaultExtras' => 'wizards[aWizard]',
2747  ],
2748  ],
2749  ],
2750  ],
2751  ],
2752  ],
2753  [
2754  'aTable' => [
2755  'columns' => [
2756  'aField' => [
2757  'exclude' => true,
2758  'label' => 'aLabel',
2759  'config' => [
2760  'type' => 'text',
2761  'wizards' => [
2762  'yetAnotherWizard' => [
2763  'type' => 'aType',
2764  'title' => 'yetAnotherTitle',
2765  ],
2766  'andYetAnotherWizard' => [
2767  'type' => 'aType',
2768  'title' => 'yetAnotherTitle',
2769  ],
2770  ],
2771  ],
2772  ],
2773  ],
2774  'types' => [
2775  'firstType' => [
2776  'columnsOverrides' => [
2777  'aField' => [
2778  'config' => [
2779  'wrap' => 'off',
2780  'enableTabulator' => true,
2781  'wizards' => [
2782  'aWizard' => [
2783  'type' => 'aType',
2784  'title' => 'aTitle',
2785  ],
2786  'anotherWizard' => [
2787  'type' => 'aType',
2788  'title' => 'anotherTitle',
2789  ],
2790  ],
2791  ],
2792  ],
2793  ],
2794  ],
2795  'secondType' => [
2796  'columnsOverrides' => [
2797  'aField' => [
2798  'config' => [
2799  'wizards' => [
2800  'aWizard' => [
2801  'type' => 'aType',
2802  'title' => 'aTitle',
2803  ],
2804  ],
2805  ],
2806  ],
2807  ],
2808  ],
2809  ],
2810  ],
2811  ],
2812  ],
2813  'empty wizard array is removed' => [
2814  [
2815  'aTable' => [
2816  'columns' => [
2817  'aField' => [
2818  'exclude' => true,
2819  'label' => 'aLabel',
2820  'config' => [
2821  'type' => 'input',
2822  'wizards' => [
2823  'aWizard' => [
2824  'type' => 'aType',
2825  'title' => 'aTitle',
2826  'enableByTypeConfig' => 1,
2827  ],
2828  ],
2829  ],
2830  ],
2831  ],
2832  'types' => [
2833  'firstType' => [
2834  'columnsOverrides' => [
2835  'aField' => [
2836  'defaultExtras' => 'wizards[aWizard]',
2837  ],
2838  ],
2839  ],
2840  ],
2841  ],
2842  ],
2843  [
2844  'aTable' => [
2845  'columns' => [
2846  'aField' => [
2847  'exclude' => true,
2848  'label' => 'aLabel',
2849  'config' => [
2850  'type' => 'input',
2851  ],
2852  ],
2853  ],
2854  'types' => [
2855  'firstType' => [
2856  'columnsOverrides' => [
2857  'aField' => [
2858  'config' => [
2859  'wizards' => [
2860  'aWizard' => [
2861  'type' => 'aType',
2862  'title' => 'aTitle',
2863  ],
2864  ],
2865  ],
2866  ],
2867  ],
2868  ],
2869  ],
2870  ],
2871  ],
2872  ],
2873  ];
2874  }
2875 
2882  public function ‪migrateMovesWizardsWithEnableByTypeConfigToColumnsOverrides(array $input, array $expected): void
2883  {
2884  $this->assertEquals($expected, (new ‪TcaMigration())->migrate($input));
2885  }
2886 
2891  {
2892  return [
2893  'colorpicker in columns field' => [
2894  [
2895  'aTable' => [
2896  'columns' => [
2897  'aCol' => [
2898  'config' => [
2899  'type' => 'input',
2900  'wizards' => [
2901  'colorpicker' => [
2902  'type' => 'colorbox',
2903  'title' => 'Color picker',
2904  'module' => [
2905  'name' => 'wizard_colorpicker',
2906  ],
2907  'JSopenParams' => 'height=300,width=500,status=0,menubar=0,scrollbars=1',
2908  ],
2909  ],
2910  ],
2911  ],
2912  ],
2913  ],
2914  ],
2915  [
2916  'aTable' => [
2917  'columns' => [
2918  'aCol' => [
2919  'config' => [
2920  'type' => 'input',
2921  'renderType' => 'colorpicker',
2922  ],
2923  ],
2924  ],
2925  ],
2926  ],
2927  ],
2928  'colorpicker is not migrated if custom renderType is already given' => [
2929  [
2930  'aTable' => [
2931  'columns' => [
2932  'aCol' => [
2933  'config' => [
2934  'type' => 'input',
2935  'renderType' => 'myPersonalRenderType',
2936  'wizards' => [
2937  'colorpicker' => [
2938  'type' => 'colorbox',
2939  'title' => 'Color picker',
2940  'module' => [
2941  'name' => 'wizard_colorpicker',
2942  ],
2943  'JSopenParams' => 'height=300,width=500,status=0,menubar=0,scrollbars=1',
2944  ],
2945  ],
2946  ],
2947  ],
2948  ],
2949  ],
2950  ],
2951  [
2952  'aTable' => [
2953  'columns' => [
2954  'aCol' => [
2955  'config' => [
2956  'type' => 'input',
2957  'renderType' => 'myPersonalRenderType',
2958  'wizards' => [
2959  'colorpicker' => [
2960  'type' => 'colorbox',
2961  'title' => 'Color picker',
2962  'module' => [
2963  'name' => 'wizard_colorpicker',
2964  ],
2965  'JSopenParams' => 'height=300,width=500,status=0,menubar=0,scrollbars=1',
2966  ],
2967  ],
2968  ],
2969  ],
2970  ],
2971  ],
2972  ],
2973  ],
2974  'colorpicker in a type columnsOverrides field' => [
2975  [
2976  'aTable' => [
2977  'columns' => [
2978  'aField' => [
2979  'config' => [
2980  'type' => 'input',
2981  ]
2982  ]
2983  ],
2984  'types' => [
2985  'aType' => [
2986  'columnsOverrides' => [
2987  'aField' => [
2988  'config' => [
2989  'wizards' => [
2990  'colorpicker' => [
2991  'type' => 'colorbox',
2992  'title' => 'Color picker',
2993  'module' => [
2994  'name' => 'wizard_colorpicker',
2995  ],
2996  'JSopenParams' => 'height=300,width=500,status=0,menubar=0,scrollbars=1',
2997  ],
2998  ],
2999  ],
3000  ],
3001  ],
3002  ],
3003  ],
3004  ],
3005  ],
3006  [
3007  'aTable' => [
3008  'columns' => [
3009  'aField' => [
3010  'config' => [
3011  'type' => 'input',
3012  ]
3013  ]
3014  ],
3015  'types' => [
3016  'aType' => [
3017  'columnsOverrides' => [
3018  'aField' => [
3019  'config' => [
3020  'type' => 'input',
3021  'renderType' => 'colorpicker',
3022  ],
3023  ],
3024  ],
3025  ],
3026  ],
3027  ],
3028  ]
3029  ]
3030  ];
3031  }
3032 
3039  public function ‪migrateRewritesColorpickerWizard(array $input, array $expected): void
3040  {
3041  $this->assertEquals($expected, (new ‪TcaMigration())->migrate($input));
3042  }
3043 
3048  {
3049  return [
3050  'select wizard without mode' => [
3051  [
3052  'aTable' => [
3053  'columns' => [
3054  'aField' => [
3055  'label' => 'foo',
3056  'config' => [
3057  'type' => 'text',
3058  'wizards' => [
3059  'target_picker' => [
3060  'type' => 'select',
3061  'items' => [
3062  [ 'aLabel', 'aValue' ],
3063  [ 'anotherLabel', 'anotherValue' ],
3064  ],
3065  ],
3066  ],
3067  ],
3068  ],
3069  ],
3070  ],
3071  ],
3072  [
3073  'aTable' => [
3074  'columns' => [
3075  'aField' => [
3076  'label' => 'foo',
3077  'config' => [
3078  'type' => 'text',
3079  'valuePicker' => [
3080  'items' => [
3081  [ 'aLabel', 'aValue' ],
3082  [ 'anotherLabel', 'anotherValue' ],
3083  ],
3084  ],
3085  ],
3086  ],
3087  ],
3088  ],
3089  ],
3090  ],
3091  'select wizard with empty mode' => [
3092  [
3093  'aTable' => [
3094  'columns' => [
3095  'aField' => [
3096  'label' => 'foo',
3097  'config' => [
3098  'type' => 'input',
3099  'wizards' => [
3100  'target_picker' => [
3101  'type' => 'select',
3102  'mode' => '',
3103  'items' => [
3104  [ 'aLabel', 'aValue' ],
3105  [ 'anotherLabel', 'anotherValue' ],
3106  ],
3107  ],
3108  ],
3109  ],
3110  ],
3111  ],
3112  ],
3113  ],
3114  [
3115  'aTable' => [
3116  'columns' => [
3117  'aField' => [
3118  'label' => 'foo',
3119  'config' => [
3120  'type' => 'input',
3121  'valuePicker' => [
3122  'mode' => '',
3123  'items' => [
3124  [ 'aLabel', 'aValue' ],
3125  [ 'anotherLabel', 'anotherValue' ],
3126  ],
3127  ],
3128  ],
3129  ],
3130  ],
3131  ],
3132  ],
3133  ],
3134  'select wizard with prepend mode' => [
3135  [
3136  'aTable' => [
3137  'columns' => [
3138  'aField' => [
3139  'label' => 'foo',
3140  'config' => [
3141  'type' => 'input',
3142  'wizards' => [
3143  'target_picker' => [
3144  'type' => 'select',
3145  'mode' => 'prepend',
3146  'items' => [
3147  [ 'aLabel', 'aValue' ],
3148  [ 'anotherLabel', 'anotherValue' ],
3149  ],
3150  ],
3151  ],
3152  ],
3153  ],
3154  ],
3155  ],
3156  ],
3157  [
3158  'aTable' => [
3159  'columns' => [
3160  'aField' => [
3161  'label' => 'foo',
3162  'config' => [
3163  'type' => 'input',
3164  'valuePicker' => [
3165  'mode' => 'prepend',
3166  'items' => [
3167  [ 'aLabel', 'aValue' ],
3168  [ 'anotherLabel', 'anotherValue' ],
3169  ],
3170  ],
3171  ],
3172  ],
3173  ],
3174  ],
3175  ],
3176  ],
3177  'select wizard with append mode' => [
3178  [
3179  'aTable' => [
3180  'columns' => [
3181  'aField' => [
3182  'label' => 'foo',
3183  'config' => [
3184  'type' => 'input',
3185  'wizards' => [
3186  'target_picker' => [
3187  'type' => 'select',
3188  'mode' => 'append',
3189  'items' => [
3190  [ 'aLabel', 'aValue' ],
3191  [ 'anotherLabel', 'anotherValue' ],
3192  ],
3193  ],
3194  ],
3195  ],
3196  ],
3197  ],
3198  ],
3199  ],
3200  [
3201  'aTable' => [
3202  'columns' => [
3203  'aField' => [
3204  'label' => 'foo',
3205  'config' => [
3206  'type' => 'input',
3207  'valuePicker' => [
3208  'mode' => 'append',
3209  'items' => [
3210  [ 'aLabel', 'aValue' ],
3211  [ 'anotherLabel', 'anotherValue' ],
3212  ],
3213  ],
3214  ],
3215  ],
3216  ],
3217  ],
3218  ],
3219  ],
3220  'select wizard with broken mode' => [
3221  [
3222  'aTable' => [
3223  'columns' => [
3224  'aField' => [
3225  'label' => 'foo',
3226  'config' => [
3227  'type' => 'input',
3228  'wizards' => [
3229  'target_picker' => [
3230  'type' => 'select',
3231  'mode' => 'foo',
3232  'items' => [
3233  [ 'aLabel', 'aValue' ],
3234  [ 'anotherLabel', 'anotherValue' ],
3235  ],
3236  ],
3237  ],
3238  ],
3239  ],
3240  ],
3241  ],
3242  ],
3243  [
3244  'aTable' => [
3245  'columns' => [
3246  'aField' => [
3247  'label' => 'foo',
3248  'config' => [
3249  'type' => 'input',
3250  'valuePicker' => [
3251  'items' => [
3252  [ 'aLabel', 'aValue' ],
3253  [ 'anotherLabel', 'anotherValue' ],
3254  ],
3255  ],
3256  ],
3257  ],
3258  ],
3259  ],
3260  ],
3261  ],
3262  'select wizard without items is not migrated' => [
3263  [
3264  'aTable' => [
3265  'columns' => [
3266  'aField' => [
3267  'label' => 'foo',
3268  'config' => [
3269  'type' => 'input',
3270  'wizards' => [
3271  'target_picker' => [
3272  'type' => 'select',
3273  'mode' => '',
3274  ],
3275  ],
3276  ],
3277  ],
3278  ],
3279  ],
3280  ],
3281  [
3282  'aTable' => [
3283  'columns' => [
3284  'aField' => [
3285  'label' => 'foo',
3286  'config' => [
3287  'type' => 'input',
3288  'wizards' => [
3289  'target_picker' => [
3290  'type' => 'select',
3291  'mode' => '',
3292  ],
3293  ],
3294  ],
3295  ],
3296  ],
3297  ],
3298  ],
3299  ],
3300  'select wizard with broken items is not migrated' => [
3301  [
3302  'aTable' => [
3303  'columns' => [
3304  'aField' => [
3305  'label' => 'foo',
3306  'config' => [
3307  'type' => 'input',
3308  'wizards' => [
3309  'target_picker' => [
3310  'type' => 'select',
3311  'mode' => '',
3312  'items' => 'foo',
3313  ],
3314  ],
3315  ],
3316  ],
3317  ],
3318  ],
3319  ],
3320  [
3321  'aTable' => [
3322  'columns' => [
3323  'aField' => [
3324  'label' => 'foo',
3325  'config' => [
3326  'type' => 'input',
3327  'wizards' => [
3328  'target_picker' => [
3329  'type' => 'select',
3330  'mode' => '',
3331  'items' => 'foo',
3332  ],
3333  ],
3334  ],
3335  ],
3336  ],
3337  ],
3338  ],
3339  ],
3340  'two wizards' => [
3341  [
3342  'aTable' => [
3343  'columns' => [
3344  'aField' => [
3345  'label' => 'foo',
3346  'config' => [
3347  'type' => 'input',
3348  'wizards' => [
3349  'target_picker' => [
3350  'type' => 'select',
3351  'mode' => '',
3352  'items' => [
3353  [ 'aLabel', 'aValue' ],
3354  [ 'anotherLabel', 'anotherValue' ],
3355  ],
3356  ],
3357  'differentWizard' => [
3358  'type' => 'foo',
3359  ]
3360  ],
3361  ],
3362  ],
3363  ],
3364  ],
3365  ],
3366  [
3367  'aTable' => [
3368  'columns' => [
3369  'aField' => [
3370  'label' => 'foo',
3371  'config' => [
3372  'type' => 'input',
3373  'valuePicker' => [
3374  'mode' => '',
3375  'items' => [
3376  [ 'aLabel', 'aValue' ],
3377  [ 'anotherLabel', 'anotherValue' ],
3378  ],
3379  ],
3380  'wizards' => [
3381  'differentWizard' => [
3382  'type' => 'foo',
3383  ],
3384  ]
3385  ],
3386  ],
3387  ],
3388  ],
3389  ],
3390  ],
3391  'select value wizard to value Picker columnsOverrides field' => [
3392  [
3393  'aTable' => [
3394  'columns' => [
3395  'aField' => [
3396  'config' => [
3397  'type' => 'text',
3398  ]
3399  ]
3400  ],
3401  'types' => [
3402  'aType' => [
3403  'columnsOverrides' => [
3404  'aField' => [
3405  'config' => [
3406  'wizards' => [
3407  'target_picker' => [
3408  'type' => 'select',
3409  'items' => [
3410  [ 'aLabel', 'aValue' ],
3411  [ 'anotherLabel', 'anotherValue' ],
3412  ],
3413  ],
3414  ],
3415  ],
3416  ],
3417  ],
3418  ],
3419  ],
3420  ],
3421  ],
3422  [
3423  'aTable' => [
3424  'columns' => [
3425  'aField' => [
3426  'config' => [
3427  'type' => 'text',
3428  ]
3429  ]
3430  ],
3431  'types' => [
3432  'aType' => [
3433  'columnsOverrides' => [
3434  'aField' => [
3435  'config' => [
3436  'valuePicker' => [
3437  'items' => [
3438  [ 'aLabel', 'aValue' ],
3439  [ 'anotherLabel', 'anotherValue' ],
3440  ],
3441  ],
3442  ],
3443  ],
3444  ],
3445  ],
3446  ],
3447  ],
3448  ]
3449  ]
3450  ];
3451  }
3452 
3459  public function ‪migrateMovesSelectWizardToValuePicker(array $input, array $expected): void
3460  {
3461  $this->assertEquals($expected, (new ‪TcaMigration())->migrate($input));
3462  }
3463 
3468  {
3469  return [
3470  'slider wizard with no options' => [
3471  [
3472  'aTable' => [
3473  'columns' => [
3474  'aField' => [
3475  'label' => 'foo',
3476  'config' => [
3477  'type' => 'input',
3478  'wizards' => [
3479  'slider' => [
3480  'type' => 'slider',
3481  ],
3482  ],
3483  ],
3484  ],
3485  ],
3486  ],
3487  ],
3488  [
3489  'aTable' => [
3490  'columns' => [
3491  'aField' => [
3492  'label' => 'foo',
3493  'config' => [
3494  'type' => 'input',
3495  'slider' => [],
3496  ],
3497  ],
3498  ],
3499  ],
3500  ]
3501  ],
3502  'slider wizard with options' => [
3503  [
3504  'aTable' => [
3505  'columns' => [
3506  'aField' => [
3507  'label' => 'foo',
3508  'config' => [
3509  'type' => 'input',
3510  'wizards' => [
3511  'slider' => [
3512  'type' => 'slider',
3513  'width' => 200,
3514  'step' => 10,
3515  ],
3516  ],
3517  ],
3518  ],
3519  ],
3520  ],
3521  ],
3522  [
3523  'aTable' => [
3524  'columns' => [
3525  'aField' => [
3526  'label' => 'foo',
3527  'config' => [
3528  'type' => 'input',
3529  'slider' => [
3530  'width' => 200,
3531  'step' => 10,
3532  ],
3533  ],
3534  ],
3535  ],
3536  ],
3537  ],
3538  ],
3539  'two wizards' => [
3540  [
3541  'aTable' => [
3542  'columns' => [
3543  'aField' => [
3544  'label' => 'foo',
3545  'config' => [
3546  'type' => 'input',
3547  'wizards' => [
3548  'slider' => [
3549  'type' => 'slider',
3550  'width' => 200,
3551  ],
3552  'differentWizard' => [
3553  'type' => 'foo',
3554  ]
3555  ],
3556  ],
3557  ],
3558  ],
3559  ],
3560  ],
3561  [
3562  'aTable' => [
3563  'columns' => [
3564  'aField' => [
3565  'label' => 'foo',
3566  'config' => [
3567  'type' => 'input',
3568  'slider' => [
3569  'width' => 200,
3570  ],
3571  'wizards' => [
3572  'differentWizard' => [
3573  'type' => 'foo',
3574  ],
3575  ]
3576  ],
3577  ],
3578  ],
3579  ],
3580  ],
3581  ],
3582  'slider wizard to columnsOverrides field' => [
3583  [
3584  'aTable' => [
3585  'columns' => [
3586  'aField' => [
3587  'config' => [
3588  'type' => 'input',
3589  ]
3590  ]
3591  ],
3592  'types' => [
3593  'aType' => [
3594  'columnsOverrides' => [
3595  'aField' => [
3596  'config' => [
3597  'wizards' => [
3598  'slider' => [
3599  'type' => 'slider',
3600  'width' => 200,
3601  ],
3602  'differentWizard' => [
3603  'type' => 'foo',
3604  ],
3605  ],
3606  ],
3607  ],
3608  ],
3609  ],
3610  ],
3611  ],
3612  ],
3613  [
3614  'aTable' => [
3615  'columns' => [
3616  'aField' => [
3617  'config' => [
3618  'type' => 'input',
3619  ]
3620  ]
3621  ],
3622  'types' => [
3623  'aType' => [
3624  'columnsOverrides' => [
3625  'aField' => [
3626  'config' => [
3627  'slider' => [
3628  'width' => 200,
3629  ],
3630  'wizards' => [
3631  'differentWizard' => [
3632  'type' => 'foo',
3633  ],
3634  ]
3635  ],
3636  ],
3637  ],
3638  ],
3639  ],
3640  ],
3641  ],
3642  ],
3643  ];
3644  }
3645 
3652  public function ‪migrateMovesSliderWizardToSliderConfiguration(array $input, array $expected): void
3653  {
3654  $this->assertEquals($expected, (new ‪TcaMigration())->migrate($input));
3655  }
3656 
3661  {
3662  return [
3663  'simple link wizard without options' => [
3664  [
3665  'aTable' => [
3666  'columns' => [
3667  'aField' => [
3668  'label' => 'foo',
3669  'config' => [
3670  'type' => 'input',
3671  'wizards' => [
3672  'link' => [
3673  'type' => 'popup',
3674  'module' => [
3675  'name' => 'wizard_link',
3676  ],
3677  ],
3678  ],
3679  ],
3680  ],
3681  ],
3682  ],
3683  ],
3684  [
3685  'aTable' => [
3686  'columns' => [
3687  'aField' => [
3688  'label' => 'foo',
3689  'config' => [
3690  'type' => 'input',
3691  'renderType' => 'inputLink',
3692  ],
3693  ],
3694  ],
3695  ],
3696  ],
3697  ],
3698  'link wizard with options' => [
3699  [
3700  'aTable' => [
3701  'columns' => [
3702  'aField' => [
3703  'label' => 'foo',
3704  'config' => [
3705  'type' => 'input',
3706  'wizards' => [
3707  'link' => [
3708  'type' => 'popup',
3709  'title' => 'aLinkTitle',
3710  'module' => [
3711  'name' => 'wizard_link',
3712  ],
3713  'JSopenParams' => 'height=800,width=600,status=0,menubar=0,scrollbars=1',
3714  'params' => [
3715  'blindLinkOptions' => 'folder',
3716  'blindLinkFields' => 'class, target',
3717  'allowedExtensions' => 'jpg',
3718  ],
3719  ],
3720  ],
3721  ],
3722  ],
3723  ],
3724  ],
3725  ],
3726  [
3727  'aTable' => [
3728  'columns' => [
3729  'aField' => [
3730  'label' => 'foo',
3731  'config' => [
3732  'type' => 'input',
3733  'renderType' => 'inputLink',
3734  'fieldControl' => [
3735  'linkPopup' => [
3736  'options' => [
3737  'title' => 'aLinkTitle',
3738  'windowOpenParameters' => 'height=800,width=600,status=0,menubar=0,scrollbars=1',
3739  'blindLinkOptions' => 'folder',
3740  'blindLinkFields' => 'class, target',
3741  'allowedExtensions' => 'jpg',
3742  ],
3743  ],
3744  ],
3745  ],
3746  ],
3747  ],
3748  ],
3749  ],
3750  ],
3751  'link wizard does not migrate if renderType is already set' => [
3752  [
3753  'aTable' => [
3754  'columns' => [
3755  'aField' => [
3756  'label' => 'foo',
3757  'config' => [
3758  'type' => 'input',
3759  'renderType' => 'aRenderType',
3760  'wizards' => [
3761  'link' => [
3762  'type' => 'popup',
3763  'module' => [
3764  'name' => 'wizard_link',
3765  ],
3766  ],
3767  ],
3768  ],
3769  ],
3770  ],
3771  ],
3772  ],
3773  [
3774  'aTable' => [
3775  'columns' => [
3776  'aField' => [
3777  'label' => 'foo',
3778  'config' => [
3779  'type' => 'input',
3780  'renderType' => 'aRenderType',
3781  'wizards' => [
3782  'link' => [
3783  'type' => 'popup',
3784  'module' => [
3785  'name' => 'wizard_link',
3786  ],
3787  ],
3788  ],
3789  ],
3790  ],
3791  ],
3792  ],
3793  ],
3794  ],
3795  'two wizards' => [
3796  [
3797  'aTable' => [
3798  'columns' => [
3799  'aField' => [
3800  'label' => 'foo',
3801  'config' => [
3802  'type' => 'input',
3803  'wizards' => [
3804  'link' => [
3805  'type' => 'popup',
3806  'module' => [
3807  'name' => 'wizard_link',
3808  ],
3809  ],
3810  'differentWizard' => [
3811  'type' => 'foo',
3812  ]
3813  ],
3814  ],
3815  ],
3816  ],
3817  ],
3818  ],
3819  [
3820  'aTable' => [
3821  'columns' => [
3822  'aField' => [
3823  'label' => 'foo',
3824  'config' => [
3825  'type' => 'input',
3826  'renderType' => 'inputLink',
3827  'wizards' => [
3828  'differentWizard' => [
3829  'type' => 'foo',
3830  ],
3831  ]
3832  ],
3833  ],
3834  ],
3835  ],
3836  ],
3837  ],
3838  'link wizard columnsOverrides field' => [
3839  [
3840  'aTable' => [
3841  'columns' => [
3842  'aField' => [
3843  'config' => [
3844  'type' => 'input',
3845  ]
3846  ]
3847  ],
3848  'types' => [
3849  'aType' => [
3850  'columnsOverrides' => [
3851  'aField' => [
3852  'config' => [
3853  'wizards' => [
3854  'link' => [
3855  'type' => 'popup',
3856  'title' => 'aLinkTitle',
3857  'module' => [
3858  'name' => 'wizard_link',
3859  ],
3860  'JSopenParams' => 'height=800,width=600,status=0,menubar=0,scrollbars=1',
3861  'params' => [
3862  'blindLinkOptions' => 'folder',
3863  'blindLinkFields' => 'class, target',
3864  'allowedExtensions' => 'jpg',
3865  ],
3866  ],
3867  'differentWizard' => [
3868  'type' => 'foo',
3869  ]
3870  ],
3871  ],
3872  ],
3873  ],
3874  ],
3875  ],
3876  ],
3877  ],
3878  [
3879  'aTable' => [
3880  'columns' => [
3881  'aField' => [
3882  'config' => [
3883  'type' => 'input',
3884  ]
3885  ]
3886  ],
3887  'types' => [
3888  'aType' => [
3889  'columnsOverrides' => [
3890  'aField' => [
3891  'config' => [
3892  'renderType' => 'inputLink',
3893  'fieldControl' => [
3894  'linkPopup' => [
3895  'options' => [
3896  'title' => 'aLinkTitle',
3897  'windowOpenParameters' => 'height=800,width=600,status=0,menubar=0,scrollbars=1',
3898  'blindLinkOptions' => 'folder',
3899  'blindLinkFields' => 'class, target',
3900  'allowedExtensions' => 'jpg',
3901  ],
3902  ],
3903  ],
3904  'wizards' => [
3905  'differentWizard' => [
3906  'type' => 'foo',
3907  ],
3908  ]
3909  ],
3910  ],
3911  ],
3912  ],
3913  ],
3914  ],
3915  ]
3916  ]
3917  ];
3918  }
3919 
3926  public function ‪migrateMovesLinkWizardToRenderTypeWithFieldControl(array $input, array $expected): void
3927  {
3928  $this->assertEquals($expected, (new ‪TcaMigration())->migrate($input));
3929  }
3930 
3935  {
3936  return [
3937  'simple link wizard without options' => [
3938  [
3939  'aTable' => [
3940  'columns' => [
3941  'aField' => [
3942  'label' => 'foo',
3943  'config' => [
3944  'type' => 'group',
3945  'wizards' => [
3946  'edit' => [
3947  'type' => 'popup',
3948  'module' => [
3949  'name' => 'wizard_edit',
3950  ],
3951  'icon' => 'actions-open',
3952  ],
3953  ],
3954  ],
3955  ],
3956  ],
3957  ],
3958  ],
3959  [
3960  'aTable' => [
3961  'columns' => [
3962  'aField' => [
3963  'label' => 'foo',
3964  'config' => [
3965  'type' => 'group',
3966  'fieldControl' => [
3967  'editPopup' => [
3968  'disabled' => false,
3969  ],
3970  ],
3971  ],
3972  ],
3973  ],
3974  ],
3975  ],
3976  ],
3977  'simple link wizard with options' => [
3978  [
3979  'aTable' => [
3980  'columns' => [
3981  'aField' => [
3982  'label' => 'foo',
3983  'config' => [
3984  'type' => 'select',
3985  'renderType' => 'selectMultipleSideBySide',
3986  'wizards' => [
3987  'edit' => [
3988  'type' => 'popup',
3989  'title' => 'aLabel',
3990  'module' => [
3991  'name' => 'wizard_edit',
3992  ],
3993  'popup_onlyOpenIfSelected' => 1,
3994  'icon' => 'actions-open',
3995  'JSopenParams' => 'height=350,width=580,status=0,menubar=0,scrollbars=1'
3996  ],
3997  ],
3998  ],
3999  ],
4000  ],
4001  ],
4002  ],
4003  [
4004  'aTable' => [
4005  'columns' => [
4006  'aField' => [
4007  'label' => 'foo',
4008  'config' => [
4009  'type' => 'select',
4010  'renderType' => 'selectMultipleSideBySide',
4011  'fieldControl' => [
4012  'editPopup' => [
4013  'disabled' => false,
4014  'options' => [
4015  'title' => 'aLabel',
4016  'windowOpenParameters' => 'height=350,width=580,status=0,menubar=0,scrollbars=1',
4017  ],
4018  ],
4019  ],
4020  ],
4021  ],
4022  ],
4023  ],
4024  ],
4025  ],
4026  'edit wizard in columnsOverrides' => [
4027  [
4028  'aTable' => [
4029  'columns' => [
4030  'aField' => [
4031  'label' => 'foo',
4032  'config' => [
4033  'type' => 'group',
4034  ],
4035  ],
4036  ],
4037  'types' => [
4038  'aType' => [
4039  'columnsOverrides' => [
4040  'aField' => [
4041  'config' => [
4042  'wizards' => [
4043  'edit' => [
4044  'type' => 'popup',
4045  'title' => 'aLabel',
4046  'module' => [
4047  'name' => 'wizard_edit',
4048  ],
4049  'icon' => 'actions-open',
4050  ],
4051  ],
4052  ],
4053  ],
4054  ],
4055  ],
4056  ],
4057  ],
4058  ],
4059  [
4060  'aTable' => [
4061  'columns' => [
4062  'aField' => [
4063  'label' => 'foo',
4064  'config' => [
4065  'type' => 'group',
4066  ],
4067  ],
4068  ],
4069  'types' => [
4070  'aType' => [
4071  'columnsOverrides' => [
4072  'aField' => [
4073  'config' => [
4074  'fieldControl' => [
4075  'editPopup' => [
4076  'disabled' => false,
4077  'options' => [
4078  'title' => 'aLabel',
4079  ],
4080  ],
4081  ],
4082  ],
4083  ],
4084  ],
4085  ],
4086  ],
4087  ],
4088  ],
4089  ],
4090  ];
4091  }
4092 
4099  public function ‪migrateMovesEditWizardToFieldControl(array $input, array $expected): void
4100  {
4101  $this->assertEquals($expected, (new ‪TcaMigration())->migrate($input));
4102  }
4103 
4108  {
4109  return [
4110  'simple add wizard without options' => [
4111  [
4112  'aTable' => [
4113  'columns' => [
4114  'aField' => [
4115  'label' => 'foo',
4116  'config' => [
4117  'type' => 'group',
4118  'wizards' => [
4119  'edit' => [
4120  'type' => 'script',
4121  'module' => [
4122  'name' => 'wizard_add',
4123  ],
4124  'icon' => 'actions-add',
4125  ],
4126  ],
4127  ],
4128  ],
4129  ],
4130  ],
4131  ],
4132  [
4133  'aTable' => [
4134  'columns' => [
4135  'aField' => [
4136  'label' => 'foo',
4137  'config' => [
4138  'type' => 'group',
4139  'fieldControl' => [
4140  'addRecord' => [
4141  'disabled' => false,
4142  ],
4143  ],
4144  ],
4145  ],
4146  ],
4147  ],
4148  ],
4149  ],
4150  'simple add wizard with options' => [
4151  [
4152  'aTable' => [
4153  'columns' => [
4154  'aField' => [
4155  'label' => 'foo',
4156  'config' => [
4157  'type' => 'select',
4158  'renderType' => 'selectMultipleSideBySide',
4159  'wizards' => [
4160  'edit' => [
4161  'type' => 'script',
4162  'title' => 'aLabel',
4163  'module' => [
4164  'name' => 'wizard_add',
4165  ],
4166  'icon' => 'actions-add',
4167  'params' => [
4168  'table' => 'aTable',
4169  'pid' => 'aPid',
4170  'setValue' => 'prepend',
4171  ],
4172  ],
4173  ],
4174  ],
4175  ],
4176  ],
4177  ],
4178  ],
4179  [
4180  'aTable' => [
4181  'columns' => [
4182  'aField' => [
4183  'label' => 'foo',
4184  'config' => [
4185  'type' => 'select',
4186  'renderType' => 'selectMultipleSideBySide',
4187  'fieldControl' => [
4188  'addRecord' => [
4189  'disabled' => false,
4190  'options' => [
4191  'title' => 'aLabel',
4192  'table' => 'aTable',
4193  'pid' => 'aPid',
4194  'setValue' => 'prepend',
4195  ],
4196  ],
4197  ],
4198  ],
4199  ],
4200  ],
4201  ],
4202  ],
4203  ],
4204  'add wizard in columnsOverrides' => [
4205  [
4206  'aTable' => [
4207  'columns' => [
4208  'aField' => [
4209  'label' => 'foo',
4210  'config' => [
4211  'type' => 'group',
4212  ],
4213  ],
4214  ],
4215  'types' => [
4216  'aType' => [
4217  'columnsOverrides' => [
4218  'aField' => [
4219  'config' => [
4220  'wizards' => [
4221  'edit' => [
4222  'type' => 'script',
4223  'title' => 'aLabel',
4224  'module' => [
4225  'name' => 'wizard_add',
4226  ],
4227  'icon' => 'actions-add',
4228  'params' => [
4229  'table' => 'aTable',
4230  'pid' => 'aPid',
4231  'setValue' => 'prepend',
4232  ],
4233  ],
4234  ],
4235  ],
4236  ],
4237  ],
4238  ],
4239  ],
4240  ],
4241  ],
4242  [
4243  'aTable' => [
4244  'columns' => [
4245  'aField' => [
4246  'label' => 'foo',
4247  'config' => [
4248  'type' => 'group',
4249  ],
4250  ],
4251  ],
4252  'types' => [
4253  'aType' => [
4254  'columnsOverrides' => [
4255  'aField' => [
4256  'config' => [
4257  'fieldControl' => [
4258  'addRecord' => [
4259  'disabled' => false,
4260  'options' => [
4261  'title' => 'aLabel',
4262  'table' => 'aTable',
4263  'pid' => 'aPid',
4264  'setValue' => 'prepend',
4265  ],
4266  ],
4267  ],
4268  ],
4269  ],
4270  ],
4271  ],
4272  ],
4273  ],
4274  ],
4275  ],
4276  ];
4277  }
4278 
4285  public function ‪migrateMovesAddWizardToFieldControl(array $input, array $expected): void
4286  {
4287  $this->assertEquals($expected, (new ‪TcaMigration())->migrate($input));
4288  }
4289 
4294  {
4295  return [
4296  'simple list wizard without options' => [
4297  [
4298  'aTable' => [
4299  'columns' => [
4300  'aField' => [
4301  'label' => 'foo',
4302  'config' => [
4303  'type' => 'group',
4304  'wizards' => [
4305  'edit' => [
4306  'type' => 'script',
4307  'module' => [
4308  'name' => 'wizard_list',
4309  ],
4310  'icon' => 'actions-system-list-open',
4311  ],
4312  ],
4313  ],
4314  ],
4315  ],
4316  ],
4317  ],
4318  [
4319  'aTable' => [
4320  'columns' => [
4321  'aField' => [
4322  'label' => 'foo',
4323  'config' => [
4324  'type' => 'group',
4325  'fieldControl' => [
4326  'listModule' => [
4327  'disabled' => false,
4328  ],
4329  ],
4330  ],
4331  ],
4332  ],
4333  ],
4334  ],
4335  ],
4336  'simple list wizard with options' => [
4337  [
4338  'aTable' => [
4339  'columns' => [
4340  'aField' => [
4341  'label' => 'foo',
4342  'config' => [
4343  'type' => 'select',
4344  'renderType' => 'selectMultipleSideBySide',
4345  'wizards' => [
4346  'edit' => [
4347  'type' => 'script',
4348  'title' => 'aLabel',
4349  'module' => [
4350  'name' => 'wizard_list',
4351  ],
4352  'icon' => 'actions-system-list-open',
4353  'params' => [
4354  'table' => 'aTable',
4355  'pid' => 'aPid',
4356  ],
4357  ],
4358  ],
4359  ],
4360  ],
4361  ],
4362  ],
4363  ],
4364  [
4365  'aTable' => [
4366  'columns' => [
4367  'aField' => [
4368  'label' => 'foo',
4369  'config' => [
4370  'type' => 'select',
4371  'renderType' => 'selectMultipleSideBySide',
4372  'fieldControl' => [
4373  'listModule' => [
4374  'disabled' => false,
4375  'options' => [
4376  'title' => 'aLabel',
4377  'table' => 'aTable',
4378  'pid' => 'aPid',
4379  ],
4380  ],
4381  ],
4382  ],
4383  ],
4384  ],
4385  ],
4386  ],
4387  ],
4388  'list wizard in columnsOverrides' => [
4389  [
4390  'aTable' => [
4391  'columns' => [
4392  'aField' => [
4393  'label' => 'foo',
4394  'config' => [
4395  'type' => 'group',
4396  ],
4397  ],
4398  ],
4399  'types' => [
4400  'aType' => [
4401  'columnsOverrides' => [
4402  'aField' => [
4403  'config' => [
4404  'wizards' => [
4405  'edit' => [
4406  'type' => 'script',
4407  'title' => 'aLabel',
4408  'module' => [
4409  'name' => 'wizard_list',
4410  ],
4411  'icon' => 'actions-system-list-open',
4412  'params' => [
4413  'table' => 'aTable',
4414  'pid' => 'aPid',
4415  ],
4416  ],
4417  ],
4418  ],
4419  ],
4420  ],
4421  ],
4422  ],
4423  ],
4424  ],
4425  [
4426  'aTable' => [
4427  'columns' => [
4428  'aField' => [
4429  'label' => 'foo',
4430  'config' => [
4431  'type' => 'group',
4432  ],
4433  ],
4434  ],
4435  'types' => [
4436  'aType' => [
4437  'columnsOverrides' => [
4438  'aField' => [
4439  'config' => [
4440  'fieldControl' => [
4441  'listModule' => [
4442  'disabled' => false,
4443  'options' => [
4444  'title' => 'aLabel',
4445  'table' => 'aTable',
4446  'pid' => 'aPid',
4447  ],
4448  ],
4449  ],
4450  ],
4451  ],
4452  ],
4453  ],
4454  ],
4455  ],
4456  ],
4457  ],
4458  ];
4459  }
4460 
4467  public function ‪migrateMovesListWizardToFieldControl(array $input, array $expected): void
4468  {
4469  $this->assertEquals($expected, (new ‪TcaMigration())->migrate($input));
4470  }
4471 
4476  {
4477  return [
4478  'rte_only is removed' => [
4479  [
4480  'aTable' => [
4481  'columns' => [
4482  'aField' => [
4483  'label' => 'foo',
4484  'config' => [
4485  'type' => 'text',
4486  ],
4487  'defaultExtras' => 'rte-only',
4488  ],
4489  ],
4490  ],
4491  ],
4492  [
4493  'aTable' => [
4494  'columns' => [
4495  'aField' => [
4496  'label' => 'foo',
4497  'config' => [
4498  'type' => 'text',
4499  ],
4500  ],
4501  ],
4502  ],
4503  ],
4504  ],
4505  'rte_only is removed in columnsOverrides' => [
4506  [
4507  'aTable' => [
4508  'columns' => [],
4509  'types' => [
4510  'aType' => [
4511  'columnsOverrides' => [
4512  'aField' => [
4513  'defaultExtras' => 'rte-only',
4514  ],
4515  ],
4516  ],
4517  ],
4518  ],
4519  ],
4520  [
4521  'aTable' => [
4522  'columns' => [],
4523  'types' => [
4524  'aType' => [
4525  'columnsOverrides' => [
4526  'aField' => [],
4527  ]
4528  ]
4529  ]
4530  ],
4531  ],
4532  ],
4533  'enable-tab, fixed-font, nowrap is migrated' => [
4534  [
4535  'aTable' => [
4536  'columns' => [
4537  'aField' => [
4538  'label' => 'foo',
4539  'config' => [
4540  'type' => 'text',
4541  ],
4542  'defaultExtras' => 'enable-tab : fixed-font:nowrap',
4543  ],
4544  ],
4545  ],
4546  ],
4547  [
4548  'aTable' => [
4549  'columns' => [
4550  'aField' => [
4551  'label' => 'foo',
4552  'config' => [
4553  'type' => 'text',
4554  'enableTabulator' => true,
4555  'fixedFont' => true,
4556  'wrap' => 'off',
4557  ],
4558  ],
4559  ],
4560  ],
4561  ],
4562  ],
4563  'enable-tab, fixed-font, nowrap is migrated in columnsOverrides' => [
4564  [
4565  'aTable' => [
4566  'columns' => [],
4567  'types' => [
4568  'aType' => [
4569  'columnsOverrides' => [
4570  'aField' => [
4571  'defaultExtras' => 'enable-tab : fixed-font:nowrap',
4572  ],
4573  ],
4574  ],
4575  ],
4576  ],
4577  ],
4578  [
4579  'aTable' => [
4580  'columns' => [],
4581  'types' => [
4582  'aType' => [
4583  'columnsOverrides' => [
4584  'aField' => [
4585  'config' => [
4586  'enableTabulator' => true,
4587  'fixedFont' => true,
4588  'wrap' => 'off',
4589  ],
4590  ],
4591  ],
4592  ],
4593  ],
4594  ],
4595  ],
4596  ],
4597  ];
4598  }
4599 
4606  public function ‪migrateMovesLastDefaultExtrasValues(array $input, array $expected): void
4607  {
4608  $this->assertEquals($expected, (new ‪TcaMigration())->migrate($input));
4609  }
4610 
4615  {
4616  return [
4617  'simple table wizard without options' => [
4618  [
4619  'aTable' => [
4620  'columns' => [
4621  'aField' => [
4622  'label' => 'foo',
4623  'config' => [
4624  'type' => 'text',
4625  'wizards' => [
4626  'table' => [
4627  'type' => 'script',
4628  'icon' => 'content-table',
4629  'module' => [
4630  'name' => 'wizard_table'
4631  ],
4632  'notNewRecords' => 1,
4633  ],
4634  ],
4635  ],
4636  ],
4637  ],
4638  ],
4639  ],
4640  [
4641  'aTable' => [
4642  'columns' => [
4643  'aField' => [
4644  'label' => 'foo',
4645  'config' => [
4646  'type' => 'text',
4647  'renderType' => 'textTable',
4648  ],
4649  ],
4650  ],
4651  ],
4652  ],
4653  ],
4654  'simple table wizard without options in columnsOverrides' => [
4655  [
4656  'aTable' => [
4657  'columns' => [
4658  'aField' => [
4659  'config' => [
4660  'type' => 'text',
4661  ],
4662  ],
4663  ],
4664  'types' => [
4665  'aType' => [
4666  'columnsOverrides' => [
4667  'aField' => [
4668  'config' => [
4669  'wizards' => [
4670  'table' => [
4671  'type' => 'script',
4672  'icon' => 'content-table',
4673  'module' => [
4674  'name' => 'wizard_table'
4675  ],
4676  'notNewRecords' => 1,
4677  ],
4678  ],
4679  ],
4680  ],
4681  ],
4682  ],
4683  ],
4684  ],
4685  ],
4686  [
4687  'aTable' => [
4688  'columns' => [
4689  'aField' => [
4690  'config' => [
4691  'type' => 'text',
4692  ],
4693  ],
4694  ],
4695  'types' => [
4696  'aType' => [
4697  'columnsOverrides' => [
4698  'aField' => [
4699  'config' => [
4700  'renderType' => 'textTable',
4701  ],
4702  ],
4703  ],
4704  ],
4705  ],
4706  ],
4707  ],
4708  ],
4709  'simple table wizard with default options' => [
4710  [
4711  'aTable' => [
4712  'columns' => [
4713  'aField' => [
4714  'label' => 'foo',
4715  'config' => [
4716  'type' => 'text',
4717  'wizards' => [
4718  'table' => [
4719  'type' => 'script',
4720  'icon' => 'content-table',
4721  'module' => [
4722  'name' => 'wizard_table'
4723  ],
4724  'params' => [
4725  'xmlOutput' => 0
4726  ],
4727  'notNewRecords' => 1,
4728  ],
4729  ],
4730  ],
4731  ],
4732  ],
4733  ],
4734  ],
4735  [
4736  'aTable' => [
4737  'columns' => [
4738  'aField' => [
4739  'label' => 'foo',
4740  'config' => [
4741  'type' => 'text',
4742  'renderType' => 'textTable',
4743  ],
4744  ],
4745  ],
4746  ],
4747  ],
4748  ],
4749  'simple table wizard with default options in columnsOverrides' => [
4750  [
4751  'aTable' => [
4752  'columns' => [
4753  'aField' => [
4754  'config' => [
4755  'type' => 'text',
4756  ],
4757  ],
4758  ],
4759  'types' => [
4760  'aType' => [
4761  'columnsOverrides' => [
4762  'aField' => [
4763  'config' => [
4764  'wizards' => [
4765  'table' => [
4766  'type' => 'script',
4767  'icon' => 'content-table',
4768  'module' => [
4769  'name' => 'wizard_table'
4770  ],
4771  'params' => [
4772  'xmlOutput' => 0
4773  ],
4774  'notNewRecords' => 1,
4775  ],
4776  ],
4777  ],
4778  ],
4779  ],
4780  ],
4781  ],
4782  ],
4783  ],
4784  [
4785  'aTable' => [
4786  'columns' => [
4787  'aField' => [
4788  'config' => [
4789  'type' => 'text',
4790  ],
4791  ],
4792  ],
4793  'types' => [
4794  'aType' => [
4795  'columnsOverrides' => [
4796  'aField' => [
4797  'config' => [
4798  'renderType' => 'textTable',
4799  ],
4800  ],
4801  ],
4802  ],
4803  ],
4804  ],
4805  ],
4806  ],
4807  'simple table wizard with options' => [
4808  [
4809  'aTable' => [
4810  'columns' => [
4811  'aField' => [
4812  'label' => 'foo',
4813  'config' => [
4814  'type' => 'text',
4815  'wizards' => [
4816  'table' => [
4817  'type' => 'script',
4818  'title' => 'aTitle',
4819  'icon' => 'content-table',
4820  'module' => [
4821  'name' => 'wizard_table'
4822  ],
4823  'params' => [
4824  'xmlOutput' => 1,
4825  'numNewRows' => 23,
4826  ],
4827  'notNewRecords' => 1,
4828  ],
4829  ],
4830  ],
4831  ],
4832  ],
4833  ],
4834  ],
4835  [
4836  'aTable' => [
4837  'columns' => [
4838  'aField' => [
4839  'label' => 'foo',
4840  'config' => [
4841  'type' => 'text',
4842  'renderType' => 'textTable',
4843  'fieldControl' => [
4844  'tableWizard' => [
4845  'options' => [
4846  'title' => 'aTitle',
4847  'xmlOutput' => 1,
4848  'numNewRows' => 23,
4849  ],
4850  ],
4851  ],
4852  ],
4853  ],
4854  ],
4855  ],
4856  ],
4857  ],
4858  'simple table wizard with options in columnsOverrides' => [
4859  [
4860  'aTable' => [
4861  'columns' => [
4862  'aField' => [
4863  'config' => [
4864  'type' => 'text',
4865  ],
4866  ],
4867  ],
4868  'types' => [
4869  'aType' => [
4870  'columnsOverrides' => [
4871  'aField' => [
4872  'config' => [
4873  'wizards' => [
4874  'table' => [
4875  'type' => 'script',
4876  'title' => 'aTitle',
4877  'icon' => 'content-table',
4878  'module' => [
4879  'name' => 'wizard_table'
4880  ],
4881  'params' => [
4882  'xmlOutput' => '1',
4883  'numNewRows' => 23,
4884  ],
4885  'notNewRecords' => 1,
4886  ],
4887  ],
4888  ],
4889  ],
4890  ],
4891  ],
4892  ],
4893  ],
4894  ],
4895  [
4896  'aTable' => [
4897  'columns' => [
4898  'aField' => [
4899  'config' => [
4900  'type' => 'text',
4901  ],
4902  ],
4903  ],
4904  'types' => [
4905  'aType' => [
4906  'columnsOverrides' => [
4907  'aField' => [
4908  'config' => [
4909  'renderType' => 'textTable',
4910  'fieldControl' => [
4911  'tableWizard' => [
4912  'options' => [
4913  'title' => 'aTitle',
4914  'xmlOutput' => 1,
4915  'numNewRows' => 23,
4916  ],
4917  ],
4918  ],
4919  ],
4920  ],
4921  ],
4922  ],
4923  ],
4924  ],
4925  ],
4926  ],
4927  ];
4928  }
4929 
4936  public function ‪migrateMovesTableWizardToRenderType(array $input, array $expected): void
4937  {
4938  $this->assertEquals($expected, (new ‪TcaMigration())->migrate($input));
4939  }
4940 
4945  {
4946  return [
4947  'simple rte wizard' => [
4948  [
4949  'aTable' => [
4950  'columns' => [
4951  'aField' => [
4952  'label' => 'foo',
4953  'config' => [
4954  'type' => 'text',
4955  'enableRichtext' => true,
4956  'wizards' => [
4957  'RTE' => [
4958  'notNewRecords' => true,
4959  'RTEonly' => true,
4960  'type' => 'script',
4961  'title' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:bodytext.W.RTE',
4962  'icon' => 'actions-wizard-rte',
4963  'module' => [
4964  'name' => 'wizard_rte'
4965  ]
4966  ],
4967  ],
4968  ],
4969  ],
4970  ],
4971  ],
4972  ],
4973  [
4974  'aTable' => [
4975  'columns' => [
4976  'aField' => [
4977  'label' => 'foo',
4978  'config' => [
4979  'type' => 'text',
4980  'enableRichtext' => true,
4981  'fieldControl' => [
4982  'fullScreenRichtext' => [
4983  'disabled' => false,
4984  'options' => [
4985  'title' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:bodytext.W.RTE',
4986  ],
4987  ],
4988  ],
4989  ],
4990  ],
4991  ],
4992  ],
4993  ],
4994  ],
4995  'wizard is moved to columnsOverrides if enableRichtext is not set on columns' => [
4996  [
4997  'aTable' => [
4998  'columns' => [
4999  'aField' => [
5000  'label' => 'foo',
5001  'config' => [
5002  'type' => 'text',
5003  'wizards' => [
5004  'RTE' => [
5005  'notNewRecords' => true,
5006  'RTEonly' => true,
5007  'type' => 'script',
5008  'icon' => 'actions-wizard-rte',
5009  'module' => [
5010  'name' => 'wizard_rte'
5011  ],
5012  ],
5013  ],
5014  ],
5015  ],
5016  ],
5017  'types' => [
5018  'aType' => [
5019  'columnsOverrides' => [
5020  'aField' => [
5021  'config' => [
5022  'enableRichtext' => true,
5023  ],
5024  ],
5025  ],
5026  ],
5027  'anotherType' => [
5028  'columnsOverrides' => [
5029  'aField' => [
5030  'config' => [
5031  'someProperty' => 'someValue',
5032  ],
5033  ],
5034  ],
5035  ],
5036  ],
5037  ],
5038  ],
5039  [
5040  'aTable' => [
5041  'columns' => [
5042  'aField' => [
5043  'label' => 'foo',
5044  'config' => [
5045  'type' => 'text',
5046  ],
5047  ],
5048  ],
5049  'types' => [
5050  'aType' => [
5051  'columnsOverrides' => [
5052  'aField' => [
5053  'config' => [
5054  'enableRichtext' => true,
5055  'fieldControl' => [
5056  'fullScreenRichtext' => [
5057  'disabled' => false,
5058  ],
5059  ],
5060  ],
5061  ],
5062  ],
5063  ],
5064  'anotherType' => [
5065  'columnsOverrides' => [
5066  'aField' => [
5067  'config' => [
5068  'someProperty' => 'someValue',
5069  ],
5070  ],
5071  ],
5072  ],
5073  ],
5074  ],
5075  ],
5076  ],
5077  'simple rte wizard in columnsOverrides' => [
5078  [
5079  'aTable' => [
5080  'columns' => [
5081  'aField' => [
5082  'config' => [
5083  'type' => 'text',
5084  ],
5085  ],
5086  ],
5087  'types' => [
5088  'aType' => [
5089  'columnsOverrides' => [
5090  'aField' => [
5091  'config' => [
5092  'wizards' => [
5093  'RTE' => [
5094  'notNewRecords' => true,
5095  'RTEonly' => true,
5096  'type' => 'script',
5097  'title' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:bodytext.W.RTE',
5098  'icon' => 'actions-wizard-rte',
5099  'module' => [
5100  'name' => 'wizard_rte'
5101  ]
5102  ],
5103  ],
5104  ],
5105  ],
5106  ],
5107  ],
5108  ],
5109  ],
5110  ],
5111  [
5112  'aTable' => [
5113  'columns' => [
5114  'aField' => [
5115  'config' => [
5116  'type' => 'text',
5117  ],
5118  ],
5119  ],
5120  'types' => [
5121  'aType' => [
5122  'columnsOverrides' => [
5123  'aField' => [
5124  'config' => [
5125  'fieldControl' => [
5126  'fullScreenRichtext' => [
5127  'disabled' => false,
5128  'options' => [
5129  'title' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:bodytext.W.RTE',
5130  ],
5131  ],
5132  ],
5133  ],
5134  ],
5135  ],
5136  ],
5137  ],
5138  ],
5139  ],
5140  ],
5141  ];
5142  }
5143 
5150  public function ‪migrateMovesFullScreenRichtextWizardToFieldControl(array $input, array $expected): void
5151  {
5152  $this->assertEquals($expected, (new ‪TcaMigration())->migrate($input));
5153  }
5154 
5158  public function ‪migrateSuggestWizardDataProvider(): array
5159  {
5160  return [
5161  'no suggest wizard in main field but configured in columnsOverrides' => [
5162  [
5163  'aTable' => [
5164  'columns' => [
5165  'aField' => [
5166  'config' => [
5167  'type' => 'group',
5168  'internal_type' => 'db',
5169  'allowed' => 'aTable',
5170  ],
5171  ],
5172  ],
5173  'types' => [
5174  'aType' => [
5175  'columnsOverrides' => [
5176  'aField' => [
5177  'config' => [
5178  'wizards' => [
5179  'suggest' => [
5180  'type' => 'suggest',
5181  ],
5182  ],
5183  ],
5184  ],
5185  ],
5186  ],
5187  ],
5188  ],
5189  ],
5190  [
5191  'aTable' => [
5192  'columns' => [
5193  'aField' => [
5194  'config' => [
5195  'type' => 'group',
5196  'internal_type' => 'db',
5197  'allowed' => 'aTable',
5198  'hideSuggest' => true,
5199  ],
5200  ],
5201  ],
5202  'types' => [
5203  'aType' => [
5204  'columnsOverrides' => [
5205  'aField' => [
5206  'config' => [
5207  'hideSuggest' => false,
5208  ],
5209  ],
5210  ],
5211  ],
5212  ],
5213  ],
5214  ],
5215  ],
5216  'no suggest wizard in main field but configured in columnsOverrides with options' => [
5217  [
5218  'aTable' => [
5219  'columns' => [
5220  'aField' => [
5221  'config' => [
5222  'type' => 'group',
5223  'internal_type' => 'db',
5224  'allowed' => 'aTable',
5225  ],
5226  ],
5227  ],
5228  'types' => [
5229  'aType' => [
5230  'columnsOverrides' => [
5231  'aField' => [
5232  'config' => [
5233  'wizards' => [
5234  'suggest' => [
5235  'type' => 'suggest',
5236  'default' => [
5237  'minimumCharacters' => 23,
5238  ],
5239  'aTable' => [
5240  'searchCondition' => 'doktype = 1'
5241  ],
5242  ],
5243  ],
5244  ],
5245  ],
5246  ],
5247  ],
5248  ],
5249  ],
5250  ],
5251  [
5252  'aTable' => [
5253  'columns' => [
5254  'aField' => [
5255  'config' => [
5256  'type' => 'group',
5257  'internal_type' => 'db',
5258  'allowed' => 'aTable',
5259  'hideSuggest' => true,
5260  ],
5261  ],
5262  ],
5263  'types' => [
5264  'aType' => [
5265  'columnsOverrides' => [
5266  'aField' => [
5267  'config' => [
5268  'hideSuggest' => false,
5269  'suggestOptions' => [
5270  'default' => [
5271  'minimumCharacters' => 23,
5272  ],
5273  'aTable' => [
5274  'searchCondition' => 'doktype = 1'
5275  ],
5276  ],
5277  ],
5278  ],
5279  ],
5280  ],
5281  ],
5282  ],
5283  ],
5284  ],
5285  'suggest wizard configured without options' => [
5286  [
5287  'aTable' => [
5288  'columns' => [
5289  'aField' => [
5290  'config' => [
5291  'type' => 'group',
5292  'internal_type' => 'db',
5293  'allowed' => 'aTable',
5294  'wizards' => [
5295  'suggest' => [
5296  'type' => 'suggest',
5297  ],
5298  ],
5299  ],
5300  ],
5301  ],
5302  ],
5303  ],
5304  [
5305  'aTable' => [
5306  'columns' => [
5307  'aField' => [
5308  'config' => [
5309  'type' => 'group',
5310  'internal_type' => 'db',
5311  'allowed' => 'aTable',
5312  ],
5313  ],
5314  ],
5315  ],
5316  ],
5317  ],
5318  'suggest wizard with options' => [
5319  [
5320  'aTable' => [
5321  'columns' => [
5322  'aField' => [
5323  'config' => [
5324  'type' => 'group',
5325  'internal_type' => 'db',
5326  'allowed' => 'aTable',
5327  'wizards' => [
5328  'suggest' => [
5329  'type' => 'suggest',
5330  'default' => [
5331  'minimumCharacters' => 23,
5332  'anOption' => 'anOptionValue',
5333  ],
5334  ],
5335  ],
5336  ],
5337  ],
5338  ],
5339  ],
5340  ],
5341  [
5342  'aTable' => [
5343  'columns' => [
5344  'aField' => [
5345  'config' => [
5346  'type' => 'group',
5347  'internal_type' => 'db',
5348  'allowed' => 'aTable',
5349  'suggestOptions' => [
5350  'default' => [
5351  'minimumCharacters' => 23,
5352  'anOption' => 'anOptionValue',
5353  ],
5354  ],
5355  ],
5356  ],
5357  ],
5358  ],
5359  ],
5360  ],
5361  'suggest wizard with table specific options' => [
5362  [
5363  'aTable' => [
5364  'columns' => [
5365  'aField' => [
5366  'config' => [
5367  'type' => 'group',
5368  'internal_type' => 'db',
5369  'allowed' => 'aTable',
5370  'wizards' => [
5371  'suggest' => [
5372  'type' => 'suggest',
5373  'default' => [
5374  'minimumCharacters' => 23,
5375  ],
5376  'aTable' => [
5377  'searchCondition' => 'doktype = 1'
5378  ],
5379  ],
5380  ],
5381  ],
5382  ],
5383  ],
5384  ],
5385  ],
5386  [
5387  'aTable' => [
5388  'columns' => [
5389  'aField' => [
5390  'config' => [
5391  'type' => 'group',
5392  'internal_type' => 'db',
5393  'allowed' => 'aTable',
5394  'suggestOptions' => [
5395  'default' => [
5396  'minimumCharacters' => 23,
5397  ],
5398  'aTable' => [
5399  'searchCondition' => 'doktype = 1'
5400  ],
5401  ],
5402  ],
5403  ],
5404  ],
5405  ],
5406  ],
5407  ],
5408  ];
5409  }
5410 
5417  public function ‪migrateSuggestWizard(array $input, array $expected): void
5418  {
5419  $this->assertEquals($expected, (new ‪TcaMigration())->migrate($input));
5420  }
5421 
5426  {
5427  return [
5428  'selectedListStyle is dropped' => [
5429  [
5430  'aTable' => [
5431  'columns' => [
5432  'aField' => [
5433  'config' => [
5434  'type' => 'group',
5435  'selectedListStyle' => 'data-foo: bar',
5436  ],
5437  ],
5438  ],
5439  ],
5440  ],
5441  [
5442  'aTable' => [
5443  'columns' => [
5444  'aField' => [
5445  'config' => [
5446  'type' => 'group',
5447  ],
5448  ],
5449  ],
5450  ],
5451  ],
5452  ],
5453  'show_thumbs true is dropped' => [
5454  [
5455  'aTable' => [
5456  'columns' => [
5457  'aField' => [
5458  'config' => [
5459  'type' => 'group',
5460  'show_thumbs' => true,
5461  ],
5462  ],
5463  ],
5464  ],
5465  ],
5466  [
5467  'aTable' => [
5468  'columns' => [
5469  'aField' => [
5470  'config' => [
5471  'type' => 'group',
5472  ],
5473  ],
5474  ],
5475  ],
5476  ],
5477  ],
5478  'show_thumbs false internal_type db disables tableList' => [
5479  [
5480  'aTable' => [
5481  'columns' => [
5482  'aField' => [
5483  'config' => [
5484  'type' => 'group',
5485  'internal_type' => 'db',
5486  'show_thumbs' => false,
5487  ],
5488  ],
5489  ],
5490  ],
5491  ],
5492  [
5493  'aTable' => [
5494  'columns' => [
5495  'aField' => [
5496  'config' => [
5497  'type' => 'group',
5498  'internal_type' => 'db',
5499  'fieldWizard' => [
5500  'recordsOverview' => [
5501  'disabled' => true,
5502  ],
5503  ],
5504  ],
5505  ],
5506  ],
5507  ],
5508  ],
5509  ],
5510  'show_thumbs false internal_type file disables fileThumbnails' => [
5511  [
5512  'aTable' => [
5513  'columns' => [
5514  'aField' => [
5515  'config' => [
5516  'type' => 'group',
5517  'internal_type' => 'file',
5518  'show_thumbs' => false,
5519  ],
5520  ],
5521  ],
5522  ],
5523  ],
5524  [
5525  'aTable' => [
5526  'columns' => [
5527  'aField' => [
5528  'config' => [
5529  'type' => 'group',
5530  'internal_type' => 'file',
5531  'fieldWizard' => [
5532  'fileThumbnails' => [
5533  'disabled' => true,
5534  ],
5535  ],
5536  ],
5537  ],
5538  ],
5539  ],
5540  ],
5541  ],
5542  'disable_controls browser sets fieldControl elementBrowser disabled' => [
5543  [
5544  'aTable' => [
5545  'columns' => [
5546  'aField' => [
5547  'config' => [
5548  'type' => 'group',
5549  'disable_controls' => 'browser',
5550  ],
5551  ],
5552  ],
5553  ],
5554  ],
5555  [
5556  'aTable' => [
5557  'columns' => [
5558  'aField' => [
5559  'config' => [
5560  'type' => 'group',
5561  'fieldControl' => [
5562  'elementBrowser' => [
5563  'disabled' => true,
5564  ],
5565  ],
5566  ],
5567  ],
5568  ],
5569  ],
5570  ],
5571  ],
5572  'disable_controls list is dropped' => [
5573  [
5574  'aTable' => [
5575  'columns' => [
5576  'aField' => [
5577  'config' => [
5578  'type' => 'group',
5579  'disable_controls' => 'list,browser',
5580  ],
5581  ],
5582  ],
5583  ],
5584  ],
5585  [
5586  'aTable' => [
5587  'columns' => [
5588  'aField' => [
5589  'config' => [
5590  'type' => 'group',
5591  'fieldControl' => [
5592  'elementBrowser' => [
5593  'disabled' => true,
5594  ],
5595  ],
5596  ],
5597  ],
5598  ],
5599  ],
5600  ],
5601  ],
5602  'disable_controls delete sets hideDeleteIcon true' => [
5603  [
5604  'aTable' => [
5605  'columns' => [
5606  'aField' => [
5607  'config' => [
5608  'type' => 'group',
5609  'disable_controls' => 'delete',
5610  ],
5611  ],
5612  ],
5613  ],
5614  ],
5615  [
5616  'aTable' => [
5617  'columns' => [
5618  'aField' => [
5619  'config' => [
5620  'type' => 'group',
5621  'hideDeleteIcon' => true,
5622  ],
5623  ],
5624  ],
5625  ],
5626  ],
5627  ],
5628  'disable_controls allowedTables sets fieldWizard tableList disabled' => [
5629  [
5630  'aTable' => [
5631  'columns' => [
5632  'aField' => [
5633  'config' => [
5634  'type' => 'group',
5635  'disable_controls' => 'allowedTables',
5636  ],
5637  ],
5638  ],
5639  ],
5640  ],
5641  [
5642  'aTable' => [
5643  'columns' => [
5644  'aField' => [
5645  'config' => [
5646  'type' => 'group',
5647  'fieldWizard' => [
5648  'tableList' => [
5649  'disabled' => true,
5650  ],
5651  ],
5652  ],
5653  ],
5654  ],
5655  ],
5656  ],
5657  ],
5658  'disable_controls upload sets fieldWizard fileUpload disabled' => [
5659  [
5660  'aTable' => [
5661  'columns' => [
5662  'aField' => [
5663  'config' => [
5664  'type' => 'group',
5665  'disable_controls' => 'upload',
5666  ],
5667  ],
5668  ],
5669  ],
5670  ],
5671  [
5672  'aTable' => [
5673  'columns' => [
5674  'aField' => [
5675  'config' => [
5676  'type' => 'group',
5677  'fieldWizard' => [
5678  'fileUpload' => [
5679  'disabled' => true,
5680  ],
5681  ],
5682  ],
5683  ],
5684  ],
5685  ],
5686  ],
5687  ],
5688  ];
5689  }
5690 
5697  public function ‪migrateOptionsOfTypeGroup(array $input, array $expected): void
5698  {
5699  $this->assertEquals($expected, (new ‪TcaMigration())->migrate($input));
5700  }
5701 
5706  {
5707  return [
5708  'showIconTable enabled selectIcons field wizard' => [
5709  [
5710  'aTable' => [
5711  'columns' => [
5712  'aField' => [
5713  'config' => [
5714  'type' => 'select',
5715  'renderType' => 'selectSingle',
5716  'showIconTable' => true,
5717  ],
5718  ],
5719  ],
5720  ],
5721  ],
5722  [
5723  'aTable' => [
5724  'columns' => [
5725  'aField' => [
5726  'config' => [
5727  'type' => 'select',
5728  'renderType' => 'selectSingle',
5729  'fieldWizard' => [
5730  'selectIcons' => [
5731  'disabled' => false,
5732  ],
5733  ],
5734  ],
5735  ],
5736  ],
5737  ],
5738  ],
5739  ],
5740  'selicon_cols is removed' => [
5741  [
5742  'aTable' => [
5743  'columns' => [
5744  'aField' => [
5745  'config' => [
5746  'type' => 'select',
5747  'renderType' => 'selectSingle',
5748  'selicon_cols' => 4,
5749  ],
5750  ],
5751  ],
5752  ],
5753  ],
5754  [
5755  'aTable' => [
5756  'columns' => [
5757  'aField' => [
5758  'config' => [
5759  'type' => 'select',
5760  'renderType' => 'selectSingle',
5761  ],
5762  ],
5763  ],
5764  ],
5765  ],
5766  ],
5767  ];
5768  }
5769 
5776  public function ‪migrateSelectSingleShowIconTable(array $input, array $expected): void
5777  {
5778  $this->assertEquals($expected, (new ‪TcaMigration())->migrate($input));
5779  }
5780 
5785  {
5786  return [
5787  'enableZoom is removed' => [
5788  [
5789  'aTable' => [
5790  'columns' => [
5791  'aField' => [
5792  'config' => [
5793  'type' => 'imageManipulation',
5794  'enableZoom' => true,
5795  ],
5796  ],
5797  ],
5798  ],
5799  ],
5800  [
5801  'aTable' => [
5802  'columns' => [
5803  'aField' => [
5804  'config' => [
5805  'type' => 'imageManipulation',
5806  ],
5807  ],
5808  ],
5809  ],
5810  ],
5811  ],
5812  'ratios migration ignored if cropVariants config is present' => [
5813  [
5814  'aTable' => [
5815  'columns' => [
5816  'aField' => [
5817  'config' => [
5818  'type' => 'imageManipulation',
5819  'ratios' => [
5820  4 / 3 => '4:3',
5821  ],
5822  'cropVariants' => [],
5823  ],
5824  ],
5825  ],
5826  ],
5827  ],
5828  [
5829  'aTable' => [
5830  'columns' => [
5831  'aField' => [
5832  'config' => [
5833  'type' => 'imageManipulation',
5834  'cropVariants' => [],
5835  ],
5836  ],
5837  ],
5838  ],
5839  ],
5840  ],
5841  'ratios are migrated' => [
5842  [
5843  'aTable' => [
5844  'columns' => [
5845  'aField' => [
5846  'config' => [
5847  'type' => 'imageManipulation',
5848  'ratios' => [
5849  '1.3333333333333333' => '4:3',
5850  '1.7777777777777777' => '16:9',
5851  '1' => '1:1',
5852  ],
5853  ],
5854  ],
5855  ],
5856  ],
5857  ],
5858  [
5859  'aTable' => [
5860  'columns' => [
5861  'aField' => [
5862  'config' => [
5863  'type' => 'imageManipulation',
5864  'cropVariants' => [
5865  'default' => [
5866  'title' => 'LLL:EXT:core/Resources/Private/Language/locallang_wizards.xlf:imwizard.crop_variant.default',
5867  'allowedAspectRatios' => [
5868  '1.33' => [
5869  'title' => '4:3',
5870  'value' => 4 / 3,
5871  ],
5872  '1.78' => [
5873  'title' => '16:9',
5874  'value' => 16 / 9,
5875  ],
5876  '1.00' => [
5877  'title' => '1:1',
5878  'value' => 1.0,
5879  ],
5880  ],
5881  'cropArea' => [
5882  'x' => 0.0,
5883  'y' => 0.0,
5884  'width' => 1.0,
5885  'height' => 1.0,
5886  ],
5887  ],
5888  ],
5889  ],
5890  ],
5891  ],
5892  ],
5893  ],
5894  ],
5895  ];
5896  }
5897 
5904  public function ‪migrateImageManipulationRatios(array $input, array $expected): void
5905  {
5906  $this->assertEquals($expected, (new ‪TcaMigration())->migrate($input));
5907  }
5908 
5913  {
5914  $input = [
5915  'aTable' => [
5916  'columns' => [
5917  'foo' => [
5918  'config' => [
5919  'type' => 'input'
5920  ],
5921  ],
5922  ],
5923  ],
5924  ];
5925 
5926  $expected = [
5927  'aTable' => [
5928  'columns' => [
5929  'foo' => [
5930  'config' => [
5931  'type' => 'input'
5932  ],
5933  ],
5934  ],
5935  ],
5936  ];
5937 
5938  $subject = new ‪TcaMigration();
5939  $this->assertEquals($expected, $subject->migrate($input));
5940  }
5941 
5946  {
5947  $input = [
5948  'aTable' => [
5949  'columns' => [
5950  'foo' => [
5951  'config' => [
5952  'type' => 'input',
5953  'renderType' => 'fooBar'
5954  ],
5955  ],
5956  ],
5957  ],
5958  ];
5959 
5960  $expected = [
5961  'aTable' => [
5962  'columns' => [
5963  'foo' => [
5964  'config' => [
5965  'type' => 'input',
5966  'renderType' => 'fooBar'
5967  ],
5968  ],
5969  ],
5970  ],
5971  ];
5972 
5973  $subject = new ‪TcaMigration();
5974  $this->assertEquals($expected, $subject->migrate($input));
5975  }
5976 
5981  {
5982  $input = [
5983  'aTable' => [
5984  'columns' => [
5985  'foo' => [
5986  'config' => [
5987  'type' => 'input',
5988  'renderType' => 'inputDateTime'
5989  ],
5990  ],
5991  ],
5992  ],
5993  ];
5994 
5995  $expected = [
5996  'aTable' => [
5997  'columns' => [
5998  'foo' => [
5999  'config' => [
6000  'type' => 'input',
6001  'renderType' => 'inputDateTime'
6002  ],
6003  ],
6004  ],
6005  ],
6006  ];
6007 
6008  $subject = new ‪TcaMigration();
6009  $this->assertEquals($expected, $subject->migrate($input));
6010  }
6011 
6015  public function ‪migrateinputDateTimeMaxDefined(): void
6016  {
6017  $input = [
6018  'aTable' => [
6019  'columns' => [
6020  'foo' => [
6021  'config' => [
6022  'type' => 'input',
6023  'renderType' => 'inputDateTime',
6024  'max' => 42,
6025  ],
6026  ],
6027  ],
6028  ],
6029  ];
6030 
6031  $expected = [
6032  'aTable' => [
6033  'columns' => [
6034  'foo' => [
6035  'config' => [
6036  'type' => 'input',
6037  'renderType' => 'inputDateTime',
6038  ],
6039  ],
6040  ],
6041  ],
6042  ];
6043 
6044  $subject = new ‪TcaMigration();
6045  $this->assertEquals($expected, $subject->migrate($input));
6046  }
6047 
6052  {
6053  $input = [
6054  'aTable' => [
6055  'columns' => [
6056  'foo' => [
6057  'config' => [
6058  'type' => 'input',
6059  'max' => 42,
6060  ],
6061  ],
6062  ],
6063  ],
6064  ];
6065 
6066  $expected = [
6067  'aTable' => [
6068  'columns' => [
6069  'foo' => [
6070  'config' => [
6071  'type' => 'input',
6072  'max' => 42,
6073  ],
6074  ],
6075  ],
6076  ],
6077  ];
6078 
6079  $subject = new ‪TcaMigration();
6080  $this->assertEquals($expected, $subject->migrate($input));
6081  }
6082 
6087  {
6088  $input = [
6089  'aTable' => [
6090  'columns' => [
6091  'foo' => [
6092  'config' => [
6093  'type' => 'input',
6094  'renderType' => 'fooBar',
6095  'max' => 42,
6096  ],
6097  ],
6098  ],
6099  ],
6100  ];
6101 
6102  $expected = [
6103  'aTable' => [
6104  'columns' => [
6105  'foo' => [
6106  'config' => [
6107  'type' => 'input',
6108  'renderType' => 'fooBar',
6109  'max' => 42,
6110  ],
6111  ],
6112  ],
6113  ],
6114  ];
6115 
6116  $subject = new ‪TcaMigration();
6117  $this->assertEquals($expected, $subject->migrate($input));
6118  }
6119 
6123  public function ‪migrateForeignTypesOverride(): void
6124  {
6125  $input = [
6126  'aTable' => [
6127  'columns' => [
6128  'foo' => [
6129  'config' => [
6130  'type' => 'inline',
6131  'foreign_types' => [
6132  '0' => [
6133  'showitem' => 'bar'
6134  ],
6135  ],
6136  ],
6137  ],
6138  ],
6139  ],
6140  ];
6141  $expected = [
6142  'aTable' => [
6143  'columns' => [
6144  'foo' => [
6145  'config' => [
6146  'type' => 'inline',
6147  'overrideChildTca' => [
6148  'types' => [
6149  '0' => [
6150  'showitem' => 'bar'
6151  ],
6152  ],
6153  ],
6154  ],
6155  ],
6156  ],
6157  ],
6158  ];
6159  $subject = new ‪TcaMigration();
6160  $this->assertEquals($expected, $subject->migrate($input));
6161  }
6162 
6167  {
6168  $input = [
6169  'aTable' => [
6170  'columns' => [
6171  'foo' => [
6172  'config' => [
6173  'type' => 'inline',
6174  'foreign_types' => [
6175  '0' => [
6176  // This does NOT override existing 'showitem'='baz' below
6177  'showitem' => 'doesNotOverrideExistingSetting',
6178  // This is added to existing types 0 below
6179  'bitmask_value_field' => 42,
6180  ],
6181  'otherType' => [
6182  'showitem' => 'aField',
6183  ],
6184  ],
6185  'overrideChildTca' => [
6186  'types' => [
6187  '0' => [
6188  'showitem' => 'baz'
6189  ],
6190  ],
6191  ],
6192  ],
6193  ],
6194  ],
6195  ],
6196  ];
6197  $expected = [
6198  'aTable' => [
6199  'columns' => [
6200  'foo' => [
6201  'config' => [
6202  'type' => 'inline',
6203  'overrideChildTca' => [
6204  'types' => [
6205  '0' => [
6206  'showitem' => 'baz',
6207  'bitmask_value_field' => 42,
6208  ],
6209  'otherType' => [
6210  'showitem' => 'aField',
6211  ],
6212  ],
6213  ],
6214  ],
6215  ],
6216  ],
6217  ],
6218  ];
6219  $subject = new ‪TcaMigration();
6220  $this->assertEquals($expected, $subject->migrate($input));
6221  }
6222 
6226  public function ‪migrateForeignDefaultsOverride(): void
6227  {
6228  $input = [
6229  'aTable' => [
6230  'columns' => [
6231  'foo' => [
6232  'config' => [
6233  'type' => 'inline',
6234  'foreign_record_defaults' => [
6235  'aField' => 'doesNotOverrideExistingOverrideChildTcaDefault',
6236  'bField' => 'aDefault',
6237  ],
6238  'overrideChildTca' => [
6239  'columns' => [
6240  'aField' => [
6241  'config' => [
6242  'default' => 'aDefault'
6243  ],
6244  ],
6245  'cField' => [
6246  'config' => [
6247  'default' => 'aDefault'
6248  ],
6249  ],
6250  ],
6251  ],
6252  ],
6253  ],
6254  ],
6255  ],
6256  ];
6257  $expected = [
6258  'aTable' => [
6259  'columns' => [
6260  'foo' => [
6261  'config' => [
6262  'type' => 'inline',
6263  'overrideChildTca' => [
6264  'columns' => [
6265  'aField' => [
6266  'config' => [
6267  'default' => 'aDefault'
6268  ],
6269  ],
6270  'bField' => [
6271  'config' => [
6272  'default' => 'aDefault'
6273  ],
6274  ],
6275  'cField' => [
6276  'config' => [
6277  'default' => 'aDefault'
6278  ],
6279  ],
6280  ],
6281  ],
6282  ],
6283  ],
6284  ],
6285  ],
6286  ];
6287  $subject = new ‪TcaMigration();
6288  $this->assertEquals($expected, $subject->migrate($input));
6289  }
6290 
6294  public function ‪migrateForeignSelectorOverrides(): void
6295  {
6296  $input = [
6297  'aTable' => [
6298  'columns' => [
6299  'foo' => [
6300  'config' => [
6301  'type' => 'inline',
6302  'foreign_selector' => 'uid_local',
6303  'foreign_selector_fieldTcaOverride' => [
6304  'label' => 'aDifferentLabel',
6305  'config' => [
6306  'aGivenSetting' => 'overrideValue',
6307  'aNewSetting' => 'anotherNewValue',
6308  'anExistingSettingInOverrideChildTca' => 'doesNotOverrideExistingOverrideChildTcaDefault',
6309  'appearance' => [
6310  'elementBrowserType' => 'file',
6311  'elementBrowserAllowed' => 'jpg,png'
6312  ],
6313  ],
6314  ],
6315  'overrideChildTca' => [
6316  'columns' => [
6317  'uid_local' => [
6318  'config' => [
6319  'anExistingSettingInOverrideChildTca' => 'notOverridenByOldSetting',
6320  ],
6321  ],
6322  ],
6323  ],
6324  ],
6325  ],
6326  ],
6327  ],
6328  ];
6329  $expected = [
6330  'aTable' => [
6331  'columns' => [
6332  'foo' => [
6333  'config' => [
6334  'type' => 'inline',
6335  'foreign_selector' => 'uid_local',
6336  'overrideChildTca' => [
6337  'columns' => [
6338  'uid_local' => [
6339  'label' => 'aDifferentLabel',
6340  'config' => [
6341  'anExistingSettingInOverrideChildTca' => 'notOverridenByOldSetting',
6342  'aGivenSetting' => 'overrideValue',
6343  'aNewSetting' => 'anotherNewValue',
6344  'appearance' => [
6345  'elementBrowserType' => 'file',
6346  'elementBrowserAllowed' => 'jpg,png'
6347  ],
6348  ],
6349  ],
6350  ],
6351  ],
6352  ],
6353  ],
6354  ],
6355  ],
6356  ];
6357  $subject = new ‪TcaMigration();
6358  $this->assertEquals($expected, $subject->migrate($input));
6359  }
6360 
6365  {
6366  $input = [
6367  'aTable' => [
6368  'types' => [
6369  'textmedia' => [
6370  'columnsOverrides' => [
6371  'assets' => [
6372  'config' => [
6373  'type' => 'inline',
6374  'foreign_selector' => 'uid_local',
6375  'foreign_types' => [
6376  '0' => [
6377  'showitem' => 'bar'
6378  ],
6379  ],
6380  'foreign_selector_fieldTcaOverride' => [
6381  'label' => 'aDifferentLabel',
6382  'config' => [
6383  'aGivenSetting' => 'overrideValue',
6384  'aNewSetting' => 'anotherNewValue',
6385  'appearance' => [
6386  'elementBrowserType' => 'file',
6387  'elementBrowserAllowed' => 'jpg,png'
6388  ],
6389  ],
6390  ],
6391  'foreign_record_defaults' => [
6392  'aField' => 'overriddenValue',
6393  'bField' => 'overriddenValue',
6394  ],
6395  ],
6396  ],
6397  ],
6398  ],
6399  ],
6400  ],
6401  ];
6402  $expected = [
6403  'aTable' => [
6404  'types' => [
6405  'textmedia' => [
6406  'columnsOverrides' => [
6407  'assets' => [
6408  'config' => [
6409  'type' => 'inline',
6410  'foreign_selector' => 'uid_local',
6411  'overrideChildTca' => [
6412  'types' => [
6413  '0' => [
6414  'showitem' => 'bar'
6415  ],
6416  ],
6417  'columns' => [
6418  'uid_local' => [
6419  'label' => 'aDifferentLabel',
6420  'config' => [
6421  'aGivenSetting' => 'overrideValue',
6422  'aNewSetting' => 'anotherNewValue',
6423  'appearance' => [
6424  'elementBrowserType' => 'file',
6425  'elementBrowserAllowed' => 'jpg,png'
6426  ],
6427  ],
6428  ],
6429  'aField' => [
6430  'config' => [
6431  'default' => 'overriddenValue'
6432  ],
6433  ],
6434  'bField' => [
6435  'config' => [
6436  'default' => 'overriddenValue'
6437  ],
6438  ],
6439  ],
6440  ],
6441  ],
6442  ],
6443  ],
6444  ],
6445  ],
6446  ],
6447  ];
6448  $subject = new ‪TcaMigration();
6449  $this->assertEquals($expected, $subject->migrate($input));
6450  }
6451 
6456  {
6457  $input = [
6458  'aTable' => [
6459  'columns' => [
6460  'assets' => [
6461  'config' => [
6462  'type' => 'inline',
6463  'foreign_selector' => 'uid_local',
6464  'overrideChildTca' => [
6465  'types' => [
6466  '0' => [
6467  'showitem' => 'foo'
6468  ],
6469  ],
6470  'columns' => [
6471  'uid_local' => [
6472  'label' => 'Label',
6473  'config' => [
6474  'appearance' => [
6475  'elementBrowserType' => 'file',
6476  'elementBrowserAllowed' => 'jpg,png'
6477  ],
6478  ],
6479  ],
6480  ],
6481  ],
6482  ],
6483  ],
6484  ],
6485  'types' => [
6486  'textmedia' => [
6487  'columnsOverrides' => [
6488  'assets' => [
6489  'config' => [
6490  'foreign_types' => [
6491  '0' => [
6492  'showitem' => 'bar'
6493  ],
6494  ],
6495  'foreign_selector_fieldTcaOverride' => [
6496  'config' => [
6497  'appearance' => [
6498  'elementBrowserAllowed' => 'jpg,png'
6499  ],
6500  ],
6501  ],
6502  ],
6503  ],
6504  ],
6505  ],
6506  ],
6507  ],
6508  ];
6509  $expected = [
6510  'aTable' => [
6511  'columns' => [
6512  'assets' => [
6513  'config' => [
6514  'type' => 'inline',
6515  'foreign_selector' => 'uid_local',
6516  'overrideChildTca' => [
6517  'types' => [
6518  '0' => [
6519  'showitem' => 'foo'
6520  ],
6521  ],
6522  'columns' => [
6523  'uid_local' => [
6524  'label' => 'Label',
6525  'config' => [
6526  'appearance' => [
6527  'elementBrowserType' => 'file',
6528  'elementBrowserAllowed' => 'jpg,png'
6529  ],
6530  ],
6531  ],
6532  ],
6533  ],
6534  ],
6535  ],
6536  ],
6537  'types' => [
6538  'textmedia' => [
6539  'columnsOverrides' => [
6540  'assets' => [
6541  'config' => [
6542  'overrideChildTca' => [
6543  'types' => [
6544  '0' => [
6545  'showitem' => 'bar'
6546  ],
6547  ],
6548  'columns' => [
6549  'uid_local' => [
6550  'config' => [
6551  'appearance' => [
6552  'elementBrowserAllowed' => 'jpg,png'
6553  ],
6554  ],
6555  ],
6556  ],
6557  ],
6558  ],
6559  ],
6560  ],
6561  ],
6562  ],
6563  ],
6564  ];
6565  $subject = new ‪TcaMigration();
6566  $this->assertEquals($expected, $subject->migrate($input));
6567  }
6568 
6573  {
6574  $input = [
6575  'aTable' => [
6576  'columns' => [
6577  'foo' => [
6578  'config' => [
6579  'type' => 'group',
6580  'internal_type' => 'file',
6581  ],
6582  ],
6583  ],
6584  ],
6585  ];
6586  $subject = new ‪TcaMigration();
6587  $subject->migrate($input);
6588  $this->assertNotEmpty($subject->getMessages());
6589  }
6590 
6595  {
6596  $input = [
6597  'aTable' => [
6598  'columns' => [
6599  'foo' => [
6600  'config' => [
6601  'type' => 'group',
6602  'internal_type' => 'file_reference',
6603  ],
6604  ],
6605  ],
6606  ],
6607  ];
6608  $subject = new ‪TcaMigration();
6609  $subject->migrate($input);
6610  $this->assertNotEmpty($subject->getMessages());
6611  }
6612 
6617  {
6618  return [
6619  'filled columns' => [
6620  // tca
6621  [
6622  'aTable' => [
6623  'ctrl' => [
6624  'origUid' => 'aField',
6625  'languageField' => 'bField',
6626  'transOrigPointerField' => 'cField',
6627  'translationSource' => 'dField',
6628  ],
6629  'columns' => [
6630  'aField' => [
6631  'label' => 'aField',
6632  'config' => [
6633  'type' => 'none',
6634  ],
6635  ],
6636  'bField' => [
6637  'label' => 'bField',
6638  'config' => [
6639  'type' => 'none',
6640  ],
6641  ],
6642  'cField' => [
6643  'label' => 'cField',
6644  'config' => [
6645  'type' => 'none',
6646  ],
6647  ],
6648  'dField' => [
6649  'label' => 'dField',
6650  'config' => [
6651  'type' => 'none',
6652  ],
6653  ],
6654  ],
6655  ],
6656  ],
6657  // expectation
6658  [
6659  'aTable' => [
6660  'ctrl' => [
6661  'origUid' => 'aField',
6662  'languageField' => 'bField',
6663  'transOrigPointerField' => 'cField',
6664  'translationSource' => 'dField',
6665  ],
6666  'columns' => [
6667  'aField' => [
6668  'label' => 'aField',
6669  'config' => [
6670  'type' => 'none',
6671  ],
6672  ],
6673  'bField' => [
6674  'label' => 'bField',
6675  'config' => [
6676  'type' => 'none',
6677  ],
6678  ],
6679  'cField' => [
6680  'label' => 'cField',
6681  'config' => [
6682  'type' => 'none',
6683  ],
6684  ],
6685  'dField' => [
6686  'label' => 'dField',
6687  'config' => [
6688  'type' => 'none',
6689  ],
6690  ],
6691  ],
6692  ],
6693  ],
6694  ],
6695  'mixed columns' => [
6696  // tca
6697  [
6698  'aTable' => [
6699  'ctrl' => [
6700  'origUid' => 'aField',
6701  'languageField' => 'bField',
6702  'transOrigPointerField' => 'cField',
6703  'translationSource' => 'dField',
6704  ],
6705  'columns' => [
6706  'aField' => [
6707  'label' => 'aField',
6708  'config' => [
6709  'type' => 'none',
6710  ],
6711  ],
6712  'bField' => [
6713  'label' => 'bField',
6714  'config' => [
6715  'type' => 'none',
6716  ],
6717  ],
6718  ],
6719  ],
6720  ],
6721  // expectation
6722  [
6723  'aTable' => [
6724  'ctrl' => [
6725  'origUid' => 'aField',
6726  'languageField' => 'bField',
6727  'transOrigPointerField' => 'cField',
6728  'translationSource' => 'dField',
6729  ],
6730  'columns' => [
6731  'aField' => [
6732  'label' => 'aField',
6733  'config' => [
6734  'type' => 'none',
6735  ],
6736  ],
6737  'bField' => [
6738  'label' => 'bField',
6739  'config' => [
6740  'type' => 'none',
6741  ],
6742  ],
6743  'cField' => [
6744  'config' => [
6745  'type' => 'passthrough',
6746  'default' => 0,
6747  ],
6748  ],
6749  'dField' => [
6750  'config' => [
6751  'type' => 'passthrough',
6752  'default' => 0,
6753  ],
6754  ],
6755  ],
6756  ],
6757  ],
6758  ],
6759  'empty columns' => [
6760  // tca
6761  [
6762  'aTable' => [
6763  'ctrl' => [
6764  'origUid' => 'aField',
6765  'languageField' => 'bField',
6766  'transOrigPointerField' => 'cField',
6767  'translationSource' => 'dField',
6768  ],
6769  'columns' => [],
6770  ],
6771  ],
6772  // expectation
6773  [
6774  'aTable' => [
6775  'ctrl' => [
6776  'origUid' => 'aField',
6777  'languageField' => 'bField',
6778  'transOrigPointerField' => 'cField',
6779  'translationSource' => 'dField',
6780  ],
6781  'columns' => [
6782  'aField' => [
6783  'config' => [
6784  'type' => 'passthrough',
6785  'default' => 0,
6786  ],
6787  ],
6788  'bField' => [
6789  'config' => [
6790  'type' => 'passthrough',
6791  'default' => 0,
6792  ],
6793  ],
6794  'cField' => [
6795  'config' => [
6796  'type' => 'passthrough',
6797  'default' => 0,
6798  ],
6799  ],
6800  'dField' => [
6801  'config' => [
6802  'type' => 'passthrough',
6803  'default' => 0,
6804  ],
6805  ],
6806  ],
6807  ],
6808  ],
6809  ],
6810  ];
6811  }
6812 
6820  public function ‪ctrlIntegrityColumnsAreAvailable(array ‪$tca, array $expectation)
6821  {
6822  $subject = new ‪TcaMigration();
6823  self::assertSame($expectation, $subject->migrate(‪$tca));
6824  }
6825 }
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateForeignTypesMergedIntoExistingOverrideChildTca
‪migrateForeignTypesMergedIntoExistingOverrideChildTca()
Definition: TcaMigrationTest.php:6166
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateSelectSingleShowIconTable
‪migrateSelectSingleShowIconTable(array $input, array $expected)
Definition: TcaMigrationTest.php:5776
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateinputDateTimeMaxDefinedAndRenderTypeNotDateTime
‪migrateinputDateTimeMaxDefinedAndRenderTypeNotDateTime()
Definition: TcaMigrationTest.php:6086
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateSpecialConfigurationAndRemoveShowItemStylePointerConfigDoesNotAddMessageIfOnlySyntaxChanged
‪migrateSpecialConfigurationAndRemoveShowItemStylePointerConfigDoesNotAddMessageIfOnlySyntaxChanged()
Definition: TcaMigrationTest.php:469
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateForeignDefaultsOverride
‪migrateForeignDefaultsOverride()
Definition: TcaMigrationTest.php:6226
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateMovesTableWizardToRenderTypeDataProvider
‪array migrateMovesTableWizardToRenderTypeDataProvider()
Definition: TcaMigrationTest.php:4614
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateMovesEditWizardToFieldControl
‪migrateMovesEditWizardToFieldControl(array $input, array $expected)
Definition: TcaMigrationTest.php:4099
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateMovesTypeInputDateTimeToRenderType
‪migrateMovesTypeInputDateTimeToRenderType(array $input, array $expected)
Definition: TcaMigrationTest.php:2691
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateMovesTableWizardToRenderType
‪migrateMovesTableWizardToRenderType(array $input, array $expected)
Definition: TcaMigrationTest.php:4936
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateMovesLastDefaultExtrasValuesDataProvider
‪array migrateMovesLastDefaultExtrasValuesDataProvider()
Definition: TcaMigrationTest.php:4475
‪TYPO3\CMS\Core\Migrations\TcaMigration
Definition: TcaMigration.php:27
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\ctrlIntegrityColumnsAreAvailable
‪ctrlIntegrityColumnsAreAvailable(array $tca, array $expectation)
Definition: TcaMigrationTest.php:6820
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateIconsForFormFieldWizardToNewLocation
‪migrateIconsForFormFieldWizardToNewLocation()
Definition: TcaMigrationTest.php:523
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateMovesFullScreenRichtextWizardToFieldControl
‪migrateMovesFullScreenRichtextWizardToFieldControl(array $input, array $expected)
Definition: TcaMigrationTest.php:5150
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\missingTypeThrowsException
‪missingTypeThrowsException()
Definition: TcaMigrationTest.php:29
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migratePageLocalizationDefinitionsDataProvider
‪array migratePageLocalizationDefinitionsDataProvider()
Definition: TcaMigrationTest.php:2235
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateMovesRequestUpdateCtrlFieldToColumnsDataProvider
‪array migrateMovesRequestUpdateCtrlFieldToColumnsDataProvider()
Definition: TcaMigrationTest.php:2443
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateinputDateTimeMaxDefinedAndRenderTypeNotDefined
‪migrateinputDateTimeMaxDefinedAndRenderTypeNotDefined()
Definition: TcaMigrationTest.php:6051
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateLogsDeprecationWithGroupInternalTypeFile
‪migrateLogsDeprecationWithGroupInternalTypeFile()
Definition: TcaMigrationTest.php:6572
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateRewritesColorpickerWizard
‪migrateRewritesColorpickerWizard(array $input, array $expected)
Definition: TcaMigrationTest.php:3039
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateInlineLocalizationMode
‪migrateInlineLocalizationMode(array $givenConfig, array $expectedConfig)
Definition: TcaMigrationTest.php:2433
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateL10nModeDefinitions
‪migrateL10nModeDefinitions(array $givenConfig, array $expectedConfig)
Definition: TcaMigrationTest.php:2226
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateMovesWizardsWithEnableByTypeConfigToColumnsOverrides
‪migrateMovesWizardsWithEnableByTypeConfigToColumnsOverrides(array $input, array $expected)
Definition: TcaMigrationTest.php:2882
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateMovesFullScreenRichtextWizardToFieldControlDataProvider
‪array migrateMovesFullScreenRichtextWizardToFieldControlDataProvider()
Definition: TcaMigrationTest.php:4944
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest
Definition: TcaMigrationTest.php:25
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\ctrlIntegrityColumnsAreAvailableDataProvider
‪array ctrlIntegrityColumnsAreAvailableDataProvider()
Definition: TcaMigrationTest.php:6616
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateRemovesAnUnusedT3edtiorDefinitionIfEnabledByTypeConfig
‪migrateRemovesAnUnusedT3edtiorDefinitionIfEnabledByTypeConfig()
Definition: TcaMigrationTest.php:416
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateMovesLinkWizardToRenderTypeWithFieldControl
‪migrateMovesLinkWizardToRenderTypeWithFieldControl(array $input, array $expected)
Definition: TcaMigrationTest.php:3926
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateDropsStylePointerFromShowItem
‪migrateDropsStylePointerFromShowItem()
Definition: TcaMigrationTest.php:198
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateImageManipulationRatios
‪migrateImageManipulationRatios(array $input, array $expected)
Definition: TcaMigrationTest.php:5904
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateMovesRequestUpdateCtrlFieldToColumns
‪migrateMovesRequestUpdateCtrlFieldToColumns(array $input, array $expected)
Definition: TcaMigrationTest.php:2526
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateShowIfRTESettingDataProvider
‪array migrateShowIfRTESettingDataProvider()
Definition: TcaMigrationTest.php:1923
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateinputDateTimeMaxNotDefinedAndRenderTypeNotDefined
‪migrateinputDateTimeMaxNotDefinedAndRenderTypeNotDefined()
Definition: TcaMigrationTest.php:5912
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateMovesSliderWizardToSliderConfigurationDataProvider
‪array migrateMovesSliderWizardToSliderConfigurationDataProvider()
Definition: TcaMigrationTest.php:3467
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateTranslationTable
‪migrateTranslationTable(array $givenConfig, array $expectedConfig)
Definition: TcaMigrationTest.php:2152
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateTsTemplateSoftReferencesDataProvider
‪array migrateTsTemplateSoftReferencesDataProvider()
Definition: TcaMigrationTest.php:1824
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateChangesT3editorWizardToT3editorRenderTypeIfNotEnabledByTypeConfig
‪migrateChangesT3editorWizardToT3editorRenderTypeIfNotEnabledByTypeConfig()
Definition: TcaMigrationTest.php:144
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateinputDateTimeMaxNotDefined
‪migrateinputDateTimeMaxNotDefined()
Definition: TcaMigrationTest.php:5980
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateMovesAddWizardToFieldControlDataProvider
‪array migrateMovesAddWizardToFieldControlDataProvider()
Definition: TcaMigrationTest.php:4107
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateRemovesRteTransformOptions
‪migrateRemovesRteTransformOptions(array $givenConfig, array $expectedConfig)
Definition: TcaMigrationTest.php:1641
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateSetsShowIconTableIfMissingDataProvider
‪array migrateSetsShowIconTableIfMissingDataProvider()
Definition: TcaMigrationTest.php:938
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateRemovesRteTransformOptionsDataProvider
‪array migrateRemovesRteTransformOptionsDataProvider()
Definition: TcaMigrationTest.php:1123
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateMovesSelectWizardToValuePickerDataProvider
‪array migrateMovesSelectWizardToValuePickerDataProvider()
Definition: TcaMigrationTest.php:3047
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateMovesWizardsWithEnableByTypeConfigToColumnsOverridesDataProvider
‪array migrateMovesWizardsWithEnableByTypeConfigToColumnsOverridesDataProvider()
Definition: TcaMigrationTest.php:2699
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateTsTemplateSoftReferences
‪migrateTsTemplateSoftReferences(array $givenConfig, array $expectedConfig)
Definition: TcaMigrationTest.php:1914
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateKeepsGivenExtensionReference
‪migrateKeepsGivenExtensionReference()
Definition: TcaMigrationTest.php:728
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateRewritesColorpickerWizardDataProvider
‪array migrateRewritesColorpickerWizardDataProvider()
Definition: TcaMigrationTest.php:2890
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateMovesListWizardToFieldControl
‪migrateMovesListWizardToFieldControl(array $input, array $expected)
Definition: TcaMigrationTest.php:4467
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateWorkspaceSettingsDataProvider
‪array migrateWorkspaceSettingsDataProvider()
Definition: TcaMigrationTest.php:1994
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateMovesAddWizardToFieldControl
‪migrateMovesAddWizardToFieldControl(array $input, array $expected)
Definition: TcaMigrationTest.php:4285
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateSuggestWizard
‪migrateSuggestWizard(array $input, array $expected)
Definition: TcaMigrationTest.php:5417
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateSelectFieldRenderType
‪migrateSelectFieldRenderType()
Definition: TcaMigrationTest.php:751
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateSelectTreeOptionsDataProvider
‪array migrateSelectTreeOptionsDataProvider()
Definition: TcaMigrationTest.php:1650
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateForeignSelectorOverrides
‪migrateForeignSelectorOverrides()
Definition: TcaMigrationTest.php:6294
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateL10nModeDefinitionsDataProvider
‪array migrateL10nModeDefinitionsDataProvider()
Definition: TcaMigrationTest.php:2161
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migratePathWhichStartsWithIToEXTPath
‪migratePathWhichStartsWithIToEXTPath()
Definition: TcaMigrationTest.php:608
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateShowItemMovesAdditionalPaletteToOwnPaletteDefinition
‪migrateShowItemMovesAdditionalPaletteToOwnPaletteDefinition()
Definition: TcaMigrationTest.php:496
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateSuggestWizardDataProvider
‪array migrateSuggestWizardDataProvider()
Definition: TcaMigrationTest.php:5158
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateReturnsGivenArrayUnchangedIfNoMigrationNeeded
‪migrateReturnsGivenArrayUnchangedIfNoMigrationNeeded()
Definition: TcaMigrationTest.php:59
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateMovesSpecialConfigurationToColumnsOverridesDefaultExtrasAndMergesExistingDefaultExtras
‪migrateMovesSpecialConfigurationToColumnsOverridesDefaultExtrasAndMergesExistingDefaultExtras()
Definition: TcaMigrationTest.php:265
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateLogsDeprecationWithGroupInternalTypeFileReference
‪migrateLogsDeprecationWithGroupInternalTypeFileReference()
Definition: TcaMigrationTest.php:6594
‪TYPO3\CMS\Core\Tests\Unit\Migrations
Definition: TcaMigrationTest.php:3
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateImageManipulationRatiosDataProvider
‪array migrateImageManipulationRatiosDataProvider()
Definition: TcaMigrationTest.php:5784
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateMovesLinkWizardToRenderTypeWithFieldControlDataProvider
‪array migrateMovesLinkWizardToRenderTypeWithFieldControlDataProvider()
Definition: TcaMigrationTest.php:3660
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateMovesSpecialConfigurationToColumnsOverridesDefaultExtras
‪migrateMovesSpecialConfigurationToColumnsOverridesDefaultExtras()
Definition: TcaMigrationTest.php:231
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateInlineLocalizationModeDataProvider
‪array migrateInlineLocalizationModeDataProvider()
Definition: TcaMigrationTest.php:2330
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateAddsMissingColumnsConfig
‪migrateAddsMissingColumnsConfig()
Definition: TcaMigrationTest.php:89
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migratePageLocalizationDefinitions
‪migratePageLocalizationDefinitions(array $givenConfig, array $expectedConfig)
Definition: TcaMigrationTest.php:2321
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateinputDateTimeMaxNotDefinedAndRenderTypeNotInputDateTime
‪migrateinputDateTimeMaxNotDefinedAndRenderTypeNotInputDateTime()
Definition: TcaMigrationTest.php:5945
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateMovesSelectWizardToValuePicker
‪migrateMovesSelectWizardToValuePicker(array $input, array $expected)
Definition: TcaMigrationTest.php:3459
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateSetsShowIconTableIfMissing
‪migrateSetsShowIconTableIfMissing(array $givenConfig, array $expectedConfig)
Definition: TcaMigrationTest.php:1053
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateShowIfRTESetting
‪migrateShowIfRTESetting(array $givenConfig, array $expectedConfig)
Definition: TcaMigrationTest.php:1985
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateExtAndSysextPathToEXTPath
‪migrateExtAndSysextPathToEXTPath()
Definition: TcaMigrationTest.php:566
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateMovesEditWizardToFieldControlDataProvider
‪array migrateMovesEditWizardToFieldControlDataProvider()
Definition: TcaMigrationTest.php:3934
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateForeignTypesOverride
‪migrateForeignTypesOverride()
Definition: TcaMigrationTest.php:6123
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateMovesSliderWizardToSliderConfiguration
‪migrateMovesSliderWizardToSliderConfiguration(array $input, array $expected)
Definition: TcaMigrationTest.php:3652
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migratePartlyOverridesFromColumnOverride
‪migratePartlyOverridesFromColumnOverride()
Definition: TcaMigrationTest.php:6455
‪$tca
‪$tca
Definition: sys_file_metadata.php:4
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateOptionsOfTypeGroup
‪migrateOptionsOfTypeGroup(array $input, array $expected)
Definition: TcaMigrationTest.php:5697
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateTranslationTableDataProvider
‪array migrateTranslationTableDataProvider()
Definition: TcaMigrationTest.php:2112
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateRewritesRelativeIconPathToExtensionReference
‪migrateRewritesRelativeIconPathToExtensionReference()
Definition: TcaMigrationTest.php:682
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateOptionsOfTypeGroupDataProvider
‪array migrateOptionsOfTypeGroupDataProvider()
Definition: TcaMigrationTest.php:5425
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateinputDateTimeMaxDefined
‪migrateinputDateTimeMaxDefined()
Definition: TcaMigrationTest.php:6015
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateAllOverridesFromColumnOverride
‪migrateAllOverridesFromColumnOverride()
Definition: TcaMigrationTest.php:6364
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateRewritesIconFilenameOnlyToDefaultT3skinExtensionReference
‪migrateRewritesIconFilenameOnlyToDefaultT3skinExtensionReference()
Definition: TcaMigrationTest.php:705
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateSelectTreeOptions
‪migrateSelectTreeOptions(array $input, array $expected)
Definition: TcaMigrationTest.php:1815
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateRemovesIconsInOptionTags
‪migrateRemovesIconsInOptionTags()
Definition: TcaMigrationTest.php:648
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateMovesLastDefaultExtrasValues
‪migrateMovesLastDefaultExtrasValues(array $input, array $expected)
Definition: TcaMigrationTest.php:4606
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateMovesTypeInputDateTimeToRenderTypeDataProvider
‪array migrateMovesTypeInputDateTimeToRenderTypeDataProvider()
Definition: TcaMigrationTest.php:2534
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateChangesT3editorWizardThatIsEnabledByTypeConfigToRenderTypeInColumnsOverrides
‪migrateChangesT3editorWizardThatIsEnabledByTypeConfigToRenderTypeInColumnsOverrides()
Definition: TcaMigrationTest.php:316
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateMovesListWizardToFieldControlDataProvider
‪array migrateMovesListWizardToFieldControlDataProvider()
Definition: TcaMigrationTest.php:4293
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateSelectSingleShowIconTableDataProvider
‪array migrateSelectSingleShowIconTableDataProvider()
Definition: TcaMigrationTest.php:5705
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateWorkspaceSettings
‪migrateWorkspaceSettings(array $givenConfig, array $expectedConfig)
Definition: TcaMigrationTest.php:2103
‪TYPO3\CMS\Core\Tests\Unit\Migrations\TcaMigrationTest\migrateFixesReferenceToLinkHandler
‪migrateFixesReferenceToLinkHandler()
Definition: TcaMigrationTest.php:1074