This library converts Drupal URL objects to PSR-13 compliant link objects.
It can be used to pass links generated by Drupal to a PSR-13 library like Symfony WebLink.
// Create a link object from a Drupal URL
$link = new \DrupalLinkPsr\Link(
\Drupal\Core\Url::fromUri('https://example.com/')
);
// Get an array of attributes
$link->getAttributes();
// Get the URL
$link->getHref();