Skip to content

Commit

Permalink
Merge branch '5.4' into 6.2
Browse files Browse the repository at this point in the history
* 5.4:
  [Console] Fix computing column width containing multibyte chars
  [Messenger] Fix deprecation layer of RedeliveryStamp
  [Mime] Form field values with integer keys not resolved correctly
  [Messenger] [Redis] Fixed problem where worker stops handling messages on first empty message
  [PHPUnitBridge] Fix PHPUnit 10.1 compatibility
  [VarDumper] Make the server TCP connection sync
  [Messenger] Fix warning message on failed messenger show command
  [Mailer] [Mailjet] Use body MessageID instead of X-MJ-Request-GUID
  [HttpFoundation] Fix BinaryFileResponse
  [Form] fix merge
  [HttpFoundation] Fix memory limit problems in BinaryFileResponse
  [PropertyAccess] Readonly properties must have no PropertyWriteInfo
  [Form] Cast choices value callback result to string
  [Serializer] Unexpected value should throw UnexpectedValueException
  [ErrorHandler] Don't throw deprecations for HttplugClient
  [Serializer] Fix denormalization of object with typed constructor arg (not castable) and with COLLECT_DENORMALIZATION_ERRORS
  Avoid leading .. for temporary files from Filesystem recursive remove
  • Loading branch information
nicolas-grekas committed Apr 18, 2023
2 parents 77309f7 + 9f16d3e commit 28c5c2e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Helper/Table.php
Original file line number Diff line number Diff line change
Expand Up @@ -804,7 +804,7 @@ private function calculateColumnsWidth(iterable $groups)
$textContent = Helper::removeDecoration($this->output->getFormatter(), $cell);
$textLength = Helper::width($textContent);
if ($textLength > 0) {
$contentColumns = str_split($textContent, ceil($textLength / $cell->getColspan()));
$contentColumns = mb_str_split($textContent, ceil($textLength / $cell->getColspan()));
foreach ($contentColumns as $position => $content) {
$row[$i + $position] = $content;
}
Expand Down
4 changes: 2 additions & 2 deletions Tests/Helper/TableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ public static function renderProvider()
],
new TableSeparator(),
[
new TableCell('Cupiditate dicta atque porro, tempora exercitationem modi animi nulla nemo vel nihil!', ['colspan' => 3]),
new TableCell('Cupìdĭtâte díctá âtquè pôrrò, tèmpórà exercitátìónèm mòdí ânìmí núllà nèmò vèl níhìl!', ['colspan' => 3]),
],
],
'default',
Expand All @@ -333,7 +333,7 @@ public static function renderProvider()
| 9971-5-0210-0 | A Tale of |
| | Two Cities |
+-------------------------------+-------------------------------+-----------------------------+
| Cupiditate dicta atque porro, tempora exercitationem modi animi nulla nemo vel nihil! |
| Cupìdĭtâte díctá âtquè pôrrò, tèmpórà exercitátìónèm mòdí ânìmí núllà nèmò vèl níhìl! |
+-------------------------------+-------------------------------+-----------------------------+

TABLE
Expand Down

0 comments on commit 28c5c2e

Please sign in to comment.