Skip to content

Commit 87b0ef8

Browse files
author
epriestley
committedJan 31, 2019
Remove "iconv" PHP extension dependency
Summary: Depends on D20069. Ref T13232. This is a very, very weak dependency and we can reasonably polyfill it. Test Plan: Grepped for `iconv` in libphutil, arcanist, and Phabricator. Reviewers: amckinley Reviewed By: amckinley Maniphest Tasks: T13232 Differential Revision: https://secure.phabricator.com/D20070
1 parent 48a3760 commit 87b0ef8

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed
 

‎scripts/mail/mail_handler.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@
5555
}
5656

5757
$headers = $parser->getHeaders();
58-
$headers['subject'] = iconv_mime_decode($headers['subject'], 0, 'UTF-8');
59-
$headers['from'] = iconv_mime_decode($headers['from'], 0, 'UTF-8');
58+
$headers['subject'] = phutil_decode_mime_header($headers['subject']);
59+
$headers['from'] = phutil_decode_mime_header($headers['from']);
6060

6161
if ($args->getArg('process-duplicates')) {
6262
$headers['message-id'] = Filesystem::readRandomCharacters(64);

‎src/applications/config/check/PhabricatorExtensionsSetupCheck.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,13 @@ public function isPreflightCheck() {
1111
}
1212

1313
protected function executeChecks() {
14-
// TODO: Make 'mbstring' and 'iconv' soft requirements.
14+
// TODO: Make 'mbstring' a soft requirement.
1515

1616
$required = array(
1717
'hash',
1818
'json',
1919
'openssl',
2020
'mbstring',
21-
'iconv',
2221
'ctype',
2322

2423
// There is a tiny chance we might not need this, but a significant

‎src/applications/config/controller/PhabricatorConfigVersionController.php

+2
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ public function renderModuleStatus($viewer) {
6363
$version_from_file);
6464
}
6565

66+
$version_property_list->addProperty('php', phpversion());
67+
6668
$binaries = PhutilBinaryAnalyzer::getAllBinaries();
6769
foreach ($binaries as $binary) {
6870
if (!$binary->isBinaryAvailable()) {

0 commit comments

Comments
 (0)
Failed to load comments.