Skip to content

Commit

Permalink
Merge branch '8.5' into 9.6
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Nov 27, 2023
2 parents 5dafcd8 + a85aa74 commit c176b1f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
7 changes: 7 additions & 0 deletions ChangeLog-9.6.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

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

## [9.6.14] - 2023-MM-DD

### Added

* [#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

## [9.6.13] - 2023-09-19

### Changed
Expand Down Expand Up @@ -95,6 +101,7 @@ All notable changes of the PHPUnit 9.6 release series are documented in this fil
* [#5064](https://github.com/sebastianbergmann/phpunit/issues/5064): Deprecate `PHPUnit\Framework\TestCase::getMockClass()`
* [#5132](https://github.com/sebastianbergmann/phpunit/issues/5132): Deprecate `Test` suffix for abstract test case classes

[9.6.14]: https://github.com/sebastianbergmann/phpunit/compare/9.6.13...9.6
[9.6.13]: https://github.com/sebastianbergmann/phpunit/compare/9.6.12...9.6.13
[9.6.12]: https://github.com/sebastianbergmann/phpunit/compare/9.6.11...9.6.12
[9.6.11]: https://github.com/sebastianbergmann/phpunit/compare/9.6.10...9.6.11
Expand Down
2 changes: 2 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@
</fileset>
</copy>

<copy file="${basedir}/composer.lock" tofile="${basedir}/build/tmp/phar/composer.lock"/>

<exec executable="${basedir}/build/scripts/phar-manifest.php" failonerror="true">
<arg path="${basedir}/build/tmp/phar/manifest.txt"/>
<arg path="${basedir}/build/tmp/phar/sbom.xml"/>
Expand Down
12 changes: 10 additions & 2 deletions build/templates/binary-phar-autoload.php.in
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,15 @@ if (__FILE__ === realpath($_SERVER['SCRIPT_NAME'])) {
$execute = false;
}

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

if (isset($options['prepend'])) {
require $options['prepend'];
}

if (isset($options['manifest'])) {
if (isset($options['composer-lock'])) {
$printComposerLock = true;
} elseif (isset($options['manifest'])) {
$printManifest = true;
} elseif (isset($options['sbom'])) {
$printSbom = true;
Expand Down Expand Up @@ -103,6 +105,12 @@ foreach ([___CLASSLIST___] as $file) {
require __PHPUNIT_PHAR_ROOT__ . '/phpunit/Framework/Assert/Functions.php';

if ($execute) {
if (isset($printComposerLock)) {
print file_get_contents(__PHPUNIT_PHAR_ROOT__ . '/composer.lock');

exit;
}

if (isset($printManifest)) {
print file_get_contents(__PHPUNIT_PHAR_ROOT__ . '/manifest.txt');

Expand Down

0 comments on commit c176b1f

Please sign in to comment.