Problem/Motivation

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.

Command icon Show commands

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

david.muffley created an issue. See original summary.

david.muffley’s picture

Assigned: david.muffley » Unassigned
Status: Active » Needs review

markdorison’s picture

This 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.

david.muffley’s picture

Merged 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.

markdorison’s picture

Status: Needs review » Reviewed & tested by the community

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.

Should 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.

markdorison’s picture

Status: Reviewed & tested by the community » Fixed
//www.flaticon.com/free-icons/thank-you Thank you for your contribution! Your continued support of this project makes other volunteer contributions more sustainable.
There are multiple ways to show appreciation for the work contributed to this project including:
  • Triaging issues and adding more context to existing issues.
  • Writing documentation or patches for this project.
  • Writing blog posts or speaking about it at conferences.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.