Skip to content

Conversation

swissspidy
Copy link
Member

@swissspidy swissspidy commented May 8, 2025

This is related to the remaining failing Behat tests when code coverage is running.

Basically what happens in the wp-cli-bundle repo is that we include the autoloader once in generate-coverage.php, and then in the generated Phar the same autoloader is included again. That causes a fatal error because the same ComposerAutoloaderInit... class is declared twice.

This PR addresses this by temporarily changing the autoloader class suffix for that generated Phar. Requires otherwise using a hardcoded suffix (instead of the default content-hash). See wp-cli/wp-cli-bundle#764 for that.

Requires the PHP 7.2 bump, see wp-cli/wp-cli-bundle#760

See Slack discussion for additional context

Copy link

codecov bot commented May 8, 2025

Codecov Report

Attention: Patch coverage is 0% with 13 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/Context/FeatureContext.php 0.00% 13 Missing ⚠️

📢 Thoughts on this report? Let us know!

@swissspidy swissspidy force-pushed the add/phar-dump-autoload branch from 464ac60 to 7058e4a Compare May 8, 2025 16:21
@swissspidy swissspidy marked this pull request as ready for review May 12, 2025 17:59
@swissspidy swissspidy requested a review from a team as a code owner May 12, 2025 17:59
@swissspidy
Copy link
Member Author

@schlessera would love to hear especially your thoughts on this situation & solution.

@schlessera schlessera added this to the 4.4.0 milestone Jun 11, 2025
@schlessera schlessera merged commit 003d38e into main Jun 11, 2025
50 checks passed
@schlessera schlessera deleted the add/phar-dump-autoload branch June 11, 2025 08:51
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