upgrade to laravel 8.0

This commit is contained in:
Attila Kerekes
2022-11-13 17:05:03 +01:00
committed by Attila Jozsef Kerekes
parent 43f894b58d
commit 27f58c0866
3895 changed files with 150576 additions and 124482 deletions

View File

@@ -245,7 +245,7 @@ abstract class AbstractString implements \Stringable, \JsonSerializable
public function collapseWhitespace(): self
{
$str = clone $this;
$str->string = trim(preg_replace('/(?:\s{2,}+|[^\S ])/', ' ', $str->string));
$str->string = trim(preg_replace("/(?:[ \n\r\t\x0C]{2,}+|[\n\r\t\x0C])/", ' ', $str->string), " \n\r\t\x0C");
return $str;
}

View File

@@ -162,7 +162,7 @@ abstract class AbstractUnicodeString extends AbstractString
public function camel(): parent
{
$str = clone $this;
$str->string = str_replace(' ', '', preg_replace_callback('/\b./u', static function ($m) use (&$i) {
$str->string = str_replace(' ', '', preg_replace_callback('/\b.(?![A-Z]{2,})/u', static function ($m) use (&$i) {
return 1 === ++$i ? ('İ' === $m[0] ? 'i̇' : mb_strtolower($m[0], 'UTF-8')) : mb_convert_case($m[0], \MB_CASE_TITLE, 'UTF-8');
}, preg_replace('/[^\pL0-9]++/u', ' ', $this->string)));
@@ -366,7 +366,7 @@ abstract class AbstractUnicodeString extends AbstractString
public function snake(): parent
{
$str = $this->camel()->title();
$str = $this->camel();
$str->string = mb_strtolower(preg_replace(['/(\p{Lu}+)(\p{Lu}\p{Ll})/u', '/([\p{Ll}0-9])(\p{Lu})/u'], '\1_\2', $str->string), 'UTF-8');
return $str;
@@ -498,8 +498,11 @@ abstract class AbstractUnicodeString extends AbstractString
)|[\p{Cc}\x7F]++)/xu', '', $s);
}
// Non printable characters have been dropped, so wcswidth cannot logically return -1.
$width += $this->wcswidth($s);
$lineWidth = $this->wcswidth($s);
if ($lineWidth > $width) {
$width = $lineWidth;
}
}
return $width;

View File

@@ -103,7 +103,10 @@ class ByteString extends AbstractString
public function camel(): parent
{
$str = clone $this;
$str->string = lcfirst(str_replace(' ', '', ucwords(preg_replace('/[^a-zA-Z0-9\x7f-\xff]++/', ' ', $this->string))));
$parts = explode(' ', trim(ucwords(preg_replace('/[^a-zA-Z0-9\x7f-\xff]++/', ' ', $this->string))));
$parts[0] = 1 !== \strlen($parts[0]) && ctype_upper($parts[0]) ? $parts[0] : lcfirst($parts[0]);
$str->string = implode('', $parts);
return $str;
}
@@ -363,7 +366,7 @@ class ByteString extends AbstractString
public function snake(): parent
{
$str = $this->camel()->title();
$str = $this->camel();
$str->string = strtolower(preg_replace(['/([A-Z]+)([A-Z][a-z])/', '/([a-z\d])([A-Z])/'], '\1_\2', $str->string));
return $str;

View File

@@ -100,7 +100,7 @@ final class FrenchInflector implements InflectorInterface
['/^mes(sieur|seigneur)s$/', 'mon\1'],
['/^Mes(sieur|seigneur)s$/', 'Mon\1'],
//Default rule
// Default rule
['/s$/i', ''],
];

View File

@@ -75,7 +75,7 @@ class LazyString implements \Stringable, \JsonSerializable
*/
final public static function isStringable($value): bool
{
return \is_string($value) || $value instanceof self || (\is_object($value) ? method_exists($value, '__toString') : is_scalar($value));
return \is_string($value) || $value instanceof self || (\is_object($value) ? method_exists($value, '__toString') : \is_scalar($value));
}
/**

View File

@@ -3,8 +3,8 @@
/*
* This file has been auto-generated by the Symfony String Component for internal use.
*
* Unicode version: 14.0.0
* Date: 2021-09-17T09:20:30+02:00
* Unicode version: 15.0.0
* Date: 2022-10-05T17:16:36+02:00
*/
return [
@@ -856,10 +856,18 @@ return [
110848,
110882,
],
[
110898,
110898,
],
[
110928,
110930,
],
[
110933,
110933,
],
[
110948,
110951,
@@ -1005,7 +1013,7 @@ return [
128727,
],
[
128733,
128732,
128735,
],
[
@@ -1038,39 +1046,31 @@ return [
],
[
129648,
129652,
],
[
129656,
129660,
],
[
129664,
129670,
129672,
],
[
129680,
129708,
129725,
],
[
129712,
129722,
],
[
129728,
129727,
129733,
],
[
129744,
129753,
129742,
129755,
],
[
129760,
129767,
129768,
],
[
129776,
129782,
129784,
],
[
131072,
@@ -1082,10 +1082,10 @@ return [
],
[
173824,
177976,
177977,
],
[
177977,
177978,
177983,
],
[
@@ -1130,6 +1130,14 @@ return [
],
[
201547,
201551,
],
[
201552,
205743,
],
[
205744,
262141,
],
];

View File

@@ -3,8 +3,8 @@
/*
* This file has been auto-generated by the Symfony String Component for internal use.
*
* Unicode version: 14.0.0
* Date: 2021-09-17T09:20:30+02:00
* Unicode version: 15.0.0
* Date: 2022-10-05T17:16:37+02:00
*/
return [
@@ -382,7 +382,7 @@ return [
],
[
3784,
3789,
3790,
],
[
3864,
@@ -920,6 +920,10 @@ return [
69291,
69292,
],
[
69373,
69375,
],
[
69446,
69456,
@@ -1008,6 +1012,10 @@ return [
70206,
70206,
],
[
70209,
70209,
],
[
70367,
70367,
@@ -1252,6 +1260,30 @@ return [
73459,
73460,
],
[
73472,
73473,
],
[
73526,
73530,
],
[
73536,
73536,
],
[
73538,
73538,
],
[
78912,
78912,
],
[
78919,
78933,
],
[
92912,
92916,
@@ -1348,6 +1380,10 @@ return [
122918,
122922,
],
[
123023,
123023,
],
[
123184,
123190,
@@ -1360,6 +1396,10 @@ return [
123628,
123631,
],
[
124140,
124143,
],
[
125136,
125142,