Skip to content

Add namespace#1

Merged
soderlind merged 5 commits intomainfrom
add/namespace
Oct 10, 2025
Merged

Add namespace#1
soderlind merged 5 commits intomainfrom
add/namespace

Conversation

@soderlind
Copy link
Owner

This pull request delivers a major refactor focused on modernizing the codebase, enforcing namespaced class usage, and removing all legacy global class aliases and deprecated files. The update improves autoloading, reduces backward compatibility shims, and clarifies documentation to reflect the new canonical patterns for job types and class usage. Existing helper functions remain unchanged for ergonomic reasons, but manual require statements for legacy files should be removed as Composer PSR-4 autoloading is now used throughout.

Core refactor and modernization:

  • All legacy global class aliases and class_alias guards have been removed; only namespaced classes under Soderlind\RedisQueueDemo are supported now. [1] [2]
  • The deprecated includes/ directory and legacy interface stubs (interface-queue-job.php, interface-job-result.php) were deleted; their logic now lives in the canonical src/ structure. [1] [2] [3]
  • Legacy job_type inference variants (e.g. email_job, Email_Job, etc.) are no longer accepted; only canonical keys like email, image_processing, api_sync are valid. [1] [2]
  • Fallback to global Sync_Worker was removed; only the namespaced worker is supported. [1] [2]
  • Composer autoloading is now configured for PSR-4 under the Soderlind\RedisQueueDemo namespace, and documentation was updated to reflect these changes and remove legacy references. [1] [2] [3]

Documentation and usage updates:

  • All documentation (README, usage guides, extending jobs) was updated to clarify namespaced usage, canonical job types, migration steps, and removal of legacy patterns. [1] [2] [3] [4] [5] [6] [7]
  • Changelog and plugin metadata were updated to version 1.2.0, summarizing the refactor and removals. [1] [2] [3] [4]

File structure and autoloading:

  • The class-github-plugin-updater.php was moved from includes/ to the plugin root, and all legacy duplicate files were deleted in favor of their namespaced equivalents under src/. [1] [2]
  • The composer.json file now defines PSR-4 autoloading for the codebase.

API and helper function stability:

  • Helper functions (redis_queue_demo(), etc.) remain unchanged for ergonomic reasons, but manual includes for legacy files should be removed.

Admin interface and UI:

  • The legacy admin interface file was inlined into the namespaced class, with markup/CSS hooks ported as partials under src/Admin/partials/. UI element structure and selectors remain stable for backward compatibility.

If you encounter missing class errors after upgrading, clear caches and run composer dump-autoload -o. Please report any backward compatibility regressions in the issue tracker.

@soderlind soderlind merged commit a02c57e into main Oct 10, 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.

1 participant