-
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
db0e05e
commit 5f364b9
Showing
27 changed files
with
317 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
.* export-ignore | ||
patches export-ignore | ||
tests export-ignore | ||
infection.json export-ignore | ||
Makefile export-ignore | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: Test OS | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
test-windows: | ||
name: Windows | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install PHP with extensions | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.2 | ||
tools: composer:v2 | ||
ini-file: development | ||
|
||
- name: Apply patch | ||
run: composer config extra.patches.symfony/console --json --merge '["patches/Table.patch"]' | ||
shell: bash | ||
|
||
- name: Install Composer dependencies | ||
uses: ramsey/composer-install@v2 | ||
with: | ||
dependency-versions: highest | ||
composer-options: --prefer-dist --prefer-stable | ||
|
||
- name: Run tests with PHPUnit | ||
run: vendor/bin/phpunit --exclude-group=skip-windows | ||
|
||
test-macos: | ||
name: Mac OS | ||
runs-on: macos-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install PHP with extensions | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.2 | ||
tools: composer:v2 | ||
ini-file: development | ||
|
||
- name: Install Composer dependencies | ||
uses: ramsey/composer-install@v2 | ||
with: | ||
dependency-versions: highest | ||
composer-options: --prefer-dist --prefer-stable | ||
|
||
- name: Run tests with PHPUnit | ||
run: vendor/bin/phpunit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- a/vendor/symfony/console/Helper/Table.php 2024-01-23 16:02:46 | ||
+++ b/vendor/symfony/console/Helper/Table.php 2024-02-19 21:36:41 | ||
@@ -361,7 +361,8 @@ | ||
for ($i = 0; $i < $maxRows; ++$i) { | ||
$cell = (string) ($row[$i] ?? ''); | ||
|
||
- $parts = explode("\n", $cell); | ||
+ $eol = str_contains($cell, "\r\n") ? "\r\n" : "\n"; | ||
+ $parts = explode($eol, $cell); | ||
foreach ($parts as $idx => $part) { | ||
if ($headers && !$containsColspan) { | ||
if (0 === $idx) { | ||
@@ -632,9 +633,10 @@ | ||
if (!str_contains($cell ?? '', "\n")) { | ||
continue; | ||
} | ||
- $escaped = implode("\n", array_map(OutputFormatter::escapeTrailingBackslash(...), explode("\n", $cell))); | ||
+ $eol = str_contains($cell, "\r\n") ? "\r\n" : "\n"; | ||
+ $escaped = implode($eol, array_map(OutputFormatter::escapeTrailingBackslash(...), explode($eol, $cell))); | ||
$cell = $cell instanceof TableCell ? new TableCell($escaped, ['colspan' => $cell->getColspan()]) : $escaped; | ||
- $lines = explode("\n", str_replace("\n", "<fg=default;bg=default></>\n", $cell)); | ||
+ $lines = explode($eol, str_replace($eol, "<fg=default;bg=default></>".$eol, $cell)); | ||
foreach ($lines as $lineKey => $line) { | ||
if ($colspan > 1) { | ||
$line = new TableCell($line, ['colspan' => $colspan]); | ||
@@ -696,8 +698,9 @@ | ||
$nbLines = $cell->getRowspan() - 1; | ||
$lines = [$cell]; | ||
if (str_contains($cell, "\n")) { | ||
- $lines = explode("\n", str_replace("\n", "<fg=default;bg=default>\n</>", $cell)); | ||
- $nbLines = \count($lines) > $nbLines ? substr_count($cell, "\n") : $nbLines; | ||
+ $eol = str_contains($cell, "\r\n") ? "\r\n" : "\n"; | ||
+ $lines = explode($eol, str_replace($eol, "<fg=default;bg=default>".$eol."</>", $cell)); | ||
+ $nbLines = \count($lines) > $nbLines ? substr_count($cell, $eol) : $nbLines; | ||
|
||
$rows[$line][$column] = new TableCell($lines[0], ['colspan' => $cell->getColspan(), 'style' => $cell->getStyle()]); | ||
unset($lines[0]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.