N°8834 - Add compatibility with PHP 8.4 (#819)

* N°8834 - Add compatibility with PHP 8.4

* Rollback of scssphp/scssphp version upgrade due to compilation error
This commit is contained in:
Lenaick
2026-02-26 10:36:32 +01:00
committed by GitHub
parent d4821b7edc
commit fc967c06ce
961 changed files with 12298 additions and 7130 deletions

View File

@@ -507,7 +507,7 @@ class Email extends Message
}
if ($name !== $part->getContentId()) {
$html = str_replace('cid:'.$name, 'cid:'.$part->getContentId(), $html, $count);
$html = str_replace('cid:'.$name, 'cid:'.$part->getContentId(), $html);
}
$relatedParts[$name] = $part;
$part->setName($part->getContentId())->asInline();

View File

@@ -46,9 +46,9 @@ final class QpContentEncoder implements ContentEncoderInterface
// transform =0D=0A to CRLF
$string = str_replace(["\t=0D=0A", ' =0D=0A', '=0D=0A'], ["=09\r\n", "=20\r\n", "\r\n"], $string);
return match (\ord(substr($string, -1))) {
0x09 => substr_replace($string, '=09', -1),
0x20 => substr_replace($string, '=20', -1),
return match ($string[-1] ?? '') {
"\x09" => substr_replace($string, '=09', -1),
"\x20" => substr_replace($string, '=20', -1),
default => $string,
};
}

View File

@@ -183,9 +183,9 @@ class QpEncoder implements EncoderInterface
{
$string = str_replace(["\t=0D=0A", ' =0D=0A', '=0D=0A'], ["=09\r\n", "=20\r\n", "\r\n"], $string);
return match ($end = \ord(substr($string, -1))) {
0x09,
0x20 => substr_replace($string, self::QP_MAP[$end], -1),
return match ($end = ($string[-1] ?? '')) {
"\x09",
"\x20" => substr_replace($string, self::QP_MAP[\ord($end)], -1),
default => $string,
};
}

File diff suppressed because it is too large Load Diff

View File

@@ -60,13 +60,15 @@ class MessagePart extends DataPart
return $this->message->toIterable();
}
public function __sleep(): array
public function __serialize(): array
{
return ['message'];
return ['message' => $this->message];
}
public function __wakeup(): void
public function __unserialize(array $data): void
{
$this->message = $data['message'] ?? $data["\0".self::class."\0message"];
$this->__construct($this->message);
}
}

View File

@@ -80,7 +80,7 @@ $exts = [
'html' => ['text/html'],
'jar' => ['application/x-java-archive'],
'jpg' => ['image/jpeg'],
'js' => ['text/javascript'],
'js' => ['text/javascript', 'application/javascript', 'application/x-javascript'],
'keynote' => ['application/vnd.apple.keynote'],
'key' => ['application/vnd.apple.keynote'],
'm3u' => ['audio/x-mpegurl'],