From 21c655b503738fab3661d63000fdbe0c8d1c324c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20FIDRY?= <5175937+theofidry@users.noreply.github.com> Date: Mon, 9 Oct 2023 23:17:59 +0200 Subject: [PATCH] feat: Show the PHAR signature in the PHAR diff command (#1042) --- src/Console/Command/Diff.php | 2 +- tests/Console/Command/DiffTest.php | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Console/Command/Diff.php b/src/Console/Command/Diff.php index fff919e9e..b06275fe9 100644 --- a/src/Console/Command/Diff.php +++ b/src/Console/Command/Diff.php @@ -251,7 +251,7 @@ private static function renderArchive(string $fileName, PharInfo $pharInfo, IO $ ); PharInfoRenderer::renderCompression($pharInfo, $io); - // Omit the signature + PharInfoRenderer::renderSignature($pharInfo, $io); PharInfoRenderer::renderMetadata($pharInfo, $io); PharInfoRenderer::renderContentsSummary($pharInfo, $io); } diff --git a/tests/Console/Command/DiffTest.php b/tests/Console/Command/DiffTest.php index da2ce50ca..f004bfbf1 100644 --- a/tests/Console/Command/DiffTest.php +++ b/tests/Console/Command/DiffTest.php @@ -346,12 +346,16 @@ static function (CommandTester $commandTester): string { Archive: simple-phar-bar.phar Archive Compression: None Files Compression: None + Signature: SHA-1 + Signature Hash: 9ADC09F73909EDF14F8A4ABF9758B6FFAD1BBC51 Metadata: None Contents: 1 file (6.64KB) Archive: simple-phar-bar-compressed.phar Archive Compression: None Files Compression: GZ + Signature: SHA-1 + Signature Hash: 3A388D86C91C36659A043D52C2DEB64E8848DD1A Metadata: None Contents: 1 file (6.65KB)