DateTime type issues strike back...
https://psalm.dev/r/09e238bf00
I expect $foo2 to be of type Subclass and indeed, according to PHP it is:
https://3v4l.org/j9ZSo
I agree that the PHP manual disagrees, so that should probably be raised on the php internals list too, but seeing how big a BC break it would be for PHP to change this behavior, I assume that this is a doc bug, not a language issue.