Skip to content

Feature: Switch to Composer autoloader#128

Open
cameronterry wants to merge 40 commits intorelease/2.6.0from
feature/composer-autoloader
Open

Feature: Switch to Composer autoloader#128
cameronterry wants to merge 40 commits intorelease/2.6.0from
feature/composer-autoloader

Conversation

@cameronterry
Copy link
Owner

@cameronterry cameronterry commented Sep 27, 2025

This PR includes:

  • Introduced composer autoloader to the plugin.
  • Beginning to rename parts of the code from "DarkMatter" to "DarkMatterPlugin".
  • Added a dependency for the spatie/php-structure-discoverer, which is used to load classes within the Dark Matter Plugin namespace.
  • Added strauss dependency to prefix vendor/ and relevant dependencies to prevent conflicts with other code within a WordPress installation.
  • Added helper interfaces to be used with handling classes to be loaded and Commands for CLI.
  • Refactored a number of classes into the new structure.
    • Moved the Database class to the new autoloader approach.
    • Moved the UI class to the new autoloader approach.
    • Moved CLI into the new autoloader approach.
    • Moved REST API classes into the new autoloader approach, and move it into a versioned /v1/ folder.
    • Moved Yoast and compatible "allow logins" into new classes within Compat.
    • Note: classes which are likely to introduced backwards compatibility uses and used in custom logic by installs were left as-is.
    • This will be handled in the future 3.0.0 major release, where it is expected to have backwards compatibility issues.

@cameronterry cameronterry self-assigned this Sep 27, 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