Conversation
Adds phpcs.xml.dist configuration, GitHub Actions workflow for PHP linting, and PHPCS dev dependencies in composer.json. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add MigrationStatus class for querying per-migration execution history
- Log migration start/complete/failed in MigrationManager::do_upgrade()
- Add get_progress() to BackgroundProcess for completion ratio tracking
- Add REST endpoint GET {prefix}/v1/migration/status
- Update developer guide with status API and progress documentation
- Add comprehensive tests for all new functionality
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove DismissalHandler (AJAX dismissal) and merge dismiss endpoint into NoticeRESTController as POST /notices/dismiss - Extract migration REST endpoints from MigrationHooks into dedicated MigrationRESTController with GET /migration/status and POST /migration/upgrade - Rename NotificationHelper::ajax_action() to rest_action() with REST-oriented signature (endpoint, method, nonce) - Add WP REST class stubs to test bootstrap for Brain\Monkey compat - Update tests and developer guide to reflect all changes Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…er config Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The `static` return type requires PHP 8.0+ but the package supports PHP 7.4+. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
str_starts_with() requires PHP 8.0+ but the package supports PHP 7.4+. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add file-level doc comments with @Package tags to all source files - Add missing short descriptions to constructor doc blocks - Add missing @param and @throws tags to method doc blocks - Fix Yoda conditions and replace short ternaries - Fix multi-line function call formatting in QueryResult - Suppress DirectDatabaseQuery/PreparedSQL rules for query builder files in phpcs.xml.dist (false positives for internal $wpdb->prepare usage) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix equals sign alignment in SqlQuery, BaseDataStore, and BaseModel - Suppress reserved keyword parameter name warnings (namespace, object, class are valid names in this context) - Suppress unused function parameter warnings (required by WP filter callbacks and REST handler signatures) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ℹ️ Recent review infoConfiguration used: defaults Review profile: CHILL Plan: Free 📒 Files selected for processing (43)
💤 Files with no reviewable changes (2)
📝 WalkthroughWalkthroughThis pull request introduces CI/CD workflows for linting and testing, establishes a REST-based migration system with progress tracking and logging, refactors admin notification dismissal from AJAX to REST endpoints, adds extensive PHPDoc documentation across the codebase, and removes the legacy AJAX-based DismissalHandler class in favor of REST endpoints. Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant MigrationRESTController
participant MigrationManager
participant MigrationStatus
participant WordPress Options
Client->>MigrationRESTController: GET /migration/status
MigrationRESTController->>MigrationManager: get_status()
MigrationManager->>MigrationStatus: __construct(manager)
MigrationStatus->>WordPress Options: get_option(migration_log)
WordPress Options-->>MigrationStatus: log array
MigrationStatus->>MigrationStatus: get_summary()
MigrationStatus-->>MigrationManager: summary data
MigrationManager-->>MigrationRESTController: MigrationStatus instance
MigrationRESTController-->>Client: WP_REST_Response (status 200)
Client->>MigrationRESTController: POST /migration/upgrade
rect rgba(100, 150, 255, 0.5)
MigrationRESTController->>MigrationManager: check upgrade required
end
MigrationRESTController->>MigrationManager: do_upgrade()
MigrationManager->>WordPress Options: update_option(log_running)
MigrationManager->>MigrationManager: run migrations
MigrationManager->>WordPress Options: update_option(log_completed)
MigrationManager-->>MigrationRESTController: success/error
MigrationRESTController-->>Client: WP_REST_Response (status 201 or 400)
sequenceDiagram
participant Client
participant NoticeRESTController
participant WordPress Options
participant Cache/Memory
Client->>NoticeRESTController: POST /notices/dismiss
NoticeRESTController->>WordPress Options: get_option(dismissed_notices)
WordPress Options-->>NoticeRESTController: dismissed array
NoticeRESTController->>NoticeRESTController: add key to array
rect rgba(100, 150, 255, 0.5)
NoticeRESTController->>WordPress Options: update_option(dismissed_notices)
end
WordPress Options-->>NoticeRESTController: updated
NoticeRESTController-->>Client: WP_REST_Response (success)
Client->>NoticeRESTController: GET /notices
NoticeRESTController->>Cache/Memory: get_notices(scope)
Cache/Memory-->>NoticeRESTController: notices array
NoticeRESTController-->>Client: WP_REST_Response (notices)
Estimated code review effort🎯 4 (Complex) | ⏱️ ~75 minutes This PR involves substantial architectural changes across multiple systems: a new REST-based migration framework with logging and progress tracking, refactoring of admin notifications from AJAX to REST patterns, extensive PHPDoc documentation additions, removal of legacy classes, and comprehensive test coverage. While individual changes are largely consistent patterns, the heterogeneity of affected subsystems (migrations, admin notifications, data layer, cache layer), introduction of new public APIs and classes, and logic density in the migration status/logging system necessitate careful review of control flow, error handling, and integration points. Poem
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment |
Summary by CodeRabbit
New Features
Documentation