20250204
This commit is contained in:
@@ -2,12 +2,6 @@
|
||||
|
||||
All notable changes are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles.
|
||||
|
||||
## [7.0.0] - 2025-02-07
|
||||
|
||||
### Removed
|
||||
|
||||
* This component is no longer supported on PHP 8.2
|
||||
|
||||
## [6.0.2] - 2024-07-03
|
||||
|
||||
### Changed
|
||||
@@ -63,7 +57,6 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](htt
|
||||
|
||||
* Tests etc. are now ignored for archive exports
|
||||
|
||||
[7.0.0]: https://github.com/sebastianbergmann/recursion-context/compare/6.0...main
|
||||
[6.0.2]: https://github.com/sebastianbergmann/recursion-context/compare/6.0.1...6.0.2
|
||||
[6.0.1]: https://github.com/sebastianbergmann/recursion-context/compare/6.0.0...6.0.1
|
||||
[6.0.0]: https://github.com/sebastianbergmann/recursion-context/compare/5.0...6.0.0
|
||||
|
2
vendor/sebastian/recursion-context/LICENSE
vendored
2
vendor/sebastian/recursion-context/LICENSE
vendored
@@ -1,6 +1,6 @@
|
||||
BSD 3-Clause License
|
||||
|
||||
Copyright (c) 2002-2025, Sebastian Bergmann
|
||||
Copyright (c) 2002-2024, Sebastian Bergmann
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
|
2
vendor/sebastian/recursion-context/README.md
vendored
2
vendor/sebastian/recursion-context/README.md
vendored
@@ -1,4 +1,4 @@
|
||||
[](https://packagist.org/packages/sebastian/recursion-context)
|
||||
[](https://packagist.org/packages/sebastian/recursion-context)
|
||||
[](https://github.com/sebastianbergmann/recursion-context/actions)
|
||||
[](https://codecov.io/gh/sebastianbergmann/recursion-context)
|
||||
|
||||
|
@@ -21,20 +21,19 @@
|
||||
"issues": "https://github.com/sebastianbergmann/recursion-context/issues",
|
||||
"security": "https://github.com/sebastianbergmann/recursion-context/security/policy"
|
||||
},
|
||||
"minimum-stability": "dev",
|
||||
"prefer-stable": true,
|
||||
"config": {
|
||||
"platform": {
|
||||
"php": "8.3.0"
|
||||
"php": "8.2.0"
|
||||
},
|
||||
"optimize-autoloader": true,
|
||||
"sort-packages": true
|
||||
},
|
||||
"require": {
|
||||
"php": ">=8.3"
|
||||
"php": ">=8.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^12.0-dev"
|
||||
"phpunit/phpunit": "^11.0"
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
@@ -43,7 +42,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "7.0-dev"
|
||||
"dev-main": "6.0-dev"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -16,7 +16,6 @@ use function array_pop;
|
||||
use function array_slice;
|
||||
use function count;
|
||||
use function is_array;
|
||||
use function is_int;
|
||||
use function random_int;
|
||||
use function spl_object_id;
|
||||
use SplObjectStorage;
|
||||
@@ -44,7 +43,6 @@ final class Context
|
||||
public function __destruct()
|
||||
{
|
||||
foreach ($this->arrays as &$array) {
|
||||
/* @phpstan-ignore function.alreadyNarrowedType */
|
||||
if (is_array($array)) {
|
||||
array_pop($array);
|
||||
array_pop($array);
|
||||
@@ -59,10 +57,9 @@ final class Context
|
||||
*
|
||||
* @param-out T $value
|
||||
*/
|
||||
public function add(array|object &$value): int
|
||||
public function add(array|object &$value): false|int|string
|
||||
{
|
||||
if (is_array($value)) {
|
||||
/* @phpstan-ignore paramOut.type */
|
||||
return $this->addArray($value);
|
||||
}
|
||||
|
||||
@@ -76,7 +73,7 @@ final class Context
|
||||
*
|
||||
* @param-out T $value
|
||||
*/
|
||||
public function contains(array|object &$value): false|int
|
||||
public function contains(array|object &$value): false|int|string
|
||||
{
|
||||
if (is_array($value)) {
|
||||
return $this->containsArray($value);
|
||||
@@ -143,13 +140,7 @@ final class Context
|
||||
{
|
||||
$end = array_slice($array, -2);
|
||||
|
||||
if (isset($end[1]) &&
|
||||
$end[1] === $this->objects &&
|
||||
is_int($end[0])) {
|
||||
return $end[0];
|
||||
}
|
||||
|
||||
return false;
|
||||
return isset($end[1]) && $end[1] === $this->objects ? $end[0] : false;
|
||||
}
|
||||
|
||||
private function containsObject(object $value): false|int
|
||||
|
Reference in New Issue
Block a user