@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
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add a setup warning for port in `mysql.host`

Summary:
A pull from GitHub recently added `mysql.port`, for explicitly configuring the MySQL port. See:

- https://github.com/facebook/libphutil/pull/27
- https://github.com/facebook/phabricator/pull/356

Add a setup warning for old-style configurations (which will still work properly), to get them to move to the new style.

Test Plan: {F50113}

Reviewers: btrahan, chad

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D6449

+32 -1
+1 -1
conf/default.conf.php
··· 174 174 'mysql.host' => 'localhost', 175 175 176 176 // If you want to connect to a different port than the default (which is 3306) 177 - 'mysql.port' => '3306', 177 + 'mysql.port' => null, 178 178 179 179 // Phabricator supports PHP extensions MySQL and MySQLi. It is possible to 180 180 // implement also other access mechanism (e.g. PDO_MySQL). The class must
+31
src/applications/config/check/PhabricatorSetupCheckDatabase.php
··· 107 107 hsprintf('<tt>phabricator/ $</tt> ./bin/storage upgrade')); 108 108 } 109 109 } 110 + 111 + 112 + $host = PhabricatorEnv::getEnvConfig('mysql.host'); 113 + $matches = null; 114 + if (preg_match('/^([^:]+):(\d+)$/', $host, $matches)) { 115 + $host = $matches[1]; 116 + $port = $matches[2]; 117 + 118 + $this->newIssue('storage.mysql.hostport') 119 + ->setName(pht('Deprecated mysql.host Format')) 120 + ->setSummary( 121 + pht( 122 + 'Move port information from `mysql.host` to `mysql.port` in your '. 123 + 'config.')) 124 + ->setMessage( 125 + pht( 126 + 'Your `mysql.host` configuration contains a port number, but '. 127 + 'this usage is deprecated. Instead, put the port number in '. 128 + '`mysql.port`.')) 129 + ->addPhabricatorConfig('mysql.host') 130 + ->addPhabricatorConfig('mysql.port') 131 + ->addCommand( 132 + hsprintf( 133 + '<tt>phabricator/ $</tt> ./bin/config set mysql.host %s', 134 + $host)) 135 + ->addCommand( 136 + hsprintf( 137 + '<tt>phabricator/ $</tt> ./bin/config set mysql.port %s', 138 + $port)); 139 + } 140 + 110 141 } 111 142 }