composer update

This commit is contained in:
2020-12-06 10:28:55 +00:00
parent 69d92960d9
commit 09413522bb
1596 changed files with 60456 additions and 39587 deletions

View File

@@ -24,7 +24,7 @@ final class Base64ContentEncoder extends Base64Encoder implements ContentEncoder
throw new \TypeError(sprintf('Method "%s" takes a stream as a first argument.', __METHOD__));
}
$filter = stream_filter_append($stream, 'convert.base64-encode', STREAM_FILTER_READ, [
$filter = stream_filter_append($stream, 'convert.base64-encode', \STREAM_FILTER_READ, [
'line-length' => 0 >= $maxLineLength || 76 < $maxLineLength ? 76 : $maxLineLength,
'line-break-chars' => "\r\n",
]);
@@ -32,11 +32,8 @@ final class Base64ContentEncoder extends Base64Encoder implements ContentEncoder
throw new RuntimeException('Unable to set the base64 content encoder to the filter.');
}
if (stream_get_meta_data($stream)['seekable'] ?? false) {
rewind($stream);
}
while (!feof($stream)) {
yield fread($stream, 8192);
yield fread($stream, 16372);
}
stream_filter_remove($filter);
}

View File

@@ -11,16 +11,14 @@
namespace Symfony\Component\Mime\Encoder;
use Symfony\Component\Mime\Exception\AddressEncoderException;
/**
* An IDN email address encoder.
*
* Encodes the domain part of an address using IDN. This is compatible will all
* SMTP servers.
*
* This encoder does not support email addresses with non-ASCII characters in
* local-part (the substring before @).
* Note: It leaves the local part as is. In case there are non-ASCII characters
* in the local part then it depends on the SMTP Server if this is supported.
*
* @author Christian Schmidt
*/
@@ -28,8 +26,6 @@ final class IdnAddressEncoder implements AddressEncoderInterface
{
/**
* Encodes the domain part of an address using IDN.
*
* @throws AddressEncoderException If local-part contains non-ASCII characters
*/
public function encodeString(string $address): string
{
@@ -38,12 +34,8 @@ final class IdnAddressEncoder implements AddressEncoderInterface
$local = substr($address, 0, $i);
$domain = substr($address, $i + 1);
if (preg_match('/[^\x00-\x7F]/', $local)) {
throw new AddressEncoderException(sprintf('Non-ASCII characters not supported in local-part os "%s".', $address));
}
if (preg_match('/[^\x00-\x7F]/', $domain)) {
$address = sprintf('%s@%s', $local, idn_to_ascii($domain, 0, INTL_IDNA_VARIANT_UTS46));
$address = sprintf('%s@%s', $local, idn_to_ascii($domain, 0, \INTL_IDNA_VARIANT_UTS46));
}
}

View File

@@ -23,10 +23,6 @@ final class QpContentEncoder implements ContentEncoderInterface
}
// we don't use PHP stream filters here as the content should be small enough
if (stream_get_meta_data($stream)['seekable'] ?? false) {
rewind($stream);
}
yield $this->encodeString(stream_get_contents($stream), 'utf-8', 0, $maxLineLength);
}