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

[Mime] Add PGP feature #50222

Open
wants to merge 5 commits into
base: 7.2
Choose a base branch
from
Open

[Mime] Add PGP feature #50222

wants to merge 5 commits into from

Conversation

the-pulli
Copy link

As discussed in #50160 here is the corresponding PR.

@carsonbot carsonbot added this to the 6.3 milestone May 3, 2023
@carsonbot
Copy link

Hey!

I see that this is your first PR. That is great! Welcome!

Symfony has a contribution guide which I suggest you to read.

In short:

  • Always add tests
  • Keep backward compatibility (see https://symfony.com/bc).
  • Bug fixes must be submitted against the lowest maintained branch where they apply (see https://symfony.com/releases)
  • Features and deprecations must be submitted against the 6.3 branch.

Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change.

When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor!
If this PR is merged in a lower version branch, it will be merged up to all maintained branches within a few days.

I am going to sit back now and wait for the reviews.

Cheers!

Carsonbot

@OskarStark OskarStark added the Mime label May 3, 2023
@carsonbot carsonbot changed the title Add PGP feature to MIME component [Mime] Add PGP feature to MIME component May 3, 2023
@OskarStark OskarStark changed the title [Mime] Add PGP feature to MIME component Add PGP feature May 3, 2023
@OskarStark OskarStark changed the title Add PGP feature [Mime] Add PGP feature May 3, 2023
composer.json Outdated
@@ -40,6 +40,7 @@
"doctrine/event-manager": "^1.2|^2",
"doctrine/persistence": "^2|^3",
"twig/twig": "^2.13|^3.0.4",
"pear/crypt_gpg": "^1.6",
Copy link
Member

Choose a reason for hiding this comment

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

Adding that as a required dependency is a no-go to me. This must stay an optional feature.

Copy link
Author

Choose a reason for hiding this comment

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

Okay, thought so too. But without it the unit test breaks. Is there another solution to make them work?

Copy link
Member

Choose a reason for hiding this comment

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

that's what dev requirements are for.

@nicolas-grekas nicolas-grekas modified the milestones: 6.3, 6.4 May 23, 2023
Copy link
Member

@GromNaN GromNaN left a comment

Choose a reason for hiding this comment

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

This is a great new feature. IMO it should be a new component: symfony/mime is independent of these new classes and it would make it easier to resolve dependencies with pear/crypt_gpg.

@@ -17,6 +17,7 @@
],
"require": {
"php": ">=8.1",
"pear/crypt_gpg": "^1.6",
Copy link
Member

Choose a reason for hiding this comment

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

This needs to be moved to require-dev as said in previous comment.

Copy link
Author

Choose a reason for hiding this comment

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

Haven't I moved it to require-dev in d5b9214?
I'm glad you like the idea of that feature. A new component would be essential a standalone package under a certain namespace?

Copy link
Member

Choose a reason for hiding this comment

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

Haven't I moved it to require-dev in d5b9214?

The commit sorts packages alphabetically, but does not move the package to require-dev.

Copy link
Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

d5b9214 fixes the composer.json in the root dir, this is src/Symfony/Component/Mime/composer.json.

Copy link
Author

Choose a reason for hiding this comment

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

I see. If it should't live in symfony/mime then it should be entirely removed from there and instead moved into a new component (for example symfony/pgp) where the dependency is handled?

Copy link
Author

Choose a reason for hiding this comment

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

Hey,

the last months I tested my implementation in a Symfony app and discovered several flaws. For example it doesn't work with templated emails and sending via mail provider via api is also not possible due to the nature of a PGP structured mail.
I still would like to see that feature in Symfony and I'll work on that in the upcoming weeks.

@OskarStark OskarStark modified the milestones: 6.4, 7.1 Nov 4, 2023
@wouterj wouterj linked an issue Nov 4, 2023 that may be closed by this pull request
@xabbuh xabbuh added the Feature label May 15, 2024
@xabbuh xabbuh modified the milestones: 7.1, 7.2 May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PGPEncrypter for Symfony Mailer
8 participants