In #6867 doctrine deprecates setPrimaryKey, and says we should use addPrimaryKeyConstraint instead.
Usage of setPrimaryKey was:
$table->setPrimaryKey(['id']);
However, addPrimaryKeyConstraint requires a PrimaryKeyConstraint object, not an string[], like previously.
I could not find references to how are we supposed to use this new functionality and the upgrade docs do not mention it.