@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.)
hq.recaptime.dev/wiki/Phorge
phorge
phabricator
1<?php
2
3echo pht('Migrating differential dependencies to edges...')."\n";
4$table = new DifferentialRevision();
5$table->openTransaction();
6
7foreach (new LiskMigrationIterator($table) as $rev) {
8 $id = $rev->getID();
9 echo pht('Revision %d: ', $id);
10
11 $deps = $rev->getAttachedPHIDs(DifferentialRevisionPHIDType::TYPECONST);
12 if (!$deps) {
13 echo "-\n";
14 continue;
15 }
16
17 $editor = new PhabricatorEdgeEditor();
18 foreach ($deps as $dep) {
19 $editor->addEdge(
20 $rev->getPHID(),
21 DifferentialRevisionDependsOnRevisionEdgeType::EDGECONST,
22 $dep);
23 }
24 $editor->save();
25 echo pht('OKAY')."\n";
26}
27
28$table->saveTransaction();
29echo pht('Done.')."\n";