Skip to content

Conversation

@clue
Copy link
Member

@clue clue commented Jan 20, 2020

Destroying a Vertex or Edge will no longer leave an object in an invalid
state but will instead return a new graph without the given entity. Also
add Graph::withoutVertices() and Graph::withoutEdges() to remove
multiple entities at once.

Accordingly, Walk::isValid() has been removed as it would always return
true.

// old
$vertex->destroy();
$edges->destroy();

// new
$graph = $graph->withoutVertex($vertex);
$graph = $graph->withoutEdge($edge);

Builds on top of #188

Destroying a Vertex or Edge will no longer leave an object in an invalid
state but will instead return a new graph without the given entity. Also
add Graph::withoutVertices() and Graph::withoutEdges() to remove
multiple entities at once.

Accordingly, Walk::isValid() has been removed as it would always return
true.
@clue clue added this to the v1.0.0 milestone Jan 20, 2020
@clue clue merged commit 0d78233 into graphp:master Jan 20, 2020
@clue clue deleted the without branch January 20, 2020 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant