From 9977b41d95dad522f6e50b8edab0ff3a73fba0dd Mon Sep 17 00:00:00 2001 From: Alexandre Tranchant Date: Fri, 4 Sep 2026 18:57:21 +0200 Subject: [PATCH 1/2] chore: Update copyright information and remove outdated project references --- lib/LongitudeOne/Core/Enum/AxisEnum.php | 9 --------- lib/LongitudeOne/Core/Exception/ExceptionInterface.php | 9 --------- lib/LongitudeOne/Core/Exception/RangeException.php | 9 --------- 3 files changed, 27 deletions(-) diff --git a/lib/LongitudeOne/Core/Enum/AxisEnum.php b/lib/LongitudeOne/Core/Enum/AxisEnum.php index ead644a..3cbbf1d 100644 --- a/lib/LongitudeOne/Core/Enum/AxisEnum.php +++ b/lib/LongitudeOne/Core/Enum/AxisEnum.php @@ -11,15 +11,6 @@ declare(strict_types=1); -/** - * This file is part of the LongitudeOne GeoParser project. - * - * PHP 8.3 | 8.4 | 8.5 - * - * Copyright LongitudeOne - Alexandre Tranchant - Derek J. Lambert. - * Copyright 2024-2026. - */ - namespace LongitudeOne\Core\Enum; /** diff --git a/lib/LongitudeOne/Core/Exception/ExceptionInterface.php b/lib/LongitudeOne/Core/Exception/ExceptionInterface.php index 4361d03..0670c11 100644 --- a/lib/LongitudeOne/Core/Exception/ExceptionInterface.php +++ b/lib/LongitudeOne/Core/Exception/ExceptionInterface.php @@ -11,15 +11,6 @@ declare(strict_types=1); -/** - * This file is part of the LongitudeOne GeoParser project. - * - * PHP 8.3 | 8.4 | 8.5 - * - * Copyright LongitudeOne - Alexandre Tranchant - Derek J. Lambert. - * Copyright 2024-2026. - */ - namespace LongitudeOne\Core\Exception; /** diff --git a/lib/LongitudeOne/Core/Exception/RangeException.php b/lib/LongitudeOne/Core/Exception/RangeException.php index 810044b..f82b1a2 100644 --- a/lib/LongitudeOne/Core/Exception/RangeException.php +++ b/lib/LongitudeOne/Core/Exception/RangeException.php @@ -11,15 +11,6 @@ declare(strict_types=1); -/** - * This file is part of the LongitudeOne GeoParser project. - * - * PHP 8.3 | 8.4 | 8.5 - * - * Copyright LongitudeOne - Alexandre Tranchant - Derek J. Lambert. - * Copyright 2024-2026. - */ - namespace LongitudeOne\Core\Exception; use LongitudeOne\Core\Diagnostic\DiagnosticValueFormatter; From fcb98fb87b64e62c2b527b53b663a5edab8eb496 Mon Sep 17 00:00:00 2001 From: Alexandre Tranchant Date: Fri, 4 Sep 2026 19:06:09 +0200 Subject: [PATCH 2/2] test: Update tests to handle malformed UTF-8 bytes and adjust expected output --- .../Diagnostic/DiagnosticValueFormatterContractTest.php | 4 ++-- .../Tests/Unit/Diagnostic/DiagnosticValueFormatterTest.php | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/LongitudeOne/Core/Tests/Contract/Diagnostic/DiagnosticValueFormatterContractTest.php b/tests/LongitudeOne/Core/Tests/Contract/Diagnostic/DiagnosticValueFormatterContractTest.php index 6b24014..2392345 100644 --- a/tests/LongitudeOne/Core/Tests/Contract/Diagnostic/DiagnosticValueFormatterContractTest.php +++ b/tests/LongitudeOne/Core/Tests/Contract/Diagnostic/DiagnosticValueFormatterContractTest.php @@ -110,10 +110,10 @@ public function testFormattingIsIdempotent(): void */ public function testHostileCombinedInputRespectsEveryProtection(): void { - $value = str_repeat("POINT(1 2)\n\x1B[2J\u{202E}", self::MAX_EXPECTED_LENGTH); + $value = str_repeat("POINT(1 2)\xC3\n\x1B[2J\u{202E}", self::MAX_EXPECTED_LENGTH); $result = DiagnosticValueFormatter::format($value); - self::assertStringContainsString('POINT(1 2)\n\u{001B}[2J\u{202E}', $result); + self::assertStringContainsString('POINT(1 2)\xC3\n\u{001B}[2J\u{202E}', $result); self::assertStringNotContainsString("\x1B", $result); self::assertStringEndsWith('…', $result); $this->assertDiagnosticInvariants($result); diff --git a/tests/LongitudeOne/Core/Tests/Unit/Diagnostic/DiagnosticValueFormatterTest.php b/tests/LongitudeOne/Core/Tests/Unit/Diagnostic/DiagnosticValueFormatterTest.php index d5c8e91..44d2e7a 100644 --- a/tests/LongitudeOne/Core/Tests/Unit/Diagnostic/DiagnosticValueFormatterTest.php +++ b/tests/LongitudeOne/Core/Tests/Unit/Diagnostic/DiagnosticValueFormatterTest.php @@ -90,5 +90,7 @@ public static function oversizedValues(): iterable yield 'plain characters' => [str_repeat('a', DiagnosticValueFormatter::MAX_LENGTH + 1)]; yield 'expanding newlines' => [str_repeat("\n", DiagnosticValueFormatter::MAX_LENGTH)]; + + yield 'malformed UTF-8 bytes' => [str_repeat("\xFF", DiagnosticValueFormatter::MAX_LENGTH)]; } }