From 8e6726c24a8e6a5db7c3dea0f6f3b17eb1064b5a Mon Sep 17 00:00:00 2001 From: oleibman <10341515+oleibman@users.noreply.github.com> Date: Thu, 9 Jan 2025 16:55:59 -0800 Subject: [PATCH] Try to Catch Up --- composer.json | 2 +- src/PhpWord/Shared/Html.php | 4 ++-- src/PhpWord/SimpleType/TextDirection.php | 1 + tests/PhpWordTests/Reader/Html/CharsetTest.php | 1 + tests/PhpWordTests/Reader/Word2007/StyleTableTest.php | 1 + tests/PhpWordTests/SettingsRtlTest.php | 1 + tests/PhpWordTests/Shared/Html2402Test.php | 1 + tests/PhpWordTests/Shared/HtmlFullTest.php | 1 + tests/PhpWordTests/Shared/HtmlHeadingsTest.php | 1 + tests/PhpWordTests/Shared/HtmlRtlTest.php | 5 +++-- tests/PhpWordTests/Shared/HtmlTest.php | 8 ++++---- tests/PhpWordTests/TemplateProcessorSectionTest.php | 1 + tests/PhpWordTests/Writer/RTF/RichTextTitleTest.php | 1 + 13 files changed, 19 insertions(+), 9 deletions(-) diff --git a/composer.json b/composer.json index efebe941e7..2d06f890b3 100644 --- a/composer.json +++ b/composer.json @@ -122,7 +122,7 @@ "phpmd/phpmd": "^2.13", "phpstan/phpstan": "^0.12.88 || ^1.0.0", "phpstan/phpstan-phpunit": "^1.0 || ^2.0", - "phpunit/phpunit": ">=7.0", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0 || ^10.0", "symfony/process": "^4.4 || ^5.0", "tecnickcom/tcpdf": "^6.5" }, diff --git a/src/PhpWord/Shared/Html.php b/src/PhpWord/Shared/Html.php index 7c2fcab0e6..81573cd83d 100644 --- a/src/PhpWord/Shared/Html.php +++ b/src/PhpWord/Shared/Html.php @@ -417,7 +417,7 @@ protected static function parseChildNodes($node, $element, $styles, $data): void * @param AbstractContainer $element * @param array &$styles * - * @return \PhpOffice\PhpWord\Element\PageBreak|\PhpOffice\PhpWord\Element\TextRun + * @return \PhpOffice\PhpWord\Element\PageBreak|TextRun */ protected static function parseParagraph($node, $element, &$styles) { @@ -590,7 +590,7 @@ protected static function parseRow($node, $element, &$styles) * @param Table $element * @param array &$styles * - * @return \PhpOffice\PhpWord\Element\Cell|\PhpOffice\PhpWord\Element\TextRun $element + * @return \PhpOffice\PhpWord\Element\Cell|TextRun $element */ protected static function parseCell($node, $element, &$styles) { diff --git a/src/PhpWord/SimpleType/TextDirection.php b/src/PhpWord/SimpleType/TextDirection.php index 0797fa9294..ab1a045337 100644 --- a/src/PhpWord/SimpleType/TextDirection.php +++ b/src/PhpWord/SimpleType/TextDirection.php @@ -1,4 +1,5 @@ addSection([ - 'orientation' => \PhpOffice\PhpWord\Style\Section::ORIENTATION_LANDSCAPE, + 'orientation' => Style\Section::ORIENTATION_LANDSCAPE, ]); // borders & backgrounds are here just for better visual comparison @@ -548,7 +548,7 @@ public function testParseTableRowHeight(): void { $phpWord = new PhpWord(); $section = $phpWord->addSection([ - 'orientation' => \PhpOffice\PhpWord\Style\Section::ORIENTATION_LANDSCAPE, + 'orientation' => Style\Section::ORIENTATION_LANDSCAPE, ]); $html = <<addSection([ - 'orientation' => \PhpOffice\PhpWord\Style\Section::ORIENTATION_LANDSCAPE, + 'orientation' => Style\Section::ORIENTATION_LANDSCAPE, ]); // borders & backgrounds are here just for better visual comparison @@ -670,7 +670,7 @@ public function testParseTableStyleAttributeInlineStyle(): void { $phpWord = new PhpWord(); $section = $phpWord->addSection([ - 'orientation' => \PhpOffice\PhpWord\Style\Section::ORIENTATION_LANDSCAPE, + 'orientation' => Style\Section::ORIENTATION_LANDSCAPE, ]); $html = ' diff --git a/tests/PhpWordTests/TemplateProcessorSectionTest.php b/tests/PhpWordTests/TemplateProcessorSectionTest.php index 0402d4fc66..a6e9d61163 100644 --- a/tests/PhpWordTests/TemplateProcessorSectionTest.php +++ b/tests/PhpWordTests/TemplateProcessorSectionTest.php @@ -1,4 +1,5 @@