Make WordPress Core

#64101 closed enhancement (fixed)

Update to PHPMailer 7.0.0

Reported by: SirLouen Owned by: SergeyBiryukov
Priority: normal Milestone: 6.9
Component: External Libraries Version:
Severity: trivial Keywords: has-patch commit dev-reviewed
Cc: Focuses:

Description (last modified by SirLouen)

This update is only bureaucratic. There was a SemVer mistake with versioning, so basically the current version we are shipping only needs a bump in numbering to be compliant.

I attach below the minuscule patch.

More info about the update
​https://github.com/PHPMailer/PHPMailer/releases/tag/v7.0.0

Change History (14)

This ticket was mentioned in ​PR #10287 on ​WordPress/wordpress-develop by ​@SirLouen.


13 months ago
#1

  • Keywords has-patch added

#2 @SirLouen
13 months ago

  • Description modified (diff)
  • Keywords commit added

​@mukesh27 commented on ​PR #10287:


13 months ago
#3

The v6.12.0 version have some file changes ​https://github.com/PHPMailer/PHPMailer/compare/v6.12.0...v7.0.0 why 7.0 didn't have any 🤔

​@SirLouen commented on ​PR #10287:


13 months ago
#4

It was a semver update mistake, better explained in Trac ticket

​@mukesh27 commented on ​PR #10287:


13 months ago
#5

Thanks! Approved ✅

#6 @wildworks
13 months ago

  • Milestone 6.9 → 7.0

Since the 6.9 Beta1 release is coming soon, let's punt this ticket to 7.0. If you can commit before Beta1, feel free to change the milestone back to 6.9.

#7 @SergeyBiryukov
12 months ago

  • Owner set to SergeyBiryukov
  • Resolution → fixed
  • Status new → closed

In 61249:

External Libraries: Upgrade PHPMailer to version 7.0.0.

This is exactly the same as version 6.11.1 but bumps the major version number to indicate the presence of a backward compatibility break in child classes.

Specifically, lang(), setLanguage(), and $language are now static, and should be called statically.

References:

Follow-up to [54937], [55557], [56484], [57137], [59246], [59481], [60623], [60813], [60888].

Props SirLouen.
Fixes #64101.

#8 follow-up: @peterwilsoncc
12 months ago

  • Milestone 7.0 → 6.9
  • Resolution fixed
  • Status closed → reopened

As the current version in the 6.9 branch was retagged upstream, thus the small changeset on this ticket, I think it would be good to backport [61249].

Specifically, lang(), setLanguage(), and $language are now static, and should be called statically.

Additionally, will the ​code in `WP_Locale_Switcher::change_locale()` need an update given the above?

#9 in reply to: ↑ 8 @SirLouen
12 months ago

Replying to peterwilsoncc:

Additionally, will the code in WP_Locale_Switcher::change_locale() need an update given the above?

This update was a little tricky. This update was done in a previous point version, but it violated the semver rules, hence, a forced update to 7.0.0 without any changes (this) was introduced after. The code you mention is already updated and merged into 6.9 (prev to RC1).

If you want you can leave this fixed into 7.0 without the need of a backport, no real changes are worthy here.

Last edited 12 months ago by SirLouen (previous) (diff)

#10 follow-up: @peterwilsoncc
12 months ago

@SirLouen I think it would be good to backport the version number changes as the PHPMailer 6.11.0 and 6.11.1 include changes that were reverted in 6.12.0 but retained in 7.0.0. If a developer is calling version_compare() to determine if these changes are included, it will need to be a messy condition if ( version >= 7.0.0 || version == 6.11.0 || version == 6.11.1 )

Additionally, will the code in WP_Locale_Switcher::change_locale() need an update given the above?

No, because I misread the code on Sunday.

#11 in reply to: ↑ 10 @SirLouen
12 months ago

Replying to peterwilsoncc:

@SirLouen I think it would be good to backport the version number changes as the PHPMailer 6.11.0 and 6.11.1 include changes that were reverted in 6.12.0 but retained in 7.0.0. If a developer is calling version_compare() to determine if these changes are included, it will need to be a messy condition if ( version >= 7.0.0 || version == 6.11.0 || version == 6.11.1 )

True, and backporting is pretty simple.

This ticket was mentioned in ​Slack in #core by wildworks. ​View the logs.


12 months ago

#13 @desrosj
12 months ago

  • Keywords dev-reviewed added

[61249] looks good to backport. Thanks for suggesting that, @peterwilsoncc!

#14 @peterwilsoncc
12 months ago

  • Resolution → fixed
  • Status reopened → closed

In 61254:

External Libraries: Upgrade PHPMailer to version 7.0.0.

This is exactly the same as version 6.11.1 but bumps the major version number to indicate the presence of a backward compatibility break in child classes.

Specifically, lang(), setLanguage(), and $language are now static, and should be called statically.

References:

Follow-up to [54937], [55557], [56484], [57137], [59246], [59481], [60623], [60813], [60888].

Reviewed by desrosj.
Merges [61249] to the 6.9 branch.

Props SirLouen.
Fixes #64101.

Note: See TracTickets for help on using tickets.