Correct Aphlict websocket URI construction after PHP8 compatibility changes
[phabricator.git] / src / applications / notification / setup / PhabricatorAphlictSetupCheck.php
blob20787c79bda210d0b71bc810d05c0da7e334055f
1 <?php
3 final class PhabricatorAphlictSetupCheck extends PhabricatorSetupCheck {
5 protected function executeChecks() {
6 try {
7 PhabricatorNotificationClient::tryAnyConnection();
8 } catch (Exception $ex) {
9 $message = pht(
10 "This server is configured to use a notification server, but is ".
11 "unable to connect to it. You should resolve this issue or disable ".
12 "the notification server. It may be helpful to double check your ".
13 "configuration or restart the server using the command below.\n\n%s",
14 phutil_tag(
15 'pre',
16 array(),
17 array(
18 get_class($ex),
19 "\n",
20 $ex->getMessage(),
21 )));
24 $this->newIssue('aphlict.connect')
25 ->setShortName(pht('Notification Server Down'))
26 ->setName(pht('Unable to Connect to Notification Server'))
27 ->setSummary(
28 pht(
29 'This server is configured to use a notification server, '.
30 'but is not able to connect to it.'))
31 ->setMessage($message)
32 ->addRelatedPhabricatorConfig('notification.servers')
33 ->addCommand(
34 pht(
35 "(To start the server, run this command.)\n%s",
36 '$ ./bin/aphlict start'));
38 return;