🔧
This commit is contained in:
14
vendor/sebastian/comparator/ChangeLog.md
vendored
14
vendor/sebastian/comparator/ChangeLog.md
vendored
@@ -2,6 +2,18 @@
|
||||
|
||||
All notable changes are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
|
||||
|
||||
## [5.0.3] - 2024-10-18
|
||||
|
||||
### Fixed
|
||||
|
||||
* Reverted [#113](https://github.com/sebastianbergmann/comparator/pull/113) as it broke backward compatibility
|
||||
|
||||
## [5.0.2] - 2024-08-12
|
||||
|
||||
### Fixed
|
||||
|
||||
* [#112](https://github.com/sebastianbergmann/comparator/issues/112): Arrays with different keys and the same values are considered equal in canonicalize mode
|
||||
|
||||
## [5.0.1] - 2023-08-14
|
||||
|
||||
### Fixed
|
||||
@@ -144,6 +156,8 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](htt
|
||||
* Added `SebastianBergmann\Comparator\Factory::reset()` to unregister all non-default comparators
|
||||
* Added support for `phpunit/phpunit-mock-objects` version `^5.0`
|
||||
|
||||
[5.0.3]: https://github.com/sebastianbergmann/comparator/compare/5.0.2...5.0.3
|
||||
[5.0.2]: https://github.com/sebastianbergmann/comparator/compare/5.0.1...5.0.2
|
||||
[5.0.1]: https://github.com/sebastianbergmann/comparator/compare/5.0.0...5.0.1
|
||||
[5.0.0]: https://github.com/sebastianbergmann/comparator/compare/4.0.8...5.0.0
|
||||
[4.0.8]: https://github.com/sebastianbergmann/comparator/compare/4.0.7...4.0.8
|
||||
|
||||
2
vendor/sebastian/comparator/LICENSE
vendored
2
vendor/sebastian/comparator/LICENSE
vendored
@@ -1,6 +1,6 @@
|
||||
BSD 3-Clause License
|
||||
|
||||
Copyright (c) 2002-2023, 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/comparator/composer.json
vendored
2
vendor/sebastian/comparator/composer.json
vendored
@@ -35,7 +35,7 @@
|
||||
"ext-mbstring": "*"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^10.3"
|
||||
"phpunit/phpunit": "^10.5"
|
||||
},
|
||||
"config": {
|
||||
"platform": {
|
||||
|
||||
@@ -56,7 +56,7 @@ class ArrayComparator extends Comparator
|
||||
$expectedAsString .= sprintf(
|
||||
" %s => %s\n",
|
||||
$exporter->export($key),
|
||||
$exporter->shortenedExport($value)
|
||||
$exporter->shortenedExport($value),
|
||||
);
|
||||
|
||||
$equal = false;
|
||||
@@ -71,25 +71,25 @@ class ArrayComparator extends Comparator
|
||||
$expectedAsString .= sprintf(
|
||||
" %s => %s\n",
|
||||
$exporter->export($key),
|
||||
$exporter->shortenedExport($value)
|
||||
$exporter->shortenedExport($value),
|
||||
);
|
||||
|
||||
$actualAsString .= sprintf(
|
||||
" %s => %s\n",
|
||||
$exporter->export($key),
|
||||
$exporter->shortenedExport($actual[$key])
|
||||
$exporter->shortenedExport($actual[$key]),
|
||||
);
|
||||
} catch (ComparisonFailure $e) {
|
||||
$expectedAsString .= sprintf(
|
||||
" %s => %s\n",
|
||||
$exporter->export($key),
|
||||
$e->getExpectedAsString() ? $this->indent($e->getExpectedAsString()) : $exporter->shortenedExport($e->getExpected())
|
||||
$e->getExpectedAsString() ? $this->indent($e->getExpectedAsString()) : $exporter->shortenedExport($e->getExpected()),
|
||||
);
|
||||
|
||||
$actualAsString .= sprintf(
|
||||
" %s => %s\n",
|
||||
$exporter->export($key),
|
||||
$e->getActualAsString() ? $this->indent($e->getActualAsString()) : $exporter->shortenedExport($e->getActual())
|
||||
$e->getActualAsString() ? $this->indent($e->getActualAsString()) : $exporter->shortenedExport($e->getActual()),
|
||||
);
|
||||
|
||||
$equal = false;
|
||||
@@ -100,7 +100,7 @@ class ArrayComparator extends Comparator
|
||||
$actualAsString .= sprintf(
|
||||
" %s => %s\n",
|
||||
$exporter->export($key),
|
||||
$exporter->shortenedExport($value)
|
||||
$exporter->shortenedExport($value),
|
||||
);
|
||||
|
||||
$equal = false;
|
||||
@@ -115,7 +115,7 @@ class ArrayComparator extends Comparator
|
||||
$actual,
|
||||
$expectedAsString,
|
||||
$actualAsString,
|
||||
'Failed asserting that two arrays are equal.'
|
||||
'Failed asserting that two arrays are equal.',
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ final class DOMNodeComparator extends ObjectComparator
|
||||
$actual,
|
||||
$expectedAsString,
|
||||
$actualAsString,
|
||||
sprintf("Failed asserting that two DOM %s are equal.\n", $type)
|
||||
sprintf("Failed asserting that two DOM %s are equal.\n", $type),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ final class DateTimeComparator extends ObjectComparator
|
||||
$actual,
|
||||
$this->dateTimeToString($expected),
|
||||
$this->dateTimeToString($actual),
|
||||
'Failed asserting that two DateTime objects are equal.'
|
||||
'Failed asserting that two DateTime objects are equal.',
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ final class ExceptionComparator extends ObjectComparator
|
||||
$array['line'],
|
||||
$array['trace'],
|
||||
$array['string'],
|
||||
$array['xdebug_message']
|
||||
$array['xdebug_message'],
|
||||
);
|
||||
|
||||
return $array;
|
||||
|
||||
@@ -49,8 +49,8 @@ final class NumericComparator extends ScalarComparator
|
||||
sprintf(
|
||||
'Failed asserting that %s matches expected %s.',
|
||||
$exporter->export($actual),
|
||||
$exporter->export($expected)
|
||||
)
|
||||
$exporter->export($expected),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,8 +42,8 @@ class ObjectComparator extends ArrayComparator
|
||||
sprintf(
|
||||
'%s is not instance of expected class "%s".',
|
||||
$exporter->export($actual),
|
||||
$expected::class
|
||||
)
|
||||
$expected::class,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ class ObjectComparator extends ArrayComparator
|
||||
$delta,
|
||||
$canonicalize,
|
||||
$ignoreCase,
|
||||
$processed
|
||||
$processed,
|
||||
);
|
||||
} catch (ComparisonFailure $e) {
|
||||
throw new ComparisonFailure(
|
||||
@@ -75,7 +75,7 @@ class ObjectComparator extends ArrayComparator
|
||||
// replace "Array" with "MyClass object"
|
||||
substr_replace($e->getExpectedAsString(), $expected::class . ' Object', 0, 5),
|
||||
substr_replace($e->getActualAsString(), $actual::class . ' Object', 0, 5),
|
||||
'Failed asserting that two objects are equal.'
|
||||
'Failed asserting that two objects are equal.',
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ final class ResourceComparator extends Comparator
|
||||
$expected,
|
||||
$actual,
|
||||
$exporter->export($expected),
|
||||
$exporter->export($actual)
|
||||
$exporter->export($actual),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ class ScalarComparator extends Comparator
|
||||
$actual,
|
||||
$exporter->export($expected),
|
||||
$exporter->export($actual),
|
||||
'Failed asserting that two strings are equal.'
|
||||
'Failed asserting that two strings are equal.',
|
||||
);
|
||||
}
|
||||
|
||||
@@ -73,8 +73,8 @@ class ScalarComparator extends Comparator
|
||||
sprintf(
|
||||
'Failed asserting that %s matches expected %s.',
|
||||
$exporter->export($actual),
|
||||
$exporter->export($expected)
|
||||
)
|
||||
$exporter->export($expected),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ final class SplObjectStorageComparator extends Comparator
|
||||
$actual,
|
||||
$exporter->export($expected),
|
||||
$exporter->export($actual),
|
||||
'Failed asserting that two objects are equal.'
|
||||
'Failed asserting that two objects are equal.',
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -49,7 +49,7 @@ final class SplObjectStorageComparator extends Comparator
|
||||
$actual,
|
||||
$exporter->export($expected),
|
||||
$exporter->export($actual),
|
||||
'Failed asserting that two objects are equal.'
|
||||
'Failed asserting that two objects are equal.',
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,8 +35,8 @@ final class TypeComparator extends Comparator
|
||||
sprintf(
|
||||
'%s does not match expected type "%s".',
|
||||
(new Exporter)->shortenedExport($actual),
|
||||
gettype($expected)
|
||||
)
|
||||
gettype($expected),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user