Closed (fixed)
Project:
CSV Serialization
Version:
4.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
31 May 2024 at 19:48 UTC
Updated:
11 Jul 2024 at 15:14 UTC
Jump to comment: Most recent
Use constructor property promotion (https://www.php.net/manual/en/language.oop5.decon.php#language.oop5.deco...). This feature was added in PHP 8.0, meaning all sites with Drupal Core ^10 support it.
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
david.muffley commentedComment #4
markdorisonThis looks like a good change to me. I am also curious if we could take this opportunity to add explicit argument types to the constructor arguments. I will make that change and push it up.
The PHPStan failure is related to an upstream deprecation. I have created #3455761: Replace deprecated usage of League\Csv\ByteSequence::BOF_UTF8 to address that.
Comment #5
david.muffley commentedMerged in the change from #3455761 (#4) and the pipeline passes now without failure. Back to you now.
I didn't add the argument types out of an abundance of caution, but you're much more familiar with the module that I am.
Comment #6
markdorisonShould be safe to add at PHP 7.4 and above! We should be good to add types throughout the module as we improve the code.
Comment #8
markdorison