@@ -249,7 +249,7 @@ class PropertyAccessor implements PropertyAccessorInterface
...
@@ -249,7 +249,7 @@ class PropertyAccessor implements PropertyAccessorInterface
}
}
if(\PHP_VERSION_ID<80000){
if(\PHP_VERSION_ID<80000){
if(0!==strpos($message,'Argument ')){
if(!str_starts_with($message,'Argument ')){
return;
return;
}
}
...
@@ -466,7 +466,7 @@ class PropertyAccessor implements PropertyAccessorInterface
...
@@ -466,7 +466,7 @@ class PropertyAccessor implements PropertyAccessorInterface
&&$objectinstanceof$trace['class']
&&$objectinstanceof$trace['class']
&&preg_match('/Return value (?:of .*::\w+\(\) )?must be of (?:the )?type (\w+), null returned$/',$e->getMessage(),$matches)
&&preg_match('/Return value (?:of .*::\w+\(\) )?must be of (?:the )?type (\w+), null returned$/',$e->getMessage(),$matches)
){
){
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"?',false===strpos(\get_class($object),"@anonymous\0")?\get_class($object):(get_parent_class($object)?:key(class_implements($object))?:'class').'@anonymous',$name,$matches[1]),0,$e);
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"?',!str_contains(\get_class($object),"@anonymous\0")?\get_class($object):(get_parent_class($object)?:key(class_implements($object))?:'class').'@anonymous',$name,$matches[1]),0,$e);
}
}
throw$e;
throw$e;
...
@@ -630,7 +630,7 @@ class PropertyAccessor implements PropertyAccessorInterface
...
@@ -630,7 +630,7 @@ class PropertyAccessor implements PropertyAccessorInterface