#11139 fixing B/C break: replaced spl_object_hash($object) with spl_object_hash($classMetadata)