Skip to content

EmailAddress should implement Stringable interface - #115

Merged
frederikbosch merged 2 commits into
genkgo:masterfrom
k00ni:patch-1
May 5, 2026
Merged

frederikbosch merged 2 commits into
genkgo:masterfrom
k00ni:patch-1

Conversation

@k00ni

@k00ni k00ni commented Apr 29, 2026 •

Copy link
Copy Markdown
Contributor

It would ease the usage of EmailAddress even more, especially because there is already a __toString method implemented.

What do you think?

@k00ni

k00ni commented Apr 29, 2026 •

Copy link
Copy Markdown
Contributor Author

Failed "code check" workflow doesn't seem to be related to my changes:

Run ./vendor/bin/phpstan analyse -l max src
  ./vendor/bin/phpstan analyse -l max src
   0/262 [░░░░░░░░░░░░░░░░░░░░░░░░░░░░]   0%
 262/262 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

Error: Parameter #2 $array of function implode expects array<string>, array<int, mixed> given.
Error: No error to ignore is reported on line 41.
 ------ ----------------------------------------------------------------------- 
  Line   Protocol/Imap/Request/SequenceSet.php                                  
 ------ ----------------------------------------------------------------------- 
  58     Parameter #2 $array of function implode expects array<string>, array<  
         int, mixed> given.                                                     
         🪪  argument.type                                                      
 ------ ----------------------------------------------------------------------- 

 ------ -------------------------------------------------- 
  Line   Protocol/Imap/TagFactory/GeneratorTagFactory.php  
 ------ -------------------------------------------------- 
  41     No error to ignore is reported on line 41.        
         🪪  ignore.unmatchedLine (non-ignorable)          
 ------ -------------------------------------------------- 

Comment thread src/EmailAddress.php Outdated
declare(strict_types=1);

namespace Genkgo\Mail;
use Stringable;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this library is not importing classes from the global namespace

@k00ni k00ni May 1, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this library is not importing classes from the global namespace

I am not sure, do you mean using \Stringable instead?

@frederikbosch

Copy link
Copy Markdown
Contributor

If you fix my comment, then I will fix the new PHPStan notifications.

@frederikbosch
frederikbosch merged commit e8cba60 into genkgo:master May 5, 2026
0 of 5 checks passed
@frederikbosch

frederikbosch commented May 5, 2026 •

Copy link
Copy Markdown
Contributor

Thanks, phpstan errors fixed and released 2.13.0.

@k00ni
k00ni deleted the patch-1 branch May 5, 2026 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants