Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

Commit

Permalink
Merge pull request #324 from tighten/v9.31.0-changes
Browse files Browse the repository at this point in the history
v9.31.0 changes
  • Loading branch information
jamisonvalenta authored Sep 30, 2022
2 parents 444aa78 + ca93fb0 commit aa47d4d
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/Collect/Support/Traits/EnumeratesValues.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
};
}
Expand Down
12 changes: 12 additions & 0 deletions tests/files/Support/Str.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down
2 changes: 1 addition & 1 deletion tests/files/Support/Stringable.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

/**
Expand Down
2 changes: 1 addition & 1 deletion upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit aa47d4d

Please sign in to comment.