Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AssertIgnoringLineEndings: fix compatibility with PHPUnit 8/9/10 PHAR files #164

Merged
merged 1 commit into from
Apr 5, 2024

Conversation

jrfnl
Copy link
Collaborator

@jrfnl jrfnl commented Apr 5, 2024

PHPUnit 8.5..38, 9.6.19 and 10.5.17 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 AssertIgnoringLineEndings polyfill which uses the SebastianBergmann\Exporter\Exporter class from the external Exporter dependency.

This commit fixes the issue.

Refs:

@coveralls
Copy link

coveralls commented Apr 5, 2024

Coverage Status

coverage: 94.753% (-0.4%) from 95.171%
when pulling baff7b5 on feature/support-phpunit-8.5.38-9.6.19_-10.5.17
into 1fb6984 on 2.x.

… files

PHPUnit 8.5..38, 9.6.19 and 10.5.17 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 `AssertIgnoringLineEndings` 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
* https://github.com/sebastianbergmann/phpunit/releases/tag/10.5.17
@jrfnl jrfnl force-pushed the feature/support-phpunit-8.5.38-9.6.19_-10.5.17 branch from e03879e to baff7b5 Compare April 5, 2024 15:30
@jrfnl
Copy link
Collaborator Author

jrfnl commented Apr 5, 2024

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. This will be fixed via #160.

@jrfnl jrfnl merged commit d2a5a0a into 2.x Apr 5, 2024
82 of 84 checks passed
@jrfnl jrfnl deleted the feature/support-phpunit-8.5.38-9.6.19_-10.5.17 branch April 5, 2024 15:34
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.

None yet

2 participants