From ca93fb0962f98717409d717087d945f33f839f1d Mon Sep 17 00:00:00 2001 From: Jamison Valenta Date: Fri, 30 Sep 2022 12:45:58 -0600 Subject: [PATCH] v9.31.0 changes --- src/Collect/Support/Traits/EnumeratesValues.php | 1 + tests/files/Support/Str.php | 12 ++++++++++++ tests/files/Support/Stringable.php | 2 +- upgrade.sh | 2 +- 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/Collect/Support/Traits/EnumeratesValues.php b/src/Collect/Support/Traits/EnumeratesValues.php index 0fc6dc3..fd52a78 100644 --- a/src/Collect/Support/Traits/EnumeratesValues.php +++ b/src/Collect/Support/Traits/EnumeratesValues.php @@ -1042,6 +1042,7 @@ protected function operatorForWhere($key, $operator = null, $value = null) case '>=': return $retrieved >= $value; case '===': return $retrieved === $value; case '!==': return $retrieved !== $value; + case '<=>': return $retrieved <=> $value; } }; } diff --git a/tests/files/Support/Str.php b/tests/files/Support/Str.php index 9c74ce3..81cc958 100644 --- a/tests/files/Support/Str.php +++ b/tests/files/Support/Str.php @@ -338,6 +338,18 @@ public static function finish($value, $cap) return preg_replace('/(?:'.$quoted.')+$/u', '', $value).$cap; } + /** + * Wrap the string with the given strings. + * + * @param string $before + * @param string|null $after + * @return string + */ + public static function wrap($value, $before, $after = null) + { + return $before.$value.($after ??= $before); + } + /** * Determine if a given string matches a given pattern. * diff --git a/tests/files/Support/Stringable.php b/tests/files/Support/Stringable.php index ddfdd50..ab877d8 100644 --- a/tests/files/Support/Stringable.php +++ b/tests/files/Support/Stringable.php @@ -1060,7 +1060,7 @@ public function wordCount() */ public function wrap($before, $after = null) { - return new static($before.$this->value.($after ??= $before)); + return new static(Str::wrap($this->value, $before, $after)); } /** diff --git a/upgrade.sh b/upgrade.sh index 3d79f4a..a823ae0 100755 --- a/upgrade.sh +++ b/upgrade.sh @@ -381,7 +381,7 @@ function getCurrentVersionFromGitHub() echo Getting current version from $repository... if [ -z "$requestedVersion" ]; then - collectionVersion=$(git ls-remote $repository --tags v9.30\* | grep tags/ | grep -v {} | cut -d \/ -f 3 | cut -d v -f 2 | grep -v RC | grep -vi beta | sort -t. -k 1,1n -k 2,2n -k 3,3n| tail -1) + collectionVersion=$(git ls-remote $repository --tags v9.31\* | grep tags/ | grep -v {} | cut -d \/ -f 3 | cut -d v -f 2 | grep -v RC | grep -vi beta | sort -t. -k 1,1n -k 2,2n -k 3,3n| tail -1) else collectionVersion=$requestedVersion fi