-
Notifications
You must be signed in to change notification settings - Fork 29
Releases: InfinityFreeHosting/mofh-client
v0.10.0
43e43ef BREAKING CHANGES
- Officially drop support for PHP 7.1 and 7.2. PHP 7.3 or higher is now required.
- The
getCnamefunction now only expects a domain name to be passed, not a username. - If you are extending the message classes yourself, note that the XML parsing was moved out of AbstractResponse into a separate
HasXmlPayloadtrait. Similar traits exist for other types of responses.
DEPRECATIONS
- If you are passing a custom MOFH API URL to the client, you should omit the
xml-api/suffix.- The client now also uses some JSON API functions, and will automatically add the right suffix to the URL for the specific API endpoint used.
NEW FEATURES
- Add the
removeAccountfunction to remove accounts. You can call this function on accounts which are suspended (except forADMIN_CLOSEsuspensions) to trigger their deletion. - Add the
listPackagesfunction to list available hosting packages. Returns the upstream package data as-is for now. - Add the
changePackagefunction to change the hosting plan of a hosting account. - Add the
createTicketfunction to create a support ticket in the control panel on behalf of the user. - Add the
replyTicketfunction to add a response to a support ticket on behalf of the user.
Assets 2
v0.9.2
Increase timeout for GET requests from 5 seconds to 10 seconds to reduce unintended request cancellations.
Assets 2
v0.9.1
Add getCname API function
iFastNet added a new API endpoint, getcname, which can be used to verify domains using CNAME records, so domain owners don't need to change nameservers ahead of time.
Assets 2
Major refactor of entire API client
4bd072e A large refactor of the entire API client to make it easier to use and easier to understand.
- Remove the separate Request classes, the Client just returns the Responses themselves.
- The Client functions now take their input parameters as function arguments, instead of using an array.
- Use custom exception classes for Guzzle errors and custom logic errors.
- Add isAvailable method to AvailabilityResponse, isSuccessful now also returns true if a domain is not found but no error was returned.
- Add pre-commit with various linters.
- Completely rewrite the test suite using Guzzle mocks.
Assets 2
Remove MyOwnFreeHost API port to use trusted cert
Thank you @BastelPichi for your contribution!
Assets 2
Update Guzzle to version 7
0.7.0 Fix phpunit requirement for older PHP versions
Assets 2
Add return type to all test setUp functions
Fixes compatibility with PHPUnit 8+
Assets 2
Remove support for PHP 5.6 and 7.0
PHP 5.6 and 7.0 have been EOL for a while now. PHPUnit 8+ has breaking changes with older PHPUnit versions, so can't be combined effectively.
This release drops support for PHP 5.6 and 7.0 so it can support the latest PHPUnit versions.
Assets 2
GetDomainUser
This update adds the GetDomainUser request. You can use this endpoint like so:
$request = $client->getDomainUser(['domain' => 'example.com']);
$response = $request->send();
if ($response->isSuccessful()) {
if ($response->isFound()) {
echo "This domain is part of account: ".$response->getUsername()."\n;
echo "The account status is: ".$response->getStatus()."\n;
echo "The domain's document root is: ".$response->getDocumentRoot()."\n;
} else {
echo "The domain could not be found.";
}
} else {
echo "Unable to get user: ".$response->getMessage();
}