chore: Update copyright year from 2025 to 2026 across core files

- Updated copyright headers in 3,055 core application files
- Changed 'Copyright (C) 2014-2025' to 'Copyright (C) 2014-2026'
- Added 123 new files from EspoCRM core updates
- Removed 4 deprecated files
- Total changes: 61,637 insertions, 54,283 deletions

This is a routine maintenance update for the new year 2026.
This commit is contained in:
2026-02-07 16:05:21 +01:00
parent 6a8a4a2882
commit 127fa6503b
6468 changed files with 564781 additions and 31179 deletions

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify
@@ -44,10 +44,6 @@ use Espo\Entities\Attachment;
use Espo\Entities\Email;
use Espo\ORM\EntityManager;
use Laminas\Mail\Headers;
use Laminas\Mail\Message as LaminasMessage;
use RuntimeException;
use Symfony\Component\Mailer\Envelope;
use Symfony\Component\Mailer\Exception\TransportExceptionInterface;
use Symfony\Component\Mailer\Transport\TransportInterface;
@@ -71,7 +67,6 @@ class Sender
/** @var array<string, mixed> */
private array $overrideParams = [];
private ?string $envelopeFromAddress = null;
private ?LaminasMessage $laminasMessage = null;
/** @var ?iterable<Attachment> */
private $attachmentList = null;
/** @var array{string, string}[] */
@@ -96,7 +91,6 @@ class Sender
{
$this->params = [];
$this->envelopeFromAddress = null;
$this->laminasMessage = null;
$this->attachmentList = null;
$this->overrideParams = [];
$this->headers = [];
@@ -197,19 +191,6 @@ class Sender
return $this;
}
/**
* Set a message instance.
*
* @deprecated As of v9.1. Use `withAddedHeader`.
* @todo Remove in v10.0.
*/
public function withMessage(LaminasMessage $message): self
{
$this->laminasMessage = $message;
return $this;
}
/**
* Add a header.
*
@@ -313,8 +294,6 @@ class Sender
$this->applyBody($email, $message);
$this->applyMessageId($email, $message);
$this->applyLaminasMessageHeaders($message);
if (!$this->transport) {
throw new LogicException();
}
@@ -595,17 +574,6 @@ class Sender
$message->getHeaders()->addTextHeader($item[0], $item[1]);
}
if ($this->laminasMessage) {
// For bc.
foreach ($this->laminasMessage->getHeaders() as $it) {
if ($it->getFieldName() === 'Date') {
continue;
}
$message->getHeaders()->addTextHeader($it->getFieldName(), $it->getFieldValue());
}
}
if ($email->isAutoReply() && !$message->getHeaders()->has('Auto-Submitted')) {
$message->getHeaders()->addTextHeader('Auto-Submitted', 'auto-replied');
}
@@ -625,24 +593,4 @@ class Sender
return new Envelope(new Address($this->envelopeFromAddress), $recipients);
}
private function applyLaminasMessageHeaders(Message $message): void
{
if (!$this->laminasMessage) {
return;
}
$parts = preg_split("/\R\R/", $message->toString(), 2);
if (!is_array($parts) || count($parts) < 2) {
throw new RuntimeException("Could not split email.");
}
/** @noinspection PhpMultipleClassDeclarationsInspection */
$this->laminasMessage
->setHeaders(
Headers::fromString($parts[0])
)
->setBody($parts[1]);
}
}