N°4824 Update consumers after swiftmailer/swiftmailer update

Also remove new Doctrine test dir (iTopComposerTest feedback)
This commit is contained in:
Pierre Goiffon
2022-03-11 09:55:53 +01:00
parent 0ef9bb1a47
commit 6f0e1a7f47
4 changed files with 12 additions and 332 deletions

View File

@@ -493,23 +493,17 @@ class EMail
class Swift_Transport_LogFileTransport extends Swift_Transport_NullTransport
{
protected $sLogFile;
/**
* Sends the given message.
*
* @param Swift_Mime_Message $message
* @param string[] $failedRecipients An array of failures by-reference
*
* @return int The number of sent emails
* @inheritDoc
*/
public function send(Swift_Mime_Message $message, &$failedRecipients = null)
public function send(Swift_Mime_SimpleMessage $message, &$failedRecipients = null)
{
$hFile = @fopen($this->sLogFile, 'a');
if ($hFile)
{
if ($hFile) {
$sTxt = "================== ".date('Y-m-d H:i:s')." ==================\n";
$sTxt .= $message->toString()."\n";
@fwrite($hFile, $sTxt);
@fclose($hFile);
}
@@ -534,12 +528,13 @@ class Swift_LogFileTransport extends Swift_Transport_LogFileTransport
/**
* Create a new LogFileTransport.
*/
public function __construct()
public function __construct(Swift_Events_EventDispatcher $eventDispatcher)
{
parent::__construct($eventDispatcher);
call_user_func_array(
array($this, 'Swift_Transport_LogFileTransport::__construct'),
Swift_DependencyContainer::getInstance()
->createDependenciesFor('transport.null')
array($this, 'Swift_Transport_LogFileTransport::__construct'),
Swift_DependencyContainer::getInstance()
->createDependenciesFor('transport.null')
);
}