Correct Aphlict websocket URI construction after PHP8 compatibility changes
[phabricator.git] / src / applications / owners / query / PhabricatorOwnerPathQuery.php
blob7b928b0d355ce3a488d46edf541a4e4eda77a6ee
1 <?php
3 final class PhabricatorOwnerPathQuery extends Phobject {
5 public static function loadAffectedPaths(
6 PhabricatorRepository $repository,
7 PhabricatorRepositoryCommit $commit,
8 PhabricatorUser $user) {
10 $drequest = DiffusionRequest::newFromDictionary(
11 array(
12 'user' => $user,
13 'repository' => $repository,
14 'commit' => $commit->getCommitIdentifier(),
15 ));
17 $path_query = DiffusionPathChangeQuery::newFromDiffusionRequest(
18 $drequest);
19 $paths = $path_query->loadChanges();
21 $result = array();
22 foreach ($paths as $path) {
23 $basic_path = '/'.$path->getPath();
24 if ($path->getFileType() == DifferentialChangeType::FILE_DIRECTORY) {
25 $basic_path = rtrim($basic_path, '/').'/';
27 $result[] = $basic_path;
29 return $result;