You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* 5.1: (33 commits)
[Cache] $lifetime cannot be null
[Serializer] minor cleanup
fix merge
Run PHP 8 as 7.4.99
Remove calls to deprecated ReflectionParameter::getClass().
[VarDumper] fix PHP 8 support
Removed "services" prototype node from "custom_authenticator"
Add php 8 to travis.
[Cache] Accessing undefined constants raises an Error in php8
[Cache] allow DBAL v3
Skip Doctrine DBAL on php 8 until we have a compatible version.
[DomCrawler] Catch expected ValueError.
Made method signatures compatible with their corresponding traits.
[ErrorHandler] Apply php8 fixes from Debug component.
[DomCrawler] Catch expected ValueError.
[Validator] Catch expected ValueError.
[VarDumper] ReflectionFunction::isDisabled() is deprecated.
[BrowserKit] Raw body with custom Content-Type header
Revert symfony/symfony#34986
Make ExpressionLanguageSyntax validator usable with annotation
...
// the type mismatch is not caused by invalid arguments (but e.g. by an incompatible return type hint of the writer method)
194
-
if (0 !== strpos($message, 'Argument ')) {
193
+
if (!isset($trace[$i]['file']) || __FILE__ !== $trace[$i]['file']) {
195
194
return;
196
195
}
197
196
198
-
if (isset($trace[$i]['file']) && __FILE__ === $trace[$i]['file']) {
197
+
if (\PHP_VERSION_ID < 80000) {
198
+
if (0 !== strpos($message, 'Argument ')) {
199
+
return;
200
+
}
201
+
199
202
$pos = strpos($message, $delim = 'must be of the type ') ?: (strpos($message, $delim = 'must be an instance of ') ?: strpos($message, $delim = 'must implement interface '));
if (preg_match((sprintf('/^Return value of %s::%s\(\) must be of the type (\w+), null returned$/', preg_quote(\get_class($object)), $name)), $e->getMessage(), $matches)) {
407
+
if (preg_match((sprintf('/^Return value of %s::%s\(\) must be of (?:the )?type (\w+), null returned$/', preg_quote(\get_class($object)),
4A03
$name)), $e->getMessage(), $matches)) {
399
408
thrownewUninitializedPropertyException(sprintf('The method "%s::%s()" returned "null", but expected type "%3$s". Did you forget to initialize a property or to make the return type nullable using "?%3$s"?', \get_class($object), $name, $matches[1]), 0, $e);
0 commit comments