Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.0 #171

Merged
merged 133 commits into from
Aug 23, 2021
Merged

2.0 #171

merged 133 commits into from
Aug 23, 2021

Conversation

zbateson
Copy link
Owner

@zbateson zbateson commented Jun 4, 2021

Changes:

  • Use pimple/pimple for di, refactor initialization:

    • Reconfigure the dependency container entirely, call MailMimePaser::setDependencyContainer
    • Add providers, call MailMimeParser::configureDependencyContainer with an
      array of providers
  • Parser improvements:

    • modular parsing separated into classes for better extensibility
    • dynamic/proxied parsing based on user requests (looking at message headers
      won't parse all content/children and is therefore very very fast even on
      larger messages)
    • stream is no longer copied first, but must be closed after the
      message object is destroyed (or can be attached to the message)
  • Define and use interfaces instead of concrete classes for better
    extensibility, change of internal hierarchy that didn't make sense

    • IMessagePart instead of MessagePart, IMimePart instead of MimePart,
      IUUEncodedPart instead of UUEncodedPart, IMultiPart is new, IMessage instead
      of Message. HeaderPart and ParentHeaderPart no longer exist.
  • Remove deprecated resource handle methods:

    • Removes IMessage::getTextResourceHandle,
      IMessage::getHtmlResourceHandle
    • Removes IMessagePart::getContentResourceHandle
  • Filtering parts is now done with simple callbacks. PartFilter is now just a
    convenience class with static methods that provides filtering callbacks
    instead of a concrete class used for filtering.

  • Other minor changes of note:

    • MimePart::getContentDisposition for a MimePart is now limited to returning
      'inline' or 'attachment' even if the header has a different value.
    • IMultiPart::removeAllParts now returns the number of parts removed.

Defaults to 'attaching' the stream, so fclose is called
automatically, and requires the passed stream to stay open while
Message is used.
Refactor PartStreamFilterManager into PartStreamContainer which
keeps a part's streams and handles content stream conversions
Use static configuration so user classes can be instantiated more
easily.
Parser message part factories use a specialized PartStreamContainer
to keep the original message stream.  Don't need separate
MessageParts for parsed messages.
- Removes IMessage::getTextResourceHandle,
IMessage::getHtmlResourceHandle
- Removes IMessagePart::getContentResourceHandle
@zbateson zbateson marked this pull request as ready for review August 23, 2021 01:54
@zbateson zbateson merged commit da7b591 into master Aug 23, 2021
@zbateson zbateson deleted the 2.0 branch August 23, 2021 02:39
@zbateson zbateson restored the 2.0 branch April 23, 2024 19:00
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.

None yet

2 participants