Skip to content

Commit

Permalink
Merge pull request #309 from plivo/fix-deprecated-null
Browse files Browse the repository at this point in the history
deprecated null to string assignment fix
  • Loading branch information
narayana-plivo authored Mar 24, 2023
2 parents 5881558 + 9de873b commit 833c65d
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 23 deletions.
1 change: 1 addition & 0 deletions .github/workflows/unitTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ jobs:
with:
php_version: ${{ matrix.php-version }}
configuration: tests/phpunit.xml
version: 9.5.28
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Change Log
## [v4.43.1](https://github.com/plivo/plivo-php/tree/v4.43.1) (2023-03-24)
- Fix brand registration create api param

## [v4.43.0](https://github.com/plivo/plivo-php/tree/v4.43.0) (2023-03-03)
- Add `isDomestic` to the response for the [list all messages API](https://www.plivo.com/docs/sms/api/message/list-all-messages/) and the [get message details API](https://www.plivo.com/docs/sms/api/message#retrieve-a-message)

Expand Down
2 changes: 1 addition & 1 deletion src/Plivo/Http/PlivoResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public function makeException()
// make exception based on the status code
$this->thrownException =
new PlivoResponseException(
null, null, null,
"", 0, null,
$this->decodedContent, $this->statusCode);

echo $this->thrownException->getMessage();
Expand Down
2 changes: 1 addition & 1 deletion src/Plivo/Resources/Brand/BrandInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public function create($brand_alias,$profile_uuid,$brand_type,$secondary_vetting
'brand_alias' => $brand_alias,
'profile_uuid' => $profile_uuid,
'brand_type' => $brand_type,
'esecondary_vettingin' => $secondary_vetting
'secondary_vetting' => $secondary_vetting
];
$response = $this->client->update(
$this->uri .'10dlc/Brand/',
Expand Down
3 changes: 2 additions & 1 deletion tests/Mocks/messageGetResponse.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@
"units": 1,
"powerpack_id": "15c01cc2-4b9f-4d3b-bd15-3c4b38984cc4",
"requester_ip": "192.168.1.1",
"is_domestic": false
"is_domestic": false,
"destination_country_iso2": "IN"
}
60 changes: 40 additions & 20 deletions tests/Mocks/messageListResponse.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"total_rate": "0.00250",
"units": 1,
"requester_ip": "192.168.1.1",
"is_domestic": false
"is_domestic": false,
"destination_country_iso2": "IN"
},
{
"error_code": null,
Expand All @@ -37,7 +38,8 @@
"total_rate": "0.00250",
"units": 1,
"requester_ip": "192.168.1.2",
"is_domestic": false
"is_domestic": false,
"destination_country_iso2": "IN"
},
{
"error_code": null,
Expand All @@ -53,7 +55,8 @@
"total_rate": "0.00250",
"units": 1,
"requester_ip": "192.168.1.3",
"is_domestic": false
"is_domestic": false,
"destination_country_iso2": "IN"
},
{
"error_code": null,
Expand All @@ -69,7 +72,8 @@
"total_rate": "0.00250",
"units": 1,
"requester_ip": "192.168.1.4",
"is_domestic": false
"is_domestic": false,
"destination_country_iso2": "IN"
},
{
"error_code": null,
Expand All @@ -85,7 +89,8 @@
"total_rate": "0.00250",
"units": 1,
"requester_ip": "192.168.1.5",
"is_domestic": false
"is_domestic": false,
"destination_country_iso2": "IN"
},
{
"error_code": null,
Expand All @@ -101,7 +106,8 @@
"total_rate": "0.00250",
"units": 1,
"requester_ip": "192.168.1.6",
"is_domestic": false
"is_domestic": false,
"destination_country_iso2": "IN"
},
{
"error_code": null,
Expand All @@ -117,7 +123,8 @@
"total_rate": "0.00250",
"units": 1,
"requester_ip": "192.168.1.7",
"is_domestic": false
"is_domestic": false,
"destination_country_iso2": "IN"
},
{
"error_code": null,
Expand All @@ -133,7 +140,8 @@
"total_rate": "0.00250",
"units": 1,
"requester_ip": "192.168.1.8",
"is_domestic": false
"is_domestic": false,
"destination_country_iso2": "IN"
},
{
"error_code": "000",
Expand All @@ -149,7 +157,8 @@
"total_rate": "0.00250",
"units": 1,
"requester_ip": "192.168.1.9",
"is_domestic": false
"is_domestic": false,
"destination_country_iso2": "IN"
},
{
"error_code": null,
Expand All @@ -165,7 +174,8 @@
"total_rate": "0.00250",
"units": 1,
"requester_ip": "192.168.1.10",
"is_domestic": false
"is_domestic": false,
"destination_country_iso2": "IN"
},
{
"error_code": "000",
Expand All @@ -181,7 +191,8 @@
"total_rate": "0.00250",
"units": 1,
"requester_ip": "192.168.1.11",
"is_domestic": false
"is_domestic": false,
"destination_country_iso2": "IN"
},
{
"error_code": null,
Expand All @@ -197,7 +208,8 @@
"total_rate": "0.00250",
"units": 1,
"requester_ip": "192.168.1.12",
"is_domestic": false
"is_domestic": false,
"destination_country_iso2": "IN"
},
{
"error_code": "000",
Expand All @@ -213,7 +225,8 @@
"total_rate": "0.00250",
"units": 1,
"requester_ip": "192.168.1.13",
"is_domestic": false
"is_domestic": false,
"destination_country_iso2": "IN"
},
{
"error_code": null,
Expand All @@ -229,7 +242,8 @@
"total_rate": "0.00250",
"units": 1,
"requester_ip": "192.168.1.14",
"is_domestic": false
"is_domestic": false,
"destination_country_iso2": "IN"
},
{
"error_code": "000",
Expand All @@ -245,7 +259,8 @@
"total_rate": "0.00250",
"units": 1,
"requester_ip": "192.168.1.15",
"is_domestic": false
"is_domestic": false,
"destination_country_iso2": "IN"
},
{
"error_code": null,
Expand All @@ -261,7 +276,8 @@
"total_rate": "0.00250",
"units": 1,
"requester_ip": "192.168.1.16",
"is_domestic": false
"is_domestic": false,
"destination_country_iso2": "IN"
},
{
"error_code": "000",
Expand All @@ -277,7 +293,8 @@
"total_rate": "0.00250",
"units": 1,
"requester_ip": "192.168.1.17",
"is_domestic": false
"is_domestic": false,
"destination_country_iso2": "IN"
},
{
"error_code": "000",
Expand All @@ -293,7 +310,8 @@
"total_rate": "0.00250",
"units": 1,
"requester_ip": "192.168.1.18",
"is_domestic": false
"is_domestic": false,
"destination_country_iso2": "IN"
},
{
"error_code": "000",
Expand All @@ -309,7 +327,8 @@
"total_rate": "0.00250",
"units": 1,
"requester_ip": "192.168.1.19",
"is_domestic": false
"is_domestic": false,
"destination_country_iso2": "IN"
},
{
"error_code": "000",
Expand All @@ -325,7 +344,8 @@
"total_rate": "0.00250",
"units": 1,
"requester_ip": "192.168.1.20",
"is_domestic": false
"is_domestic": false,
"destination_country_iso2": "IN"
}
]
}

0 comments on commit 833c65d

Please sign in to comment.