diff --git a/src/applications/conduit/method/ConduitConnectConduitAPIMethod.php b/src/applications/conduit/method/ConduitConnectConduitAPIMethod.php index cf005eae0d..1654214cb7 100644 --- a/src/applications/conduit/method/ConduitConnectConduitAPIMethod.php +++ b/src/applications/conduit/method/ConduitConnectConduitAPIMethod.php @@ -60,7 +60,7 @@ final class ConduitConnectConduitAPIMethod extends ConduitAPIMethod { $client_version = (int)$request->getValue('clientVersion'); $client_description = (string)$request->getValue('clientDescription'); $client_description = id(new PhutilUTF8StringTruncator()) - ->setMaximumCodepoints(255) + ->setMaximumBytes(255) ->truncateString($client_description); $username = (string)$request->getValue('user'); diff --git a/src/applications/differential/parser/DifferentialCommitMessageParser.php b/src/applications/differential/parser/DifferentialCommitMessageParser.php index 18aa1ceb98..5e3c14aa34 100644 --- a/src/applications/differential/parser/DifferentialCommitMessageParser.php +++ b/src/applications/differential/parser/DifferentialCommitMessageParser.php @@ -142,7 +142,7 @@ final class DifferentialCommitMessageParser { $terminal = '...'; $title = $fields[$key_title]; $short = id(new PhutilUTF8StringTruncator()) - ->setMaximumGlyphs(250) + ->setMaximumBytes(250) ->setTerminator($terminal) ->truncateString($title); diff --git a/src/applications/harbormaster/storage/build/HarbormasterBuild.php b/src/applications/harbormaster/storage/build/HarbormasterBuild.php index 3f4295e45e..85c7d47b65 100644 --- a/src/applications/harbormaster/storage/build/HarbormasterBuild.php +++ b/src/applications/harbormaster/storage/build/HarbormasterBuild.php @@ -214,7 +214,7 @@ final class HarbormasterBuild extends HarbormasterDAO $log_type) { $log_source = id(new PhutilUTF8StringTruncator()) - ->setMaximumCodepoints(250) + ->setMaximumBytes(250) ->truncateString($log_source); $log = HarbormasterBuildLog::initializeNewBuildLog($build_target) diff --git a/src/applications/phame/conduit/PhameCreatePostConduitAPIMethod.php b/src/applications/phame/conduit/PhameCreatePostConduitAPIMethod.php index c82eac5954..2515b185cc 100644 --- a/src/applications/phame/conduit/PhameCreatePostConduitAPIMethod.php +++ b/src/applications/phame/conduit/PhameCreatePostConduitAPIMethod.php @@ -91,7 +91,7 @@ final class PhameCreatePostConduitAPIMethod extends PhameConduitAPIMethod { $phame_title = $request->getValue( 'phameTitle', id(new PhutilUTF8StringTruncator()) - ->setMaximumCodepoints(64) + ->setMaximumBytes(64) ->truncateString($title)); $post->setPhameTitle(PhabricatorSlug::normalize($phame_title)); $post->setBody($body); diff --git a/src/applications/repository/storage/PhabricatorRepositoryCommitData.php b/src/applications/repository/storage/PhabricatorRepositoryCommitData.php index bc8cc42dc2..204f153b5a 100644 --- a/src/applications/repository/storage/PhabricatorRepositoryCommitData.php +++ b/src/applications/repository/storage/PhabricatorRepositoryCommitData.php @@ -41,7 +41,7 @@ final class PhabricatorRepositoryCommitData extends PhabricatorRepositoryDAO { $summary = phutil_split_lines($message, $retain_endings = false); $summary = head($summary); $summary = id(new PhutilUTF8StringTruncator()) - ->setMaximumCodepoints(self::SUMMARY_MAX_LENGTH) + ->setMaximumBytes(self::SUMMARY_MAX_LENGTH) ->truncateString($summary); return $summary; diff --git a/src/applications/repository/worker/commitmessageparser/PhabricatorRepositoryCommitMessageParserWorker.php b/src/applications/repository/worker/commitmessageparser/PhabricatorRepositoryCommitMessageParserWorker.php index 84da0a293c..39ed2b5711 100644 --- a/src/applications/repository/worker/commitmessageparser/PhabricatorRepositoryCommitMessageParserWorker.php +++ b/src/applications/repository/worker/commitmessageparser/PhabricatorRepositoryCommitMessageParserWorker.php @@ -18,7 +18,7 @@ abstract class PhabricatorRepositoryCommitMessageParserWorker } $data->setCommitID($commit->getID()); $data->setAuthorName(id(new PhutilUTF8StringTruncator()) - ->setMaximumCodepoints(255) + ->setMaximumBytes(255) ->truncateString((string)$author)); $data->setCommitDetail('authorName', $ref->getAuthorName());