wp_list_pages get the hole hierarchy for current page

You can do it like so:

if ( ! $post->post_parent ) {
    $pages = get_pages( 'child_of=" . $post->ID );
    $pages = $pages ? wp_list_pluck( $pages, "ID' ) : '';
    $includes = $post->ID . ( $pages ? ',' . implode( ',', $pages ) : '' );
    $children = wp_list_pages( 'title_li=&include=" . $includes . "&echo=0' );
} else {
    $pages = get_post_ancestors( $post );
    $includes = $post->ID . ',' . implode( ',', $pages );
    $children = wp_list_pages( 'title_li=&include=" . $includes . "&echo=0' );
}
echo $children ? "<ul>$children</ul>" : '';

I.e. Use the include parameter.

For top-level pages (post_parent is 0), $children = wp_list_pages( 'title_li=&child_of=" . $post->ID . "&echo=0' ); works as well, but doesn’t include the parent’s markup (LI) itself unless you manually add it. And I prefer of having the markup/LI be generated by wp_list_pages().