Review main Merged

64246[BUGFIX] Migrate mail SMTP encrypt option for symfony/mailer compatibility

Benjamin Franzke CR +2 V +2 Normal +66 −2 updated 04/28/20, 06:07

Commit message

SMTP encrypt options were quite a hassle with swiftmailer:
'tls' was used as identifier to start a STARTTLS connection via SMTP
(instead of using SMTPS), while strings like ssl/tlsv1.0/tlsv1.1/tlsv1.2
instructed to use a SSL/TLS connection via SMTPS (without STARTTLS).

symfony/mailer does no longer allow to specify the STARTTLS usage,
as it will use it by default (if the server provides support for it).

Therefore, we now adapt the SMTP encryption configuration setting
via a silent configuration upgrade to avoid that the previous
STARTTLS 'tls' is casted to true while symfony/mailer expects false/null.

While at it, we also fix an incorrect migration for the transport type
'mail'. This wizard didn't work because of a wrong typecast (which has
probably been a copy & paste mistake).

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Josef Glatz +1
    • Björn Jacob +1
    • Markus Klein +1
  • Verified V +2 Done
    • Benni Mack +2
    • Josef Glatz +1
    • TYPO3com +1 CI

Issues 2

Files 3

Review log 2733

Show 68 earlier messages
  1. Benjamin Franzke uploaded patch set 1 04/19/20, 12:06

  2. TYPO3com voted on patch set 1 V +1 04/19/20, 12:17 Completed build in 11m 19s on Sun, 19 Apr, 12:17 PM Test Summary: 73627 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-2842

  3. Josef Glatz commented on patch set 1 V -1 04/20/20, 05:30

    Do I understand it right? There is no Important-rST yet where do we indicate that the settings for MAIL / * have changed for at least 10.4 LTS? I found no occurrences for `transport_smtp_encrypt` so far within ext:core/Documentation/. We definitely must add a rST for that change and maybe also a migration check. The responsible change is https://review.typo3.org/c/Packages/TYPO3.CMS/+/63146
  4. Josef Glatz commented on patch set 1 04/20/20, 05:31

    What about adding #90295 as related issue?
  5. Josef Glatz uploaded patch set 2 04/20/20, 06:14

  6. Josef Glatz commented on patch set 2 V -1 CR -1 04/20/20, 06:15

    rST still needs "real" content

    Reply

    Done
  7. Josef Glatz commented on patch set 2 04/20/20, 06:30

    Important-91070-SMTPTransportOptionTransport_smtp_encryptWasChangedToBooleanValueType.rst:4

    I think the common approach is probably not IMPORTANT, but DEPRECATION?
  8. TYPO3com voted on patch set 2 V +1 04/20/20, 06:43 Completed build in 26m 51s on Mon, 20 Apr, 06:43 AM Test Summary: 73627 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-2867

  1. Josef Glatz commented on patch set 2 04/20/20, 13:22

    Important-91070-SMTPTransportOptionTransport_smtp_encryptWasChangedToBooleanValueType.rst:4 Reply

    > I think the common approach is probably not IMPORTANT, but DEPRECATION? discussed with benni: important is right
  2. Josef Glatz commented on patch set 2 04/20/20, 14:35

    I'll provide an rST at about 19 o'clock if nobody else is faster ;-) (I'm cycling for a short time)
  3. Markus Klein commented on patch set 2 04/20/20, 17:19

    Unresolved

    irregular verb: cast - cast - cast (to my knowledge)
  4. Markus Klein commented on patch set 2 04/20/20, 17:21

    SilentConfigurationUpgradeService.php:1128 Unresolved

    or... what? is there something missing or are the brace superfluous?
  5. Josef Glatz commented on patch set 2 04/20/20, 19:30

    should that be singular
  6. Josef Glatz uploaded patch set 3 04/20/20, 20:15

  7. TYPO3com voted on patch set 3 V +1 04/20/20, 20:27 Completed build in 11m 56s on Mon, 20 Apr, 08:27 PM Test Summary: 73657 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-2927

  8. Josef Glatz commented on patch set 3 04/20/20, 20:33

    Beside the mentioned notes from Markus is the rST ready for review (please see it as a start point).

    Reply

    Done

    Important-91070-SMTPTransportOptionTransport_smtp_encryptWasChangedToBooleanValueType.rst:4 Reply

    Done
  9. Josef Glatz voted on patch set 3 V +1 CR +1 04/21/20, 07:02

  10. Benjamin Franzke uploaded patch set 4 04/22/20, 07:29

  11. Josef Glatz commented on patch set 4 04/22/20, 07:35

    Important-91070-SMTPTransportOptionTransport_smtp_encryptChangedToBoolean.rst:4

    > changed to boolean better? (reflects also the new filename)
  12. Josef Glatz commented on patch set 5 04/22/20, 07:35

    Published edit on patch set 4.
  13. Josef Glatz commented on patch set 5 V +1 CR +1 04/22/20, 07:35

    Important-91070-SMTPTransportOptionTransport_smtp_encryptChangedToBoolean.rst:4 Reply

    Done
  14. TYPO3com voted on patch set 4 V -1 04/22/20, 08:38 Completed build in 1h 05m 26s on Wed, 22 Apr, 08:38 AM Test Summary: 1 of 74017 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-2971

  15. TYPO3com voted on patch set 5 V +1 04/22/20, 08:53 Completed build in 1h 15m 19s on Wed, 22 Apr, 08:52 AM Test Summary: 73657 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-2972

  16. Björn Jacob commented on patch set 5 CR -1 04/22/20, 11:56

    Josef asked me to read the docs. Here we go :)
    "were"
    "Therefore, "
    "... while..."
    "been a copy"

    Important-91070-SMTPTransportOptionTransport_smtp_encryptChangedToBoolean.rst:16

    "symfony/mailer" -> we've spellt it this way in the commit msg.

    Important-91070-SMTPTransportOptionTransport_smtp_encryptChangedToBoolean.rst:17

    "will be used by default"

    Important-91070-SMTPTransportOptionTransport_smtp_encryptChangedToBoolean.rst:19

    "Therefore, "

    Important-91070-SMTPTransportOptionTransport_smtp_encryptChangedToBoolean.rst:19

    IMHO the word "value" can be removed. Better to read without it and still correct.

    Important-91070-SMTPTransportOptionTransport_smtp_encryptChangedToBoolean.rst:21

    "install tool's"

    Important-91070-SMTPTransportOptionTransport_smtp_encryptChangedToBoolean.rst:23

    "symfony/mailer"? See discussion above.
  17. Benjamin Franzke uploaded patch set 6 04/27/20, 06:17

  18. Benjamin Franzke commented on patch set 6 04/27/20, 06:19

    Thanks Björn for proofreading. I've pushed an update.

    Reply

    Done

    Reply

    Done

    Reply

    Done

    Reply

    Done

    Important-91070-SMTPTransportOptionTransport_smtp_encryptChangedToBoolean.rst:16 Reply

    I agree, I also prefer to simply use the composer name.

    Important-91070-SMTPTransportOptionTransport_smtp_encryptChangedToBoolean.rst:17 Reply

    Ack

    Important-91070-SMTPTransportOptionTransport_smtp_encryptChangedToBoolean.rst:19 Reply

    Ack, I've actually removed both, "value" and "of".

    Important-91070-SMTPTransportOptionTransport_smtp_encryptChangedToBoolean.rst:19 Reply

    Done

    Important-91070-SMTPTransportOptionTransport_smtp_encryptChangedToBoolean.rst:21 Reply

    Ack

    Important-91070-SMTPTransportOptionTransport_smtp_encryptChangedToBoolean.rst:23 Reply

    Done
  19. TYPO3com voted on patch set 6 V +1 04/27/20, 06:30 Completed build in 12m 52s on Mon, 27 Apr, 06:30 AM Test Summary: 73657 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3039

  20. Josef Glatz voted on patch set 6 V +1 CR +1 04/27/20, 06:41

  21. Björn Jacob voted on patch set 6 CR +1 04/27/20, 07:29

  22. Markus Klein voted on patch set 6 CR +1 04/28/20, 06:01

  23. Benni Mack commented on patch set 6 04/28/20, 06:07

    Next time, let's add tests to the SilentUpgradeWizard (not urgent, as this works)
  24. Benni Mack voted on patch set 6 V +2 CR +2 04/28/20, 06:07

  25. Benni Mack merged patch set 7 04/28/20, 06:07