License sync#9
Merged
Merged
Conversation
Rename IntegrationApiRequestTest to ClientApiRequestTest, testing $integration->client methods directly. Update UpdaterPreSetTransientTest to use $integration->updater instead of creating redundant instances. Update CLAUDE.md and README.md to reflect the new Client class and stored subsystem properties. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
License sync button
handle_sync()andhandle_save()private methods fromload_page()for cleaner separation of the two POST actions.Extract Client class
src/Client.phpwith typed public methods:ping(),check_license($license),updates(),details()— replacing the genericIntegration::api_request($method, $license)dispatcher.request()method contains shared HTTP/response logic (URL building, common query args, JSON parsing, error handling).Store subsystem instances on Integration
$client,$updater,$tracker,$admintoIntegration.$this->integration->client,$this->integration->updater, etc.Update callers
api_request('updates')→client->updates(), etc.api_request('check_license', $key)→client->check_license($key), etc.api_request('ping')→client->ping(), etc.Update tests
IntegrationApiRequestTest→ClientApiRequestTest— all tests now exercise$integration->client->method()directly.UpdaterPreSetTransientTestnow uses$integration->updaterinstead of creating redundantnew Updater()instances.details_returns_plugin_detailstest case.Update docs
CLAUDE.mdandREADME.mdupdated to reflect the newClientclass, stored subsystem properties, and corrected file structure.Test plan
composer test— 39 tests, 70 assertions, all pass