diff --git a/src/Console/Command/Diff.php b/src/Console/Command/Diff.php index 488873c31..f930a8f1d 100644 --- a/src/Console/Command/Diff.php +++ b/src/Console/Command/Diff.php @@ -353,6 +353,7 @@ private static function renderShortSummary(PharInfo $pharInfo, IO $io): void PharInfoRenderer::renderCompression($pharInfo, $io); PharInfoRenderer::renderSignature($pharInfo, $io); PharInfoRenderer::renderMetadata($pharInfo, $io); + PharInfoRenderer::renderTimestamp($pharInfo, $io); PharInfoRenderer::renderContentsSummary($pharInfo, $io); } } diff --git a/tests/Console/Command/DiffTest.php b/tests/Console/Command/DiffTest.php index ce795cf15..c5e759353 100644 --- a/tests/Console/Command/DiffTest.php +++ b/tests/Console/Command/DiffTest.php @@ -324,6 +324,7 @@ private static function commonDiffPharsProvider(DiffMode $diffMode): iterable Signature: SHA-1 Signature Hash: 9ADC09F73909EDF14F8A4ABF9758B6FFAD1BBC51 Metadata: None + Timestamp: 1552839827 (2019-03-17T16:23:47+00:00) Contents: 1 file (6.64KB) Archive: simple-phar-bar-compressed.phar @@ -332,6 +333,7 @@ private static function commonDiffPharsProvider(DiffMode $diffMode): iterable Signature: SHA-1 Signature Hash: 3A388D86C91C36659A043D52C2DEB64E8848DD1A Metadata: None + Timestamp: 1552856416 (2019-03-17T21:00:16+00:00) Contents: 1 file (6.65KB) --- PHAR A @@ -344,7 +346,9 @@ private static function commonDiffPharsProvider(DiffMode $diffMode): iterable -Signature Hash: 9ADC09F73909EDF14F8A4ABF9758B6FFAD1BBC51 +Signature Hash: 3A388D86C91C36659A043D52C2DEB64E8848DD1A Metadata: None + -Timestamp: 1552839827 (2019-03-17T16:23:47+00:00) -Contents: 1 file (6.64KB) + +Timestamp: 1552856416 (2019-03-17T21:00:16+00:00) +Contents: 1 file (6.65KB) // Comparing the two archives contents (%s diff)... @@ -375,6 +379,7 @@ private static function fileNameDiffPharsProvider(): iterable Signature: SHA-1 Signature Hash: 311080EF8E479CE18D866B744B7D467880BFBF57 Metadata: None + Timestamp: 1552839821 (2019-03-17T16:23:41+00:00) Contents: 1 file (6.64KB) Archive: simple-phar-bar.phar @@ -383,6 +388,7 @@ private static function fileNameDiffPharsProvider(): iterable Signature: SHA-1 Signature Hash: 9ADC09F73909EDF14F8A4ABF9758B6FFAD1BBC51 Metadata: None + Timestamp: 1552839827 (2019-03-17T16:23:47+00:00) Contents: 1 file (6.64KB) --- PHAR A @@ -394,6 +400,8 @@ private static function fileNameDiffPharsProvider(): iterable -Signature Hash: 311080EF8E479CE18D866B744B7D467880BFBF57 +Signature Hash: 9ADC09F73909EDF14F8A4ABF9758B6FFAD1BBC51 Metadata: None + -Timestamp: 1552839821 (2019-03-17T16:23:41+00:00) + +Timestamp: 1552839827 (2019-03-17T16:23:47+00:00) Contents: 1 file (6.64KB) // Comparing the two archives contents (file-name diff)... @@ -424,6 +432,7 @@ private static function fileNameDiffPharsProvider(): iterable Signature: SHA-1 Signature Hash: 9ADC09F73909EDF14F8A4ABF9758B6FFAD1BBC51 Metadata: None + Timestamp: 1552839827 (2019-03-17T16:23:47+00:00) Contents: 1 file (6.64KB) Archive: simple-phar-baz.phar @@ -432,6 +441,7 @@ private static function fileNameDiffPharsProvider(): iterable Signature: SHA-1 Signature Hash: 122A636B8BB0348C9514833D70281EF6306A5BF5 Metadata: None + Timestamp: 1552839693 (2019-03-17T16:21:33+00:00) Contents: 1 file (6.61KB) --- PHAR A @@ -443,7 +453,9 @@ private static function fileNameDiffPharsProvider(): iterable -Signature Hash: 9ADC09F73909EDF14F8A4ABF9758B6FFAD1BBC51 +Signature Hash: 122A636B8BB0348C9514833D70281EF6306A5BF5 Metadata: None + -Timestamp: 1552839827 (2019-03-17T16:23:47+00:00) -Contents: 1 file (6.64KB) + +Timestamp: 1552839693 (2019-03-17T16:21:33+00:00) +Contents: 1 file (6.61KB) // Comparing the two archives contents (file-name diff)... @@ -472,6 +484,7 @@ public static function gitDiffPharsProvider(): iterable Signature: SHA-1 Signature Hash: 311080EF8E479CE18D866B744B7D467880BFBF57 Metadata: None + Timestamp: 1552839821 (2019-03-17T16:23:41+00:00) Contents: 1 file (6.64KB) Archive: simple-phar-bar.phar @@ -480,6 +493,7 @@ public static function gitDiffPharsProvider(): iterable Signature: SHA-1 Signature Hash: 9ADC09F73909EDF14F8A4ABF9758B6FFAD1BBC51 Metadata: None + Timestamp: 1552839827 (2019-03-17T16:23:47+00:00) Contents: 1 file (6.64KB) --- PHAR A @@ -491,6 +505,8 @@ public static function gitDiffPharsProvider(): iterable -Signature Hash: 311080EF8E479CE18D866B744B7D467880BFBF57 +Signature Hash: 9ADC09F73909EDF14F8A4ABF9758B6FFAD1BBC51 Metadata: None + -Timestamp: 1552839821 (2019-03-17T16:23:41+00:00) + +Timestamp: 1552839827 (2019-03-17T16:23:47+00:00) Contents: 1 file (6.64KB) // Comparing the two archives contents (git diff)... @@ -517,6 +533,7 @@ public static function gitDiffPharsProvider(): iterable Signature: SHA-1 Signature Hash: 9ADC09F73909EDF14F8A4ABF9758B6FFAD1BBC51 Metadata: None + Timestamp: 1552839827 (2019-03-17T16:23:47+00:00) Contents: 1 file (6.64KB) Archive: simple-phar-baz.phar @@ -525,6 +542,7 @@ public static function gitDiffPharsProvider(): iterable Signature: SHA-1 Signature Hash: 122A636B8BB0348C9514833D70281EF6306A5BF5 Metadata: None + Timestamp: 1552839693 (2019-03-17T16:21:33+00:00) Contents: 1 file (6.61KB) --- PHAR A @@ -536,7 +554,9 @@ public static function gitDiffPharsProvider(): iterable -Signature Hash: 9ADC09F73909EDF14F8A4ABF9758B6FFAD1BBC51 +Signature Hash: 122A636B8BB0348C9514833D70281EF6306A5BF5 Metadata: None + -Timestamp: 1552839827 (2019-03-17T16:23:47+00:00) -Contents: 1 file (6.64KB) + +Timestamp: 1552839693 (2019-03-17T16:21:33+00:00) +Contents: 1 file (6.61KB) // Comparing the two archives contents (git diff)... @@ -573,6 +593,7 @@ public static function GNUDiffPharsProvider(): iterable Signature: SHA-1 Signature Hash: 311080EF8E479CE18D866B744B7D467880BFBF57 Metadata: None + Timestamp: 1552839821 (2019-03-17T16:23:41+00:00) Contents: 1 file (6.64KB) Archive: simple-phar-bar.phar @@ -581,6 +602,7 @@ public static function GNUDiffPharsProvider(): iterable Signature: SHA-1 Signature Hash: 9ADC09F73909EDF14F8A4ABF9758B6FFAD1BBC51 Metadata: None + Timestamp: 1552839827 (2019-03-17T16:23:47+00:00) Contents: 1 file (6.64KB) --- PHAR A @@ -592,6 +614,8 @@ public static function GNUDiffPharsProvider(): iterable -Signature Hash: 311080EF8E479CE18D866B744B7D467880BFBF57 +Signature Hash: 9ADC09F73909EDF14F8A4ABF9758B6FFAD1BBC51 Metadata: None + -Timestamp: 1552839821 (2019-03-17T16:23:41+00:00) + +Timestamp: 1552839827 (2019-03-17T16:23:47+00:00) Contents: 1 file (6.64KB) // Comparing the two archives contents (gnu diff)... @@ -617,6 +641,7 @@ public static function GNUDiffPharsProvider(): iterable Signature: SHA-1 Signature Hash: 9ADC09F73909EDF14F8A4ABF9758B6FFAD1BBC51 Metadata: None + Timestamp: 1552839827 (2019-03-17T16:23:47+00:00) Contents: 1 file (6.64KB) Archive: simple-phar-baz.phar @@ -625,6 +650,7 @@ public static function GNUDiffPharsProvider(): iterable Signature: SHA-1 Signature Hash: 122A636B8BB0348C9514833D70281EF6306A5BF5 Metadata: None + Timestamp: 1552839693 (2019-03-17T16:21:33+00:00) Contents: 1 file (6.61KB) --- PHAR A @@ -636,7 +662,9 @@ public static function GNUDiffPharsProvider(): iterable -Signature Hash: 9ADC09F73909EDF14F8A4ABF9758B6FFAD1BBC51 +Signature Hash: 122A636B8BB0348C9514833D70281EF6306A5BF5 Metadata: None + -Timestamp: 1552839827 (2019-03-17T16:23:47+00:00) -Contents: 1 file (6.64KB) + +Timestamp: 1552839693 (2019-03-17T16:21:33+00:00) +Contents: 1 file (6.61KB) // Comparing the two archives contents (gnu diff)... @@ -658,6 +686,7 @@ public static function GNUDiffPharsProvider(): iterable Signature: SHA-1 Signature Hash: 9ADC09F73909EDF14F8A4ABF9758B6FFAD1BBC51 Metadata: None + Timestamp: 1552839827 (2019-03-17T16:23:47+00:00) Contents: 1 file (6.64KB) Archive: simple-phar-baz.phar @@ -666,6 +695,7 @@ public static function GNUDiffPharsProvider(): iterable Signature: SHA-1 Signature Hash: 122A636B8BB0348C9514833D70281EF6306A5BF5 Metadata: None + Timestamp: 1552839693 (2019-03-17T16:21:33+00:00) Contents: 1 file (6.61KB) --- PHAR A @@ -677,7 +707,9 @@ public static function GNUDiffPharsProvider(): iterable -Signature Hash: 9ADC09F73909EDF14F8A4ABF9758B6FFAD1BBC51 +Signature Hash: 122A636B8BB0348C9514833D70281EF6306A5BF5 Metadata: None + -Timestamp: 1552839827 (2019-03-17T16:23:47+00:00) -Contents: 1 file (6.64KB) + +Timestamp: 1552839693 (2019-03-17T16:21:33+00:00) +Contents: 1 file (6.61KB) // Comparing the two archives contents (gnu diff)... @@ -720,6 +752,7 @@ public static function checksumDiffPharsProvider(): iterable Signature: SHA-1 Signature Hash: 311080EF8E479CE18D866B744B7D467880BFBF57 Metadata: None + Timestamp: 1552839821 (2019-03-17T16:23:41+00:00) Contents: 1 file (6.64KB) Archive: simple-phar-bar.phar @@ -728,6 +761,7 @@ public static function checksumDiffPharsProvider(): iterable Signature: SHA-1 Signature Hash: 9ADC09F73909EDF14F8A4ABF9758B6FFAD1BBC51 Metadata: None + Timestamp: 1552839827 (2019-03-17T16:23:47+00:00) Contents: 1 file (6.64KB) --- PHAR A @@ -739,6 +773,8 @@ public static function checksumDiffPharsProvider(): iterable -Signature Hash: 311080EF8E479CE18D866B744B7D467880BFBF57 +Signature Hash: 9ADC09F73909EDF14F8A4ABF9758B6FFAD1BBC51 Metadata: None + -Timestamp: 1552839821 (2019-03-17T16:23:41+00:00) + +Timestamp: 1552839827 (2019-03-17T16:23:47+00:00) Contents: 1 file (6.64KB) // Comparing the two archives contents (checksum diff)... @@ -769,6 +805,7 @@ public static function checksumDiffPharsProvider(): iterable Signature: SHA-1 Signature Hash: 311080EF8E479CE18D866B744B7D467880BFBF57 Metadata: None + Timestamp: 1552839821 (2019-03-17T16:23:41+00:00) Contents: 1 file (6.64KB) Archive: simple-phar-bar.phar @@ -777,6 +814,7 @@ public static function checksumDiffPharsProvider(): iterable Signature: SHA-1 Signature Hash: 9ADC09F73909EDF14F8A4ABF9758B6FFAD1BBC51 Metadata: None + Timestamp: 1552839827 (2019-03-17T16:23:47+00:00) Contents: 1 file (6.64KB) --- PHAR A @@ -788,6 +826,8 @@ public static function checksumDiffPharsProvider(): iterable -Signature Hash: 311080EF8E479CE18D866B744B7D467880BFBF57 +Signature Hash: 9ADC09F73909EDF14F8A4ABF9758B6FFAD1BBC51 Metadata: None + -Timestamp: 1552839821 (2019-03-17T16:23:41+00:00) + +Timestamp: 1552839827 (2019-03-17T16:23:47+00:00) Contents: 1 file (6.64KB) // Comparing the two archives contents (checksum diff)... @@ -818,6 +858,7 @@ public static function checksumDiffPharsProvider(): iterable Signature: SHA-1 Signature Hash: 9ADC09F73909EDF14F8A4ABF9758B6FFAD1BBC51 Metadata: None + Timestamp: 1552839827 (2019-03-17T16:23:47+00:00) Contents: 1 file (6.64KB) Archive: simple-phar-baz.phar @@ -826,6 +867,7 @@ public static function checksumDiffPharsProvider(): iterable Signature: SHA-1 Signature Hash: 122A636B8BB0348C9514833D70281EF6306A5BF5 Metadata: None + Timestamp: 1552839693 (2019-03-17T16:21:33+00:00) Contents: 1 file (6.61KB) --- PHAR A @@ -837,7 +879,9 @@ public static function checksumDiffPharsProvider(): iterable -Signature Hash: 9ADC09F73909EDF14F8A4ABF9758B6FFAD1BBC51 +Signature Hash: 122A636B8BB0348C9514833D70281EF6306A5BF5 Metadata: None + -Timestamp: 1552839827 (2019-03-17T16:23:47+00:00) -Contents: 1 file (6.64KB) + +Timestamp: 1552839693 (2019-03-17T16:21:33+00:00) +Contents: 1 file (6.61KB) // Comparing the two archives contents (checksum diff)...