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

Suggest STRICT_ALL_TABLES during setup. Improve dev-mode comments.

Summary: Suggest the MySQL mode STRICT_ALL_TABLES during setup if it is not set. Small improvement to the phabricator.developer-mode comments.

Test Plan: Set the global sql_mode to include or exclude STRICT_ALL_TABLES and check for desired behavior.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

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

authored by

Bryan Cuccioli and committed by
epriestley
39afb3fe 5a2be270

+16 -1
+2 -1
conf/default.conf.php
··· 801 801 // Show stack traces when unhandled exceptions occur, force reloading of 802 802 // static resources (skipping the cache), show an error callout if a page 803 803 // generated PHP errors, warnings, or notices, force disk reads when 804 - // reloading. This option should not be enabled in production. 804 + // reloading, and generally make development easier. This option should not 805 + // be enabled in production. 805 806 'phabricator.developer-mode' => false, 806 807 807 808 // When users write comments which have URIs, they'll be automatically linked
+14
src/applications/config/check/PhabricatorSetupCheckDatabase.php
··· 65 65 return; 66 66 } 67 67 68 + if (PhabricatorEnv::getEnvConfig('phabricator.developer-mode')) { 69 + $mode_string = queryfx_one($conn_raw, "SELECT @@sql_mode"); 70 + $modes = explode(',', $mode_string['@@sql_mode']); 71 + if (!in_array('STRICT_ALL_TABLES', $modes)) { 72 + $message = pht( 73 + "The global sql_mode is not set to 'STRICT_ALL_TABLES'. It is ". 74 + "recommended that you set this mode while developing Phabricator."); 75 + 76 + $this->newIssue('mysql.mode') 77 + ->setName(pht('MySQL STRICT_ALL_TABLES mode not set.')) 78 + ->setMessage($message); 79 + } 80 + } 81 + 68 82 $namespace = PhabricatorEnv::getEnvConfig('storage.default-namespace'); 69 83 70 84 $databases = queryfx_all($conn_raw, 'SHOW DATABASES');