-
Notifications
You must be signed in to change notification settings - Fork 1k
Comparing changes
Open a pull request
base repository: wp-cli/wp-cli
base: main
head repository: wp-cli/wp-cli
compare: copilot/make-formats-extensible
- 18 commits
- 5 files changed
- 4 contributors
Commits on Feb 12, 2026
-
Configuration menu - View commit details
-
Copy full SHA for 335ad03 - Browse repository at this point
Copy the full SHA 335ad03View commit details -
Implement extensible format system for WP-CLI Formatter
- Add static $custom_formatters array to track custom format handlers - Add Formatter::add_format() method to register custom formatters - Add Formatter::get_available_formats() method with filterable format list - Update format() and show_multiple_fields() to support custom handlers - Add PHPUnit tests for custom format functionality - Add Behat feature tests for custom format scenarios Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for f4d1ea6 - Browse repository at this point
Copy the full SHA f4d1ea6View commit details -
Add comprehensive documentation for extensible format system
- Update Formatter class docblock to mention extensibility - Add detailed examples to add_format() method - Add usage examples to get_available_formats() method - Document filter hook 'formatter_available_formats' Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for d040c7d - Browse repository at this point
Copy the full SHA d040c7dView commit details -
- Add BUILTIN_FORMATS constant for better maintainability - Add debug message for skipped items in custom formatters - Improve test coverage for parameter passing and field filtering - Add type assertions to satisfy PHPStan Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for f95fe35 - Browse repository at this point
Copy the full SHA f95fe35View commit details
Commits on Feb 19, 2026
-
Configuration menu - View commit details
-
Copy full SHA for 9eba0ed - Browse repository at this point
Copy the full SHA 9eba0edView commit details -
Configuration menu - View commit details
-
Copy full SHA for 05e50d0 - Browse repository at this point
Copy the full SHA 05e50d0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0831496 - Browse repository at this point
Copy the full SHA 0831496View commit details
Commits on Feb 23, 2026
-
Configuration menu - View commit details
-
Copy full SHA for 7e4e752 - Browse repository at this point
Copy the full SHA 7e4e752View commit details -
Configuration menu - View commit details
-
Copy full SHA for cc17fb5 - Browse repository at this point
Copy the full SHA cc17fb5View commit details
Commits on Mar 10, 2026
-
Configuration menu - View commit details
-
Copy full SHA for 0e78e80 - Browse repository at this point
Copy the full SHA 0e78e80View commit details -
Update features/formatter.feature
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 95f5ab6 - Browse repository at this point
Copy the full SHA 95f5ab6View commit details
Commits on Mar 11, 2026
-
Address code review feedback: allow overriding built-in formats and f…
…ix field resolution for custom formatters - Fix handler signatures in tests to accept ($items, $fields) parameters - Remove restriction preventing override of built-in formats - Add field validation and prefix resolution for custom formatters - Check custom formatters before built-in switch statement to enable overriding - Add test for prefix field resolution with custom formatters - Add test for overriding built-in formats Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for a8f82fe - Browse repository at this point
Copy the full SHA a8f82feView commit details -
Configuration menu - View commit details
-
Copy full SHA for fb25b5e - Browse repository at this point
Copy the full SHA fb25b5eView commit details
Commits on Mar 23, 2026
-
Configuration menu - View commit details
-
Copy full SHA for 760682a - Browse repository at this point
Copy the full SHA 760682aView commit details -
Convert built-in formats to use extensible format API
- Add static flag to track built-in format registration - Create register_builtin_formats() method to register all built-in formats using add_format() - Register count, ids, json, yaml, csv, and table formats via the API - Remove switch statements from format() and show_multiple_fields() methods - All built-in formats now use the same registration mechanism as custom formats - Built-in formats can be overridden by calling add_format() with the same name - Special handling for ids/count formats (work with raw items) and table format (needs formatter instance) Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com> Agent-Logs-Url: https://github.com/wp-cli/wp-cli/sessions/e94ee5b4-3181-4bf6-b2d2-3ba9a27776c6
Configuration menu - View commit details
-
Copy full SHA for 5e8b56b - Browse repository at this point
Copy the full SHA 5e8b56bView commit details -
Refactor formatter initialization per code review feedback
- Remove BUILTIN_FORMATS constant, use array_keys($custom_formatters) instead - Remove defensive type check for hook return value (trust the hook) - Create InitializeFormatter bootstrap step to register built-in formats - Move format registration from lazy initialization to bootstrap - Remove special handling for json/yaml in show_multiple_fields - Make register_builtin_formats() public and remove flag check - Add setUpBeforeClass to FormatterTest for test initialization Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com> Agent-Logs-Url: https://github.com/wp-cli/wp-cli/sessions/44e4d3bc-205c-4f5f-b5f4-892faf288cf9
Configuration menu - View commit details
-
Copy full SHA for f3df6c9 - Browse repository at this point
Copy the full SHA f3df6c9View commit details -
Restore WP_CLI::print_value() for json/yaml in single-item display
Fixes test failures where single-item display was incorrectly wrapping items in an array. WP_CLI::print_value() properly handles single items by outputting them without array wrappers, which is required for json/yaml formats in single-item mode (display_item). Multi-item display continues to use registered format handlers directly. Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com> Agent-Logs-Url: https://github.com/wp-cli/wp-cli/sessions/747ee921-fbd9-4706-97a9-551bbfc7849b
Configuration menu - View commit details
-
Copy full SHA for 83752cb - Browse repository at this point
Copy the full SHA 83752cbView commit details -
Extend format handlers API to support single-item display
- Add optional context parameter to json/yaml format handlers - Handlers check for 'single_item' flag to output without array wrapper - Remove WP_CLI::print_value() usage in show_multiple_fields - Pass context flag when calling formatters for single-item display - Maintains backward compatibility for custom format handlers Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com> Agent-Logs-Url: https://github.com/wp-cli/wp-cli/sessions/2e99076d-2ca2-4d77-a5a8-eb3b535c9c25
Configuration menu - View commit details
-
Copy full SHA for 3da35a2 - Browse repository at this point
Copy the full SHA 3da35a2View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff main...copilot/make-formats-extensible