Actions
Task #97559
openAttributes: Use constructor parameter per property instead of an array
Start date:
2022-05-05
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
12
PHP Version:
8.0
Tags:
Complexity:
Sprint Focus:
Description
I saw that with v12 attribute support.
Unfortunately, i find it counterproductive that arrays are used for the parameters here. This breaks type safety, breaks code completion, and can easily lead to overlooked typos.
constructor parameters for each parameter would also make it easier to show the programmers which parameters are required.
PHP 8 offers named parameters, so the argument that you don't have to fill in all parameters with the array, wouldn't count.
Files
Actions