- Issue created by @klimp
- 🇺🇸United States tr Cascadia
It seems that the type hint was deliberately chosen so that this code would work in D8, D9, and D10. Changing the type hint like you propose will break D8 compatibility. Update status is giving you a false positive in this case - it's not actually wrong.
(And, if you are going to change the type hint in the @param then the constructor argument should also be type hinted. Right now it is not, again to allow this code to work with D8, D9, and D10.)
See the commit at https://git.drupalcode.org/project/smtp/-/commit/a46b2f8a0d0a8e9cfcbeb85...
Unfortunately, there is no issue associated with that commit, so no explanation of what was being done and why. I personally think it's a mistake to add and keep D8-specific workaround in the current branch, as D8 has been end-of-life for almost two years now. If D8 compatibility is to be maintained in the 8.x-1.x branch, then I would suggest a new branch for D9+ should be opened going forward so that some of the D8 legacy code can be dropped.
- Status changed to Postponed
over 1 year ago 6:45pm 21 June 2023 - 🇺🇸United States japerry KVUO
Since the SMTP module is fairly simple, my personal preference is to maintain backward compatibility, if possible, to ease the ability for sites to upgrade. However, with D9 EOL coming soon, the next release of SMTP will probably be the last that supports Drupal 8.