Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
matrix:
os: [windows-2022, windows-2025, ubuntu-22.04, ubuntu-24.04]
php-version: [8.0, 8.1, 8.2, 8.3]
php-version: [8.0, 8.1, 8.2, 8.3, 8.4]
steps:
- name: Checkout
uses: actions/checkout@v5
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
],
"require": {
"ext-SimpleXML": "*",
"php": ">=7.2.0",
"php": ">=8.4.0",
"ext-curl": "*",
"ext-json": "*",
"ext-mbstring": "*",
Expand Down
3 changes: 2 additions & 1 deletion src/APIException.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ public function __construct($reason, $context)
$this->context = $context;
$this->errorMessage = $reason;

if (get_class() != 'APIException') {
if (static::class !== 'BandwidthLib\APIException') {
$this->unbox();
}

}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Http/HttpCallBack.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class HttpCallBack
* @param callable|null $onBeforeRequest Called before an API call
* @param callable|null $onAfterRequest Called after an API call
*/
public function __construct(callable $onBeforeRequest = null, callable $onAfterRequest = null)
public function __construct(?callable $onBeforeRequest = null, ?callable $onAfterRequest = null)
{
$this->onBeforeRequest = $onBeforeRequest;
$this->onAfterRequest = $onAfterRequest;
Expand Down
2 changes: 1 addition & 1 deletion src/Http/HttpRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class HttpRequest
* @param string|null $queryUrl Query url
* @param array|null $parameters Map of parameters sent
*/
public function __construct(string $httpMethod = null, array $headers = null, string $queryUrl = null, array $parameters = null)
public function __construct(?string $httpMethod = null, ?array $headers = null, ?string $queryUrl = null, ?array $parameters = null)
{
$this->httpMethod = $httpMethod;
$this->headers = $headers;
Expand Down
24 changes: 12 additions & 12 deletions src/Messaging/Controllers/APIController.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function __construct($config, $httpCallBack = null)
*/
public function listMedia(
string $accountId,
string $continuationToken = null
?string $continuationToken = null
) {

//prepare query string for API call
Expand Down Expand Up @@ -225,7 +225,7 @@ public function uploadMedia(
string $mediaId,
string $body,
string $contentType = 'application/octet-stream',
string $cacheControl = null
?string $cacheControl = null
) {

//prepare query string for API call
Expand Down Expand Up @@ -418,16 +418,16 @@ public function deleteMedia(
* @throws APIException Thrown if API call fails
*/
public function getMessages(
string $accountId,
string $messageId = null,
string $sourceTn = null,
string $destinationTn = null,
string $messageStatus = null,
int $errorCode = null,
string $fromDateTime = null,
string $toDateTime = null,
string $pageToken = null,
int $limit = null
string $accountId,
?string $messageId = null,
?string $sourceTn = null,
?string $destinationTn = null,
?string $messageStatus = null,
?int $errorCode = null,
?string $fromDateTime = null,
?string $toDateTime = null,
?string $pageToken = null,
?int $limit = null
) {

//prepare query string for API call
Expand Down
22 changes: 11 additions & 11 deletions src/Voice/Controllers/APIController.php
Original file line number Diff line number Diff line change
Expand Up @@ -1492,12 +1492,12 @@ public function deleteCallTranscription(
* @throws APIException Thrown if API call fails
*/
public function getConferences(
string $accountId,
string $name = null,
string $minCreatedTime = null,
string $maxCreatedTime = null,
int $pageSize = 1000,
string $pageToken = null
string $accountId,
?string $name = null,
?string $minCreatedTime = null,
?string $maxCreatedTime = null,
int $pageSize = 1000,
?string $pageToken = null
) {

//prepare query string for API call
Expand Down Expand Up @@ -2403,11 +2403,11 @@ public function getDownloadConferenceRecording(
* @throws APIException Thrown if API call fails
*/
public function getQueryCallRecordings(
string $accountId,
string $from = null,
string $to = null,
string $minStartTime = null,
string $maxStartTime = null
string $accountId,
?string $from = null,
?string $to = null,
?string $minStartTime = null,
?string $maxStartTime = null
) {

//prepare query string for API call
Expand Down
8 changes: 4 additions & 4 deletions src/WebRtc/Controllers/APIController.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function __construct($config, $httpCallBack = null)
*/
public function createParticipant(
string $accountId,
Models\Participant $body = null
?Models\Participant $body = null
) {

//prepare query string for API call
Expand Down Expand Up @@ -283,7 +283,7 @@ public function deleteParticipant(
*/
public function createSession(
string $accountId,
Models\Session $body = null
?Models\Session $body = null
) {

//prepare query string for API call
Expand Down Expand Up @@ -602,7 +602,7 @@ public function addParticipantToSession(
string $accountId,
string $sessionId,
string $participantId,
Models\Subscriptions $body = null
?Models\Subscriptions $body = null
) {

//prepare query string for API call
Expand Down Expand Up @@ -854,7 +854,7 @@ public function updateParticipantSubscriptions(
string $accountId,
string $sessionId,
string $participantId,
Models\Subscriptions $body = null
?Models\Subscriptions $body = null
) {

//prepare query string for API call
Expand Down