Skip to content

Conversation

@swissspidy
Copy link
Member

See #146

@gemini-code-assist
Copy link

Summary of Changes

Hello @swissspidy, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on modernizing and standardizing the repository's development and testing environment. It involves a significant overhaul of the testing setup by adopting the wp-cli/wp-cli-tests package, replacing a substantial amount of custom Behat boilerplate. Additionally, robust code quality tools like PHP Code Sniffer and PHPStan are integrated to enforce coding standards and improve code maintainability. These changes centralize and streamline development workflows, making it easier for contributors to run tests and ensure high code quality.

Highlights

  • Testing Framework Migration: The repository has migrated its behavior-driven development (Behat) testing infrastructure from custom contexts and utilities to the standardized wp-cli/wp-cli-tests package. This involved removing numerous custom Behat-related files and adding a new behat.yml configuration.
  • Dependency Updates: The composer.json file has been updated to require wp-cli/wp-cli version ^2.12 and wp-cli/wp-cli-tests: ^5.0 for development, ensuring compatibility with recent WP-CLI versions and leveraging the new testing framework.
  • Code Quality Tool Integration: PHP Code Sniffer and PHPStan have been integrated into the development workflow. A new phpcs.xml.dist file defines coding standards (WP_CLI_CS ruleset with PHP 7.2+ compatibility), and Composer scripts enable easy execution of linting, static analysis, and code formatting.
  • Standardized Development Workflows: A comprehensive scripts section has been added to composer.json, centralizing commands for various development tasks including behat, lint, phpcs, phpcbf, phpstan, phpunit, and a combined test command, streamlining the developer experience.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request primarily focuses on updating the testing infrastructure and applying code style fixes. The composer.json file was updated to require wp-cli/wp-cli version ^2.12 and replaced behat/behat with wp-cli/wp-cli-tests:^5.0 for development dependencies. It also introduced new Composer scripts for various testing and linting tasks (e.g., behat, phpcs, phpstan, phpunit). Correspondingly, all Behat-related files, including behat.yml, features/bootstrap/FeatureContext.php, features/bootstrap/Process.php, features/bootstrap/utils.php, features/extra/no-mail.php, and all files within features/steps/, were removed, indicating a complete migration to the new wp-cli-tests framework. A new phpcs.xml.dist file was added to configure PHP CodeSniffer with the WP_CLI_CS ruleset. Minor code style adjustments were made across inc/RestCommand.php and inc/Runner.php, primarily converting else if to elseif, fixing indentation, and standardizing string literal quotes, to align with the new coding standards.

@swissspidy swissspidy marked this pull request as ready for review December 16, 2025 15:36
@swissspidy swissspidy requested a review from a team as a code owner December 16, 2025 15:36
@codecov
Copy link

codecov bot commented Dec 16, 2025

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@swissspidy swissspidy merged commit 584e3f2 into main Dec 17, 2025
54 checks passed
@swissspidy swissspidy deleted the fix/tests branch December 17, 2025 22:30
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.

3 participants