You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a3176e6
Browse filesBrowse the repository at this point in the historyBrowse files
Conflicts in src/Search_Replace_Command.php and src/WP_CLI/SearchReplacer.php:
- Keep main's single-scan column stats, views skipping and table-qualified
include/skip columns; pass the --where clauses to php_handle_col and
sql_handle_col and to the serialized-data probe.
- Do not use the whole-table column stats for a table that has --where
clauses, since the stats would count rows outside the selection.
- Keep main's ArrayAccess handling and pass the callback options through.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UWTd5pwpi2xQfDA6mUYkkx
Copy file name to clipboardExpand all lines: AGENTS.md
+23-2Lines changed: 23 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,8 @@
2
2
3
3
This package is part of WP-CLI, the official command line interface for WordPress. For a detailed explanation of the project structure and development workflow, please refer to the main @README.md file.
4
4
5
+
If the repository contains an @AGENTS.local.md file, read it as well. It holds instructions specific to this repository and takes precedence over this file where the two disagree.
6
+
5
7
## Best Practices for Code Contributions
6
8
7
9
When contributing to this package, please adhere to the following guidelines:
@@ -13,9 +15,27 @@ When contributing to this package, please adhere to the following guidelines:
13
15
14
16
### Building and running
15
17
16
-
Before submitting any changes, it is crucial to validate them by running the full suite of static code analysis and tests. To run the full suite of checks, execute the following command: `composer test`.
18
+
Run the narrowest check that covers your change:
19
+
20
+
| You changed | Run |
21
+
| --- | --- |
22
+
| Any PHP file |`composer phpcs -- <file>` and `composer phpstan`|
23
+
| Logic with unit test coverage |`composer phpunit -- --filter <TestName>`|
24
+
| One feature file |`composer behat -- features/<name>.feature`|
25
+
| One scenario |`composer behat -- features/<name>.feature:<line>`|
26
+
27
+
After a failure, `composer behat-rerun` re-runs only the scenarios that failed, and `composer behat -- --stop-on-failure` bails out at the first one instead of working through the rest.
28
+
29
+
`composer test` runs every suite, the whole Behat suite included. In most packages that means installing WordPress from scratch once per scenario, which takes tens of minutes and needs `jq`, a MySQL or MariaDB client with a prepared test database, and network access to WordPress.org. Run it before opening a pull request when you have touched something cross-cutting. Do not run it to check a two-line change.
30
+
31
+
Set these first, so the tools report problems compactly instead of drawing progress bars and ANSI color into output you are going to read back:
32
+
33
+
```bash
34
+
export NO_COLOR=1
35
+
export WP_CLI_TEST_QUIET=1
36
+
```
17
37
18
-
This single command ensures that your changes meet all the quality gates of the project. While you can run the individual steps separately, it is highly recommended to use this single command to ensure a comprehensive validation.
38
+
Note that a green `composer test` is not the same as a green CI. `actionlint` and `typos` also run on every pull request and are not part of it.
19
39
20
40
### Useful Composer Commands
21
41
@@ -24,6 +44,7 @@ The project uses Composer to manage dependencies and run scripts. The following
24
44
*`composer install`: Install dependencies.
25
45
*`composer test`: Run the full test suite, including linting, code style checks, static analysis, and unit/behavior tests.
26
46
*`composer lint`: Check for syntax errors.
47
+
*`composer lint-gherkin`: Check the Behat feature files for style violations.
27
48
*`composer phpcs`: Check for code style violations.
@@ -193,9 +208,13 @@ Want to contribute a new feature? Please first [open a new issue](https://github
193
208
194
209
Once you've decided to commit the time to seeing your pull request through, [please follow our guidelines for creating a pull request](https://make.wordpress.org/cli/handbook/pull-requests/) to make sure it's a pleasant experience. See "[Setting up](https://make.wordpress.org/cli/handbook/pull-requests/#setting-up)" for details specific to working on this package locally.
195
210
211
+
### License
212
+
213
+
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
214
+
196
215
## Support
197
216
198
-
GitHub issues aren't for general support questions, but there are other venues you can try: https://wp-cli.org/#support
217
+
GitHub issues aren't for general support questions. For support resources and next steps, see the WP-CLI Support page: https://make.wordpress.org/cli/handbook/support/
199
218
200
219
201
220
*This README.md is generated dynamically from the project's codebase using `wp scaffold package-readme` ([doc](https://github.com/wp-cli/scaffold-package-command#wp-scaffold-package-readme)). To suggest changes, please submit a pull request against the corresponding part of the codebase.*
0 commit comments