Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 13, 2025

Overview

This PR completes the rename of the plugin from "Redis Queue Demo" to "Redis Queue" for version 2.0.0, as a major breaking change release. All references to the old naming convention have been updated throughout the codebase with no backward compatibility layers, as specified in the requirements.

Changes Made

Namespace Migration

  • From: Soderlind\RedisQueueDemo
  • To: Soderlind\RedisQueue

Updated all 14 PHP classes across the entire codebase:

  • Core classes (Redis_Queue, Redis_Queue_Manager, Job_Processor)
  • API controllers (REST_Controller)
  • Admin interface (Admin_Interface)
  • Job classes (Email_Job, Image_Processing_Job, API_Sync_Job, Abstract_Base_Job)
  • Workers (Sync_Worker)
  • Contracts/interfaces (Queue_Job, Job_Result, Basic_Job_Result)
  • Update utilities (GitHub_Plugin_Updater)

Constants & Configuration

  • Renamed all constants from REDIS_QUEUE_DEMO_* to REDIS_QUEUE_*
  • Updated composer.json package name to soderlind/redis-queue
  • Updated GitHub repository URLs from /redis-queue-demo to /redis-queue
  • Configured PSR-4 autoloader for new namespace

Text Domains & Localization

  • Changed text domain from 'redis-queue-demo' to 'redis-queue' throughout all PHP files
  • Updated in main plugin file, admin partials, API controllers, and job classes

Hooks & Filters

  • Renamed all action/filter hooks from redis_queue_demo_* to redis_queue_*:
    • redis_queue_init (was redis_queue_demo_init)
    • redis_queue_job_processed (was redis_queue_demo_job_processed)
    • redis_queue_job_retried (was redis_queue_demo_job_retried)
    • And many more throughout the codebase

Helper Functions

Added new global helper functions (no shims for old names):

redis_queue()                  // Get plugin instance
redis_queue_enqueue_job()      // Enqueue a job
redis_queue_process_jobs()     // Process jobs from queue

Code Cleanup

Removed all legacy files and directories:

  • src/Core/Redis_Queue_Demo.php (old main class)
  • Root-level admin/, api/, workers/ directories (duplicates)
  • class-github-plugin-updater.php (legacy standalone file)
  • debug.php (legacy debug script)

Migration Support

Implemented automatic one-time migrations for existing installations:

Options Migration:

// Migrates: redis_queue_demo_* → redis_queue_*
redis_queue_demo_redis_host     → redis_queue_redis_host
redis_queue_demo_enable_logging → redis_queue_enable_logging
// ... etc

Redis Keys Migration:

// Migrates: redis_queue_demo: → redis_queue:
redis_queue_demo:queue:default → redis_queue:queue:default
redis_queue_demo:jobs:*        → redis_queue:jobs:*
// ... etc

Both migrations:

  • Run automatically on first load of v2.0.0
  • Use safe, best-effort approach
  • Store completion flags to prevent re-running
  • Include error handling with logging

Other Updates

  • Log directory changed from uploads/redis-queue-demo-logs/ to uploads/redis-queue-logs/
  • Updated documentation to reflect new paths
  • Preserved REST API namespace as redis-queue/v1 for API stability

Breaking Changes

⚠️ This is a major version update with breaking changes:

  1. Namespace: All classes now use Soderlind\RedisQueue namespace
  2. Functions: Use redis_queue() instead of redis_queue_demo()
  3. Hooks: All hooks renamed from redis_queue_demo_* to redis_queue_*
  4. Text Domain: Changed from 'redis-queue-demo' to 'redis-queue'
  5. No backward compatibility: Old function names and hooks do not exist

Users must update their code when upgrading. See CHANGELOG.md for migration guide.

Testing

✅ All PHP files pass syntax validation
✅ All classes successfully autoload via Composer
✅ Plugin instance can be instantiated with new namespace
✅ No unintended references to old naming remain
✅ Migration code correctly references old names for upgrade path

Related

Closes issue requesting plugin rename and 2.0.0 release preparation.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/YahnisElsts/plugin-update-checker/zipball/a2db6871deec989a74e1f90fafc6d58ae526a879
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/N49Jxv /usr/bin/composer install --no-dev (http block)
    • Triggering command: /usr/bin/php8.3 -n -c /tmp/qu2auh /usr/bin/composer install --no-dev --prefer-dist (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Ignore backward compatibility, review and rename:

  • Text domain: rename
  • Namespace: Soderlind\RedisQueue, main class Redis_Queue
  • Constants: rename , no shims
  • Options: migrate to redis_queue_
  • Redis keys: change + automatic migration (safe, best effort)
  • Hooks: rename, no deprecation notices
  • Functions: add redis_queue(), no shims
  • Version: 2.0.0

Summary of Conversation History

Recent Agent Commands and Tool Results

  1. User Command: "Update documentation: README, docs/*.md, CHANGELOG entry for 2.0.0 (breaking changes)."

    • Context: The user requested updates to the documentation to reflect the new version and breaking changes associated with the plugin renaming and restructuring.
  2. User Command: "also update github actions"

    • Context: The user indicated the need to update GitHub Actions, likely to align with the changes made in the plugin structure and functionality.
  3. User Command: "Ignore backward compatibility, review and rename: - Text domain: rename - Namespace: Soderlind\RedisQueue, main class Redis_Queue - Constants: rename , no shims - Options: migrate to redis_queue_ - Redis keys: change + automatic migration (safe, best effort) - Hooks: rename, no deprecation notices - Functions: add redis_queue(), no shims - Version: 2.0.0"

    • Context: The user emphasized that backward compatibility should be ignored and provided a detailed list of renaming and restructuring tasks to be performed on the plugin, including namespaces, constants, options, and versioning.

Results from Recent Tool Calls

  • The agent has been actively processing commands related to renaming the plugin from "Redis Queue Demo" to "Redis Queue," including updating namespaces, classes, methods, documentation, and GitHub Actions.
  • The user has been focused on ensuring that the plugin is fully updated to version 2.0.0, with a clear directive to remove any legacy code and references.

Active Work When Token Budget Exceeded

  • The agent was in the process of executing commands related to updating documentation and GitHub Actions when the token budget was exceeded. This included ensuring that all relevant files reflected the new plugin name and structure.

Connection to Overall User Goals

  • The user's overarching goal is to modernize and streamline the "Redis Queue" plugin, ensuring it is ready for version 2.0.0 without backward compatibility concerns. This includes a comprehensive renaming and restructuring effort to improve clarity and functionality, as well as updating all related documentation and automated processes (like GitHub Actions) to reflect these changes. The recent commands indicate a strong focus on thoroughness and attention to detail in this transition.
    TITLE: Plugin rename and documentation update for Redis Queue

Created from VS Code via the GitHub Pull Request extension.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI and others added 2 commits October 13, 2025 19:39
Co-authored-by: soderlind <1649452+soderlind@users.noreply.github.com>
Co-authored-by: soderlind <1649452+soderlind@users.noreply.github.com>
Copilot AI changed the title [WIP] Update plugin structure and rename elements for version 2.0.0 Complete Redis Queue 2.0.0 rename from Redis Queue Demo Oct 13, 2025
Copilot AI requested a review from soderlind October 13, 2025 19:59
@soderlind soderlind marked this pull request as ready for review October 13, 2025 19:59
@soderlind soderlind merged commit 906ecc7 into main Oct 13, 2025
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.

2 participants