Add missing resources from our API to the SDK#67
Merged
mattiasgeniar merged 11 commits intomainfrom Feb 17, 2026
Merged
Conversation
…r-php-sdk into update-new-api-endpoints * 'update-new-api-endpoints' of github.com:ohdearapp/ohdear-php-sdk: Fix styling
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.
Why
The Oh Dear API has introduced several new endpoints since v4.4.1 that the SDK didn't support yet. This PR adds support for all missing API endpoints and improves the robustness of existing DTOs.
What changed
New endpoints
New DTOs
AiResponse,DnsBlocklistHistoryItem,DomainInfo,PortsHistoryItem,RecurringMaintenancePeriod,StatusPageUpdateTemplate,Tag,TagGroupNew properties on existing DTOs
Check: addedaverageResponseTimeInMsMonitor: addedtype,portsCheckSettings,dnsBlocklistCheckSettings,aiCheckSettingsStatusPage: addedpreventIndexing,addHstsHeaderCheckTypeenum: addedDnsBlocklist,Ports,AiImproved null-safety
fromResponsemethods now use?? null/?? []defaults for fields that the API may omit, preventing errors on partial responses (ApplicationHealthCheck,ApplicationHealthCheckHistoryItem,BrokenLink,DetectedCertificate,DnsHistoryItem,DowntimePeriod,LighthouseReport,StatusPage)Housekeeping
vlucas/phpdotenvdev dependencylaravel/pintas dev dependency for CI formattingCertificateHealthhelper methods (no functional change)OhDearExceptionconstructor andValidationException::getAllErrorMessages()Risks
This PR is fully backwards compatible with v4.4.1. Specifically:
OhDearconstructor is identicalnull,false,'',[]), so existing code that constructs DTOs manually will continue to worksaloonphp/saloon,saloonphp/pagination-plugin) and their version constraints are unchanged^8.1?? nulldefaults tofromResponsemethods only makes the DTOs more tolerant of partial API responses, not lessThe only changes to existing code are cosmetic (removed docblocks, reformatted exception constructor, simplified
getAllErrorMessages()), none of which affect the public API.