Aggiornato Composer

This commit is contained in:
Paolo A
2024-05-17 12:24:19 +00:00
parent 4ac62108b5
commit ec201d75b2
2238 changed files with 38684 additions and 59785 deletions

View File

@@ -244,7 +244,7 @@ abstract class AbstractString implements \Stringable, \JsonSerializable
public function collapseWhitespace(): static
{
$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

@@ -159,7 +159,7 @@ abstract class AbstractUnicodeString extends AbstractString
public function camel(): static
{
$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)));
@@ -356,7 +356,7 @@ abstract class AbstractUnicodeString extends AbstractString
public function snake(): static
{
$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;
@@ -484,8 +484,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(): static
{
$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;
}
@@ -347,7 +350,7 @@ class ByteString extends AbstractString
public function snake(): static
{
$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', ''],
];
@@ -108,7 +108,7 @@ final class FrenchInflector implements InflectorInterface
* A list of words which should not be inflected.
* This list is only used by singularize.
*/
private const UNINFLECTED = '/^(abcès|accès|abus|albatros|anchois|anglais|autobus|bois|brebis|carquois|cas|chas|colis|concours|corps|cours|cyprès|décès|devis|discours|dos|embarras|engrais|entrelacs|excès|fils|fois|gâchis|gars|glas|héros|intrus|jars|jus|kermès|lacis|legs|lilas|marais|mars|matelas|mépris|mets|mois|mors|obus|os|palais|paradis|parcours|pardessus|pays|plusieurs|poids|pois|pouls|printemps|processus|progrès|puits|pus|rabais|radis|recors|recours|refus|relais|remords|remous|rictus|rhinocéros|repas|rubis|sas|secours|sens|souris|succès|talus|tapis|tas|taudis|temps|tiers|univers|velours|verglas|vernis|virus)$/i';
private const UNINFLECTED = '/^(abcès|accès|abus|albatros|anchois|anglais|autobus|bois|brebis|carquois|cas|chas|colis|concours|corps|cours|cyprès|décès|devis|discours|dos|embarras|engrais|entrelacs|excès|fils|fois|gâchis|gars|glas|héros|intrus|jars|jus|kermès|lacis|legs|lilas|marais|mars|matelas|mépris|mets|mois|mors|obus|os|palais|paradis|parcours|pardessus|pays|plusieurs|poids|pois|pouls|printemps|processus|progrès|puits|pus|rabais|radis|recors|recours|refus|relais|remords|remous|rictus|rhinocéros|repas|rubis|sans|sas|secours|sens|souris|succès|talus|tapis|tas|taudis|temps|tiers|univers|velours|verglas|vernis|virus)$/i';
/**
* {@inheritdoc}

View File

@@ -1,4 +1,4 @@
Copyright (c) 2019-2022 Fabien Potencier
Copyright (c) 2019-2023 Fabien Potencier
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@@ -64,7 +64,7 @@ class LazyString implements \Stringable, \JsonSerializable
*/
final public static function isStringable(mixed $value): bool
{
return \is_string($value) || $value instanceof \Stringable || is_scalar($value);
return \is_string($value) || $value instanceof \Stringable || \is_scalar($value);
}
/**
@@ -127,7 +127,7 @@ class LazyString implements \Stringable, \JsonSerializable
} elseif ($callback instanceof \Closure) {
$r = new \ReflectionFunction($callback);
if (false !== strpos($r->name, '{closure}') || !$class = $r->getClosureScopeClass()) {
if (false !== strpos($r->name, '{closure}') || !$class = \PHP_VERSION_ID >= 80111 ? $r->getClosureCalledClass() : $r->getClosureScopeClass()) {
return $r->name;
}

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,