Problem/Motivation
<?php
$graph['head']['edges']['tail'] = 1;
include_once 'core/lib/Drupal/Component/Graph/Graph.php';
$x = new Drupal\Component\Graph\Graph($graph);
var_export($x->searchAndSort());
?>
Does not include a weight for tail
. This causes problems when a full Topologically Sorted List is needed.
- FEATURE: End vertices like TAIL do not have a reversed_paths. Fixing this generates 15,045 exception(s). See Test result from #2
- module dependencies is resolved sloppily as #896698: Circular dependency references between field and field_sql_storage
- DOC: potential usage for ie #1762204: Introduce new asset declaration architecture to facilitate removal of global drupal_add_js/css() are puzzled as the documentation fails
- FEATURE: A full TSL is not available and needed for #1762204: Introduce new asset declaration architecture to facilitate removal of global drupal_add_js/css()
- It's unclear to users how to make the Graph complete. More documentation or by default done by Graph.inc?
I'm not sure we need all this but #1762204: Introduce new asset declaration architecture to facilitate removal of global drupal_add_js/css() needs a complete TSL to dump css /js
Proposed resolution
We need to add some methods to get a TSL. Current patch introduces a new class to do that.
Remaining tasks
Add more documentation, write tests.
API changes
It's an API addition, a new TopologicalSort class.