Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Php 8.1 Dep] Update stringy vendor patches to update with #[\ReturnTypeWillChange] #1370

Merged
merged 2 commits into from
Dec 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
48 changes: 48 additions & 0 deletions patches/danielstjules-stringy-src-stringy-php.patch
Original file line number Diff line number Diff line change
@@ -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)