From 4c261d9d7397f9b27eaa6c3d13cceff137f56276 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Thu, 2 Dec 2021 19:18:50 +0700 Subject: [PATCH 1/2] update stringy with vendor-patches --- ...anielstjules-stringy-src-stringy-php.patch | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 patches/danielstjules-stringy-src-stringy-php.patch diff --git a/patches/danielstjules-stringy-src-stringy-php.patch b/patches/danielstjules-stringy-src-stringy-php.patch new file mode 100644 index 00000000000..9d363bed2c9 --- /dev/null +++ b/patches/danielstjules-stringy-src-stringy-php.patch @@ -0,0 +1,48 @@ +--- /dev/null ++++ ../src/Stringy.php +@@ -267,6 +267,7 @@ class Stringy implements Countable, IteratorAggregate, ArrayAccess + * + * @return int The number of characters in the string, given the encoding + */ ++ #[\ReturnTypeWillChange] + public function count() + { + return $this->length(); +@@ -450,6 +451,7 @@ class Stringy implements Countable, IteratorAggregate, ArrayAccess + * + * @return \ArrayIterator An iterator for the characters in the string + */ ++ #[\ReturnTypeWillChange] + public function getIterator() + { + return new ArrayIterator($this->chars()); +@@ -847,6 +849,7 @@ class Stringy implements Countable, IteratorAggregate, ArrayAccess + * @param mixed $offset The index to check + * @return boolean Whether or not the index exists + */ ++ #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + $length = $this->length(); +@@ -870,6 +873,7 @@ class Stringy implements Countable, IteratorAggregate, ArrayAccess + * @throws \OutOfBoundsException If the positive or negative offset does + * not exist + */ ++ #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + $offset = (int) $offset; +@@ -890,6 +894,7 @@ class Stringy implements Countable, IteratorAggregate, ArrayAccess + * @param mixed $value Value to set + * @throws \Exception When called + */ ++ #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + // Stringy is immutable, cannot directly set char +@@ -903,6 +908,7 @@ class Stringy implements Countable, IteratorAggregate, ArrayAccess + * @param mixed $offset The index of the character + * @throws \Exception When called + */ ++ #[\ReturnTypeWillChange] + public function offsetUnset($offset) From de6e0f5568419239dcb5c88f225bc701ad8b97c9 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Thu, 2 Dec 2021 19:18:46 +0700 Subject: [PATCH 2/2] update stringy with vendor-patches --- composer.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/composer.json b/composer.json index db6e86395ae..17ec1534549 100644 --- a/composer.json +++ b/composer.json @@ -154,6 +154,9 @@ "patches": { "symfony/dependency-injection": [ "patches/symfony-dependency-injection-loader-configurator-servicesconfigurator-php.patch" + ], + "danielstjules/stringy": [ + "patches/danielstjules-stringy-src-stringy-php.patch" ] }, "branch-alias": {