Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion features/super-admin.feature
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,13 @@ Feature: Manage super admins associated with a multisite instance
admin2
"""

When I run `wp eval 'global $wpdb; $wpdb->delete( $wpdb->users, array( "user_login" => "admin2" ) );'`
Given a delete-user.php file:
"""
<?php
global $wpdb;
$wpdb->delete( $wpdb->users, array( 'user_login' => 'admin2' ) );
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

To align with modern PHP standards (PSR-12) and for consistency within the project, please use the short array syntax [] instead of array().

      $wpdb->delete( $wpdb->users, [ 'user_login' => 'admin2' ] );
References
  1. The PSR-12 standard is the current recommendation for PHP code style. While it doesn't explicitly forbid array(), the use of short array syntax ([]) is a widely adopted best practice in the modern PHP ecosystem and is often enforced by linters configured for PSR-12. (link)

"""
When I run `wp eval-file delete-user.php`
And I run `wp eval 'wp_cache_flush();'`
Copy link

Copilot AI Mar 28, 2026

Choose a reason for hiding this comment

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

This step still uses wp eval 'wp_cache_flush();', which relies on single-quote shell parsing and can still fail under Windows shells (cmd.exe/PowerShell). Consider replacing this with a shell-friendly command like wp cache flush (or include the cache flush in the same eval-file script) to fully address Windows compatibility.

Suggested change
And I run `wp eval 'wp_cache_flush();'`
And I run `wp cache flush`

Copilot uses AI. Check for mistakes.
And I run `wp user list --field=user_login --orderby=user_login`
Then STDOUT should be:
Expand Down
Loading