Skip to content

Conversation

@hakito
Copy link
Contributor

@hakito hakito commented Oct 10, 2024

@effgarces Please note that the original PR #426 as well as this was just an incomplete draft. Also #425 in not yet finished in this PR. I just spent a lot of work for this refactoring, so I wanted to share it. But currently I have not time to complete the work.

So here is the rest of the description of the original PR #426:

When I was working on a feature it was quite difficult to implement it because of the current architecture of the email system. This PR holds the current state of my approach, but as it was too risky to break something else I stopped working on it. Maybe it's something for Version 3.0?

The EmailMessage is the base class for all message types and implements an interface. Some of the derived classes have a GetTemplateName method, some don't.

I thought the reason for the architecture is because of a manipulation of the EmailMessage object after it's creation. But it seems that is not the case. All code paths I found create the message and send it to phpmailer without additional modification.

I tried to replace it with a more straighforward builder pattern.

So far I replaced the first view classes with the builder pattern approach. When I came accross GuestAddedEmail wich derives from ReservationEmailMessage things got more complicated. I think this could still be resolved when using a mixture of the builder pattern and the derived class pattern here.

Todos:

@github-actions
Copy link

This Pull Request (PR) was marked stale because it has been open 90 days with no activity. Please remove the stale label or comment on this PR. Otherwise, it will be closed in 15 days.

@github-actions github-actions bot added the stale No activity label May 11, 2025
@github-actions
Copy link

This PR was closed because it has been marked stale for 15 days with no activity. If this PR is still valid, please re-open.

@github-actions github-actions bot closed this May 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale No activity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Forgot Password changes the language

1 participant