Skip to content

AssertClosedResource: fix compatibility with PHPUnit 8/9 PHAR files#161

Merged
jrfnl merged 1 commit into
1.xfrom
feature/support-phpunit-8.5.38-9.6.19
Apr 5, 2024
Merged

AssertClosedResource: fix compatibility with PHPUnit 8/9 PHAR files#161
jrfnl merged 1 commit into
1.xfrom
feature/support-phpunit-8.5.38-9.6.19

Conversation

@jrfnl

@jrfnl jrfnl commented Apr 5, 2024

Copy link
Copy Markdown
Collaborator

PHPUnit 8.5.38 and 9.6.19 contain a change in the PHAR files. In particular, a change in how external dependencies included in the packaged PHAR files are prefixed to prevent conflicts with potentially Composer installed dependencies on the same packages.

In practice, the prefix for these external dependencies which is being added when the PHAR is being build has changed from PHPUnit\\ to PHPUnitPHAR\\.

This impacts the AssertClosedResource polyfill which uses the SebastianBergmann\Exporter\Exporter class from the external Exporter dependency.

This commit fixes the issue.

Refs:

PHPUnit 8.5..38 and 9.6.19 contain a change in the PHAR files. In particular, a change in how external dependencies included in the packaged PHAR files are prefixed to prevent conflicts with potentially Composer installed dependencies on the same packages.

In practice, the prefix for these external dependencies which is being added when the PHAR is being build has changed from `PHPUnit\\` to `PHPUnitPHAR\\`.

This impacts the `AssertClosedResource` polyfill which uses the `SebastianBergmann\Exporter\Exporter` class from the external `Exporter` dependency.

This commit fixes the issue.

Refs:
* https://github.com/sebastianbergmann/phpunit/releases/tag/8.5.38
* https://github.com/sebastianbergmann/phpunit/releases/tag/9.6.19
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 95.833% (-0.4%) from 96.232%
when pulling ee15e22 on feature/support-phpunit-8.5.38-9.6.19
into 3380dcc on 1.x.

@jrfnl

jrfnl commented Apr 5, 2024

Copy link
Copy Markdown
Collaborator Author

Note: decrease in code coverage is as expected as the lines which are specific for use with PHPUnit PHAR files are not currently run in CI.

@jrfnl jrfnl merged commit 51c2415 into 1.x Apr 5, 2024
@jrfnl jrfnl deleted the feature/support-phpunit-8.5.38-9.6.19 branch April 5, 2024 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants