Skip to content

Commit c5d5b88

Browse files
Leverage PHP8's get_debug_type()
1 parent 1b31700 commit c5d5b88

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Exception/UnexpectedTypeException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ class UnexpectedTypeException extends InvalidArgumentException
2020
{
2121
public function __construct($value, string $expectedType)
2222
{
23-
parent::__construct(sprintf('Expected argument of type "%s", "%s" given', $expectedType, \is_object($value) ? \get_class($value) : \gettype($value)));
23+
parent::__construct(sprintf('Expected argument of type "%s", "%s" given', $expectedType, get_debug_type($value)));
2424
}
2525
}

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
],
2626
"require": {
2727
"php": "^7.2.5",
28-
"symfony/polyfill-intl-icu": "~1.0"
28+
"symfony/polyfill-intl-icu": "~1.0",
29+
"symfony/polyfill-php80": "^1.15"
2930
},
3031
"require-dev": {
3132
"symfony/filesystem": "^4.4|^5.0"

0 commit comments

Comments
 (0)