Skip to content

Modernize deprecated syntax in Behat tests#625

Merged
schlessera merged 1 commit into
mainfrom
fix/modernize-deprecated-behat-syntax
Jul 23, 2026
Merged

Modernize deprecated syntax in Behat tests#625
schlessera merged 1 commit into
mainfrom
fix/modernize-deprecated-behat-syntax

Conversation

@schlessera

Copy link
Copy Markdown
Member

What

Updates the Behat tests to use the current command syntax instead of forms deprecated by wp-cli/wp-cli#6356.

Why

The framework now emits a deprecation warning to STDERR when it rewrites these legacy forms. This breaks When I run steps, which expect STDERR to remain empty.

Tests

  • composer lint
  • composer phpcs
  • composer phpunit
  • composer behat (447 of 449 scenarios passed; the two failures require GD or Imagick for wp media import)
  • composer phpstan (currently fails on two pre-existing unmatched method.deprecated ignores in User_Session_Command.php)

WP-CLI now emits deprecation warnings when it rewrites legacy command syntax. Use the modern forms in the Behat scenarios so the standard run step can continue to require clean STDERR.
@schlessera schlessera added this to the 2.8.13 milestone Jul 23, 2026
@schlessera schlessera added command:user Related to 'user' command command:term Related to 'term' command command:post Related to 'post' command command:site Related to 'site' command command:comment Related to 'comment' command command:menu Related to 'menu' command scope:testing Related to testing command:network-meta Related to 'network meta' command labels Jul 23, 2026
@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 0b49ab44-f006-4da8-bb0d-d3cc4dfb83f0

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • ✅ Review completed - (🔄 Check again to review again)
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/modernize-deprecated-behat-syntax

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Jul 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@schlessera
schlessera marked this pull request as ready for review July 23, 2026 06:05
@schlessera
schlessera requested a review from a team as a code owner July 23, 2026 06:05
@schlessera
schlessera merged commit 3d5d5a9 into main Jul 23, 2026
78 checks passed
@schlessera
schlessera deleted the fix/modernize-deprecated-behat-syntax branch July 23, 2026 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

command:comment Related to 'comment' command command:menu Related to 'menu' command command:network-meta Related to 'network meta' command command:post Related to 'post' command command:site Related to 'site' command command:term Related to 'term' command command:user Related to 'user' command scope:testing Related to testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants