Update to laravel 7

This commit is contained in:
KodeStar
2022-03-10 11:54:29 +00:00
parent 61a5a1a8b0
commit f9a19fce91
7170 changed files with 274189 additions and 283773 deletions

View File

@@ -15,8 +15,6 @@ use Symfony\Component\Mime\Header\Headers;
/**
* @author Fabien Potencier <fabien@symfony.com>
*
* @experimental in 4.3
*/
abstract class AbstractMultipartPart extends AbstractPart
{
@@ -76,10 +74,24 @@ abstract class AbstractMultipartPart extends AbstractPart
yield '--'.$this->getBoundary()."--\r\n";
}
public function asDebugString(): string
{
$str = parent::asDebugString();
foreach ($this->getParts() as $part) {
$lines = explode("\n", $part->asDebugString());
$str .= "\n".array_shift($lines);
foreach ($lines as $line) {
$str .= "\n |".$line;
}
}
return $str;
}
private function getBoundary(): string
{
if (null === $this->boundary) {
$this->boundary = '_=_symfony_'.time().'_'.bin2hex(random_bytes(16)).'_=_';
$this->boundary = strtr(base64_encode(random_bytes(6)), '+/', '-_');
}
return $this->boundary;