Skip to content

Conversation

mrsdizzie
Copy link
Member

@mrsdizzie mrsdizzie commented Mar 17, 2025

As a companion to WP_CLI_EARLY_REQUIRE but doesn't include the files until after wp has been through the boostrap process. This is the same as using --require from the command line, or require in a yaml config file. The purpose for another way of requiring a file is for use in codecov testing, where it otherwise is not practical to conditionally include a php file at normal runtime using the existing methods in a testing environment.

See wp-cli/wp-cli-tests#241 for more conversation. This is what #6065 was meant to address, but it didn't end up working out for this specific case since we can't include our codcov generate files that early on before wp has been through bootstrap

As a companion to WP_CLI_EARLY_REQUIRE but doesn't include the files
until after wp has been through the boostrap process. This is the same
as using `--require` from the command line, or require in a yaml config
file. The purpose for another way of requiring a file is for use in
codecov testing, where it otherwise is not practical to conditionally
including a php file at normal runtime using the existing methods in a
testing environment.
@mrsdizzie mrsdizzie requested a review from a team as a code owner March 17, 2025 18:45
@mrsdizzie mrsdizzie added this to the 2.12.0 milestone Mar 17, 2025
Copy link

codecov bot commented Mar 17, 2025

Codecov Report

Attention: Patch coverage is 42.85714% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
php/WP_CLI/Configurator.php 42.85% 4 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Member

@swissspidy swissspidy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, looks good to me! 👍

@swissspidy swissspidy merged commit b8f16d6 into main Mar 18, 2025
48 of 49 checks passed
@swissspidy swissspidy deleted the add-wp-cli-require branch March 18, 2025 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants