Changelog
Release notes of onlinesim-php-api.
The full history is in CHANGELOG.md.
2.1.1
- Fixed against the current API:
waitCodeno longer fails on an operation withoutresponse; PHPStan types ofProfilenumber/country, optionalOperationresponse, rent SMScode0fornotifySMS, nullable free-list and payment fields. waitCoderetriesTRY_AGAIN_LATER(rate limit),ERROR_UNDEFINEDandINTERVAL_CONCURRENT_REQUESTS_ERROR.MockOnlineSimfollows the backend more closely: rent reservation and confirmation,setOperationReviseandcloseRentNumanswers, missing vs wrong key — see Testing.
2.1.0
- New:
MockOnlineSim, an offline fake of the API for your tests — see Testing.
2.0.0
A rewrite with a new API; 1.x code does not run unchanged.
- One client,
new OnlineSim(apiKey: …), with the sections as properties:$client->numbers,$client->rent,$client->user,$client->free. - PHP 8.1+, ext-curl behind a small
Transportinterface, no runtime dependencies. - The key is sent as a Bearer header, never in the URL;
langis sent; the base URL is configurable. - Typed errors:
ApiError(errorCode),NoNumberError,TransportError,TimeoutError. - Results are arrays with PHPStan shapes instead of response classes;
tariffs($country)is split intotariffs()andtariffsOne($country). rent->getcreates extendable rents by default (extension: true).- New:
numbers->waitCode(poll until the SMS code, then close),user->setWebhookUrl/clearWebhookUrl/webhookLogs,parseWebhook. - Removed: the proxy API,
numbers->repeat,numbers->service,numbers->serviceNumber,rent->portReload,free->countries/numbers/messages(usefree->list),init()/user->me(), the response classes.