Review main Merged

84073[TASK] Ensure coding-style for nullable type declarations

Stefan Bürk CR +2 V +2 Easy +4 −0 updated 07/02/24, 18:32

Commit message

This change modifies the `php-cs-fixer` ruleset and
activate two rules related to nullable types.

Following options are added:

  'nullable_type_declaration' => [
    'syntax' => 'question_mark',
  ],
  'nullable_type_declaration_for_default_null_value' => true,

`nullable_type_declaration` ensures to use `?<type>` declaration
instead of union type `<type>|null` as a convention for properties,
method and return types. For already union types the nullable is
added as additional null union type `ObjectOne|ObjectInterface|null`.

`nullable_type_declaration_for_default_null_value` ensures
to use nullable type declarations to mitigate implicitly
nullable method arguments [1] which has been already fixed
with a series of dedicated changes.

Used command(s):

  Build/Scripts/runTests.sh -s cgl

[1] https://php.watch/versions/8.4/implicitly-marking-parameter-type-nullable-deprecated

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
    • Garvin Hicking +1
    • Christian Kuhn +1
  • Verified V +2 Done
    • Stefan Bürk +2
    • Garvin Hicking +1
    • Christian Kuhn +1
    • core-ci +1 CI

Issues 1

Files 1

Review log 1117

  1. Stefan Bürk uploaded patch set 1 04/27/24, 22:17

  2. Stefan Bürk updated the commit message in patch set 2 04/27/24, 22:21

  3. core-ci voted on patch set 1 V -1 04/27/24, 22:26 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56865

  4. core-ci voted on patch set 2 V -1 04/27/24, 22:29 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56866

  5. Stefan Bürk uploaded patch set 3 V -1 04/27/24, 22:33

  6. Stefan Bürk marked it work in progress 04/27/24, 22:39

  7. core-ci voted on patch set 3 V -1 04/27/24, 22:40 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56867

  8. Stefan Bürk updated the commit message in patch set 4 V -1 04/27/24, 22:40

  9. core-ci voted on patch set 4 V -1 04/27/24, 22:47 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56868

  10. Stefan Bürk uploaded patch set 5 V -1 05/28/24, 15:28

  11. core-ci voted on patch set 5 V +1 05/28/24, 15:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/58410

  12. Stefan Bürk uploaded patch set 6 V +1 07/02/24, 18:16

  13. Garvin Hicking voted on patch set 6 CR +1 V +1 07/02/24, 18:20

  14. Christian Kuhn voted on patch set 6 CR +1 V +1 07/02/24, 18:22

  15. core-ci voted on patch set 6 V +1 07/02/24, 18:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/60864

  16. Stefan Bürk voted on patch set 6 CR +2 V +2 07/02/24, 18:31

  17. Stefan Bürk merged patch set 7 07/02/24, 18:32