Example:
$source_uri = '/?#';
$parsed_uri = Zend\Uri\UriFactory::factory($source_uri, 'http');
$unparsed_uri = $parsed_uri->toString();
echo $unparsed_uri; // we see '/', but must be same as source uri
It's because in Zend\Uri::toString() only host check on null. Can you fix it, please, and add check on null with other uri components? It will be more right behavior of this method.