Skip to content

Commit a85aa74

Browse files
Closes #5577
1 parent 6a66322 commit a85aa74

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed

ChangeLog-8.5.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
All notable changes of the PHPUnit 8.5 release series are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles.
44

5+
## [8.5.35] - 2023-MM-DD
6+
7+
### Added
8+
9+
* [#5577](https://github.com/sebastianbergmann/phpunit/issues/5577): `--composer-lock` CLI option for PHAR binary that displays the `composer.lock` used to build the PHAR
10+
511
## [8.5.34] - 2023-09-19
612

713
### Changed
@@ -274,6 +280,7 @@ All notable changes of the PHPUnit 8.5 release series are documented in this fil
274280
* [#3967](https://github.com/sebastianbergmann/phpunit/issues/3967): Cannot double interface that extends interface that extends `\Throwable`
275281
* [#3968](https://github.com/sebastianbergmann/phpunit/pull/3968): Test class run in a separate PHP process are passing when `exit` called inside
276282

283+
[8.5.35]: https://github.com/sebastianbergmann/phpunit/compare/8.5.34...8.5
277284
[8.5.34]: https://github.com/sebastianbergmann/phpunit/compare/8.5.33...8.5.34
278285
[8.5.33]: https://github.com/sebastianbergmann/phpunit/compare/8.5.32...8.5.33
279286
[8.5.32]: https://github.com/sebastianbergmann/phpunit/compare/8.5.31...8.5.32

build.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,8 @@
154154

155155
<copy file="${basedir}/phpunit.xsd" tofile="${basedir}/build/tmp/phar/phpunit.xsd"/>
156156

157+
<copy file="${basedir}/composer.lock" tofile="${basedir}/build/tmp/phar/composer.lock"/>
158+
157159
<exec executable="${basedir}/build/scripts/phar-manifest.php" failonerror="true">
158160
<arg path="${basedir}/build/tmp/phar/manifest.txt"/>
159161
<arg path="${basedir}/build/tmp/phar/sbom.xml"/>

build/templates/binary-phar-autoload.php.in

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,15 @@ if (__FILE__ === realpath($_SERVER['SCRIPT_NAME'])) {
5252
$execute = false;
5353
}
5454

55-
$options = getopt('', array('prepend:', 'manifest', 'sbom'));
55+
$options = getopt('', array('prepend:', 'composer-lock', 'manifest', 'sbom'));
5656

5757
if (isset($options['prepend'])) {
5858
require $options['prepend'];
5959
}
6060

61-
if (isset($options['manifest'])) {
61+
if (isset($options['composer-lock'])) {
62+
$printComposerLock = true;
63+
} elseif (isset($options['manifest'])) {
6264
$printManifest = true;
6365
} elseif (isset($options['sbom'])) {
6466
$printSbom = true;
@@ -92,6 +94,12 @@ foreach ([___CLASSLIST___] as $file) {
9294
}
9395

9496
if ($execute) {
97+
if (isset($printComposerLock)) {
98+
print file_get_contents(__PHPUNIT_PHAR_ROOT__ . '/composer.lock');
99+
100+
exit;
101+
}
102+
95103
if (isset($printManifest)) {
96104
print file_get_contents(__PHPUNIT_PHAR_ROOT__ . '/manifest.txt');
97105

0 commit comments

Comments
 (0)