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

Add support for PHP 8.1 #528

Merged
merged 3 commits into from
Mar 7, 2022
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
2 changes: 1 addition & 1 deletion src/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ public function parseIncludes($includes)
}

foreach ($includes as $include) {
list($includeName, $allModifiersStr) = array_pad(explode(':', $include, 2), 2, null);
list($includeName, $allModifiersStr) = array_pad(explode(':', $include, 2), 2, '');
list($allModifiersStr, $subRelations) = array_pad(explode('.', $allModifiersStr, 2), 2, null);

// Trim it down to a cool level of recursion
Expand Down
5 changes: 5 additions & 0 deletions src/ParamBag.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ public function __unset($key)
*
* @return bool
*/
#[\ReturnTypeWillChange]
public function offsetExists($key)
{
return $this->__isset($key);
Expand All @@ -117,6 +118,7 @@ public function offsetExists($key)
*
* @return mixed
*/
#[\ReturnTypeWillChange]
public function offsetGet($key)
{
return $this->__get($key);
Expand All @@ -132,6 +134,7 @@ public function offsetGet($key)
*
* @return void
*/
#[\ReturnTypeWillChange]
public function offsetSet($key, $value)
{
throw new \LogicException('Modifying parameters is not permitted');
Expand All @@ -146,6 +149,7 @@ public function offsetSet($key, $value)
*
* @return void
*/
#[\ReturnTypeWillChange]
public function offsetUnset($key)
{
throw new \LogicException('Modifying parameters is not permitted');
Expand All @@ -156,6 +160,7 @@ public function offsetUnset($key)
*
* @return \ArrayIterator
*/
#[\ReturnTypeWillChange]
public function getIterator()
{
return new \ArrayIterator($this->params);
Expand Down
3 changes: 2 additions & 1 deletion src/Scope.php
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,8 @@ public function toArray()
/**
* @return mixed
*/
public function jsonSerialize(): mixed
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return $this->toArray();
}
Expand Down