@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 about missing 'fileinfo'

Summary:
See <https://github.com/facebook/phabricator/issues/320>. We have a soft dependency on 'fileinfo', which we try to recover from (with `file`) but won't be able to on Windows and apparently FreeBSD systems. Since users can ignore setup checks anyway now, just raise a warning during install.

I believe almost all installs should have this extension, it has been part of the core for a long time.

Test Plan: Faked setup failure, looked at warning. "Solved" setup failure, saw it go away.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

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

+19
+2
src/__phutil_library_map__.php
··· 1383 1383 'PhabricatorSetupCheckExtensions' => 'applications/config/check/PhabricatorSetupCheckExtensions.php', 1384 1384 'PhabricatorSetupCheckExtraConfig' => 'applications/config/check/PhabricatorSetupCheckExtraConfig.php', 1385 1385 'PhabricatorSetupCheckFacebook' => 'applications/config/check/PhabricatorSetupCheckFacebook.php', 1386 + 'PhabricatorSetupCheckFileinfo' => 'applications/config/check/PhabricatorSetupCheckFileinfo.php', 1386 1387 'PhabricatorSetupCheckGD' => 'applications/config/check/PhabricatorSetupCheckGD.php', 1387 1388 'PhabricatorSetupCheckImagemagick' => 'applications/config/check/PhabricatorSetupCheckImagemagick.php', 1388 1389 'PhabricatorSetupCheckInvalidConfig' => 'applications/config/check/PhabricatorSetupCheckInvalidConfig.php', ··· 3114 3115 'PhabricatorSetupCheckExtensions' => 'PhabricatorSetupCheck', 3115 3116 'PhabricatorSetupCheckExtraConfig' => 'PhabricatorSetupCheck', 3116 3117 'PhabricatorSetupCheckFacebook' => 'PhabricatorSetupCheck', 3118 + 'PhabricatorSetupCheckFileinfo' => 'PhabricatorSetupCheck', 3117 3119 'PhabricatorSetupCheckGD' => 'PhabricatorSetupCheck', 3118 3120 'PhabricatorSetupCheckImagemagick' => 'PhabricatorSetupCheck', 3119 3121 'PhabricatorSetupCheckInvalidConfig' => 'PhabricatorSetupCheck',
+17
src/applications/config/check/PhabricatorSetupCheckFileinfo.php
··· 1 + <?php 2 + 3 + final class PhabricatorSetupCheckFileinfo extends PhabricatorSetupCheck { 4 + 5 + protected function executeChecks() { 6 + if (!extension_loaded('fileinfo')) { 7 + $message = pht( 8 + "The 'fileinfo' extension is not installed. Without 'fileinfo', ". 9 + "support, Phabricator may not be able to determine the MIME types ". 10 + "of uploaded files."); 11 + 12 + $this->newIssue('extension.fileinfo') 13 + ->setName(pht("Missing 'fileinfo' Extension")) 14 + ->setMessage($message); 15 + } 16 + } 17 + }