Composer data update

This commit is contained in:
Clemens Schwaighofer
2022-01-06 10:01:52 +09:00
parent 4bac10bb42
commit 5452bffdb4
57 changed files with 1409 additions and 680 deletions

View File

@@ -1,3 +1,9 @@
1.15.0 / 2021/12/08
===================
* [added] Support for the `static` return type [@denis-rolling-scopes]
* [fixed] Add return types for Comparator implementations to avoid deprecation warnings from Symfony's DebugClassLoader [@stof]
1.14.0 / 2021/09/16
===================

View File

@@ -402,3 +402,10 @@ $em->flush()->shouldHaveBeenCalled();
```
Such manipulation with doubles is called spying. And with Prophecy it just works.
## FAQ
### Can I call the original methods on a prophesized class?
Prophecy does not support calling the original methods on a phrophesized class. If you find yourself needing to mock some methods of a class while calling the original version of other methods, it's likely a sign that your class violates the [single-responsibility principle](https://en.wikipedia.org/wiki/Single-responsibility_principle) and should be refactored.

View File

@@ -21,13 +21,13 @@ use SebastianBergmann\Comparator\ComparisonFailure;
*/
final class ClosureComparator extends Comparator
{
public function accepts($expected, $actual)
public function accepts($expected, $actual): bool
{
return is_object($expected) && $expected instanceof \Closure
&& is_object($actual) && $actual instanceof \Closure;
}
public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false, array &$processed = array())
public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false, array &$processed = array()): void
{
if ($expected !== $actual) {
throw new ComparisonFailure(

View File

@@ -14,14 +14,17 @@ namespace Prophecy\Comparator;
use Prophecy\Prophecy\ProphecyInterface;
use SebastianBergmann\Comparator\ObjectComparator;
/**
* @final
*/
class ProphecyComparator extends ObjectComparator
{
public function accepts($expected, $actual)
public function accepts($expected, $actual): bool
{
return is_object($expected) && is_object($actual) && $actual instanceof ProphecyInterface;
}
public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false, array &$processed = array())
public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false, array &$processed = array()): void
{
parent::assertEquals($expected, $actual->reveal(), $delta, $canonicalize, $ignoreCase, $processed);
}

View File

@@ -56,6 +56,7 @@ abstract class TypeNodeAbstract
// built in types
case 'self':
case 'static':
case 'array':
case 'callable':
case 'bool':