bug PR-4.4-dev b/c break Pending

User tests: Successful: Unsuccessful:

avatar heelc29
heelc29
3 Jan 2024

Summary of Changes

return type of send() function between class and interface do not match

class: boolean

/**
* Send the mail
*
* @return boolean Boolean true if successful, false if exception throwing is disabled.
*
* @since 1.7.0
*
* @throws MailDisabledException if the mail function is disabled
* @throws phpmailerException if sending failed
*/
public function Send()

interface: void

/**
* Send the mail. Throws an exception when something goes wrong.
*
* @return void
*
* @since 4.4.0
*
* @throws \RuntimeException
*/
public function send();

class contains return statement:

return $result;

Testing Instructions

code review

Actual result BEFORE applying this Pull Request

phan warning:
libraries/src/Mail/Mail.php:134 PhanParamSignatureMismatch Declaration of function Send() : bool should be compatible with function send() : void defined in libraries/src/Mail/MailerInterface.php:32

Expected result AFTER applying this Pull Request

return type of class and interface match (warning in phan disappear)

Link to documentations

Please select:

  • No documentation changes for docs.joomla.org needed
  • No documentation changes for manual.joomla.org needed
avatar heelc29 heelc29 - open - 3 Jan 2024
avatar heelc29 heelc29 - change - 3 Jan 2024
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 3 Jan 2024
Category Libraries
avatar heelc29 heelc29 - change - 28 Jan 2024
Labels Added: PR-4.4-dev
avatar HLeithner
HLeithner - comment - 24 Apr 2024

Changing the interface is a b/c break but Implemented code says it returns a boolean... @laoneo @MacJoom what would you like to do? move to 6.0? or merge to 4.4?

avatar heelc29
heelc29 - comment - 1 Sep 2024

In my opinion this is a docblock error introduced with 4.4 (#40560) so it should be a bugfix against 4.4

avatar heelc29 heelc29 - change - 1 Sep 2024
Labels Added: bug b/c break

Add a Comment

Login with GitHub to post a comment