1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-13 10:22:42 +01:00
phorge-phorge/src/applications/config/check/PhabricatorSetupCheckFileinfo.php
epriestley 1898a540d8 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
2013-05-17 10:00:40 -07:00

17 lines
511 B
PHP

<?php
final class PhabricatorSetupCheckFileinfo extends PhabricatorSetupCheck {
protected function executeChecks() {
if (!extension_loaded('fileinfo')) {
$message = pht(
"The 'fileinfo' extension is not installed. Without 'fileinfo', ".
"support, Phabricator may not be able to determine the MIME types ".
"of uploaded files.");
$this->newIssue('extension.fileinfo')
->setName(pht("Missing 'fileinfo' Extension"))
->setMessage($message);
}
}
}