Problem/Motivation

The PHPDoc type hint in BaseEmailInterface::attach() method is incorrectly formatted as Drupal\symfony_mailer\AttachmentInterface instead of the proper fully qualified class name format \Drupal\symfony_mailer\AttachmentInterface.

This missing leading backslash can cause issues with IDE autocompletion, static analysis tools, and code documentation generators that expect proper namespace formatting.

Steps to reproduce

Notice the type hint @param Drupal\symfony_mailer\AttachmentInterface $attachment is missing the leading backslash.

Proposed resolution

Add the missing leading backslash to the PHPDoc type hint to make it a proper fully qualified class name: @param \Drupal\symfony_mailer\AttachmentInterface $attachment.

Remaining tasks

  • Create patch to fix the PHPDoc type hint
  • Review and test the patch
  • Commit the fix

User interface changes

None.

API changes

None.

Data model changes

None.

CommentFileSizeAuthor
#2 3537600-01.patch527 byteswengerk

Comments

wengerk created an issue. See original summary.

wengerk’s picture

StatusFileSize
new527 bytes

Here is the patch

adamps’s picture

Version: 1.6.2 » 2.x-dev
Status: Needs review » Needs work

All patches go into 2.x please, which is the default branch.

  • adamps committed 6ab96474 on 2.x
    [#3537600] Fix namespace formatting in PHPDoc
adamps’s picture

Status: Needs work » Fixed

Hardly worth creating a MR so I just committed it

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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