DDC-327: All asserts in DBAL Schema have to implement __clone() #406

Closed
opened 2026-01-22 12:37:19 +01:00 by admin · 2 comments
Owner

Originally created by @doctrinebot on GitHub (Feb 13, 2010).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user @beberlei:

In a scenario where you want to diff the currenet schema against a slightly changed schema the following workflow is necessary:

$oldSchema = $sm->createSchema();
$newSchema = (clone)$oldSchema;
$newSchema->createTable(...);

$c = new Comparator();
$diff = $c->compare($oldSchema, $newSchema);
$diff->toSql($platform);

This only works if clone creates a deep copy of the schema.

Originally created by @doctrinebot on GitHub (Feb 13, 2010). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user @beberlei: In a scenario where you want to diff the currenet schema against a slightly changed schema the following workflow is necessary: ``` $oldSchema = $sm->createSchema(); $newSchema = (clone)$oldSchema; $newSchema->createTable(...); $c = new Comparator(); $diff = $c->compare($oldSchema, $newSchema); $diff->toSql($platform); ``` This only works if clone creates a deep copy of the schema.
admin added the Bug label 2026-01-22 12:37:19 +01:00
admin closed this issue 2026-01-22 12:37:19 +01:00
Author
Owner

@doctrinebot commented on GitHub (Feb 13, 2010):

Comment created by @beberlei:

Fixed

@doctrinebot commented on GitHub (Feb 13, 2010): Comment created by @beberlei: Fixed
Author
Owner

@doctrinebot commented on GitHub (Feb 13, 2010):

Issue was closed with resolution "Fixed"

@doctrinebot commented on GitHub (Feb 13, 2010): Issue was closed with resolution "Fixed"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#406