Skip to content

Commit 1fa2a71

Browse files
committed
Update composer.json
1 parent d014ca7 commit 1fa2a71

File tree

6 files changed

+20
-5
lines changed

6 files changed

+20
-5
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,18 @@ jobs:
3232
ssh_key: ${{ secrets.ssh_key }}
3333
ssh_key_pub: ${{ secrets.ssh_key_pub }}
3434

35+
- name: Prepare Log Directory
36+
run: mkdir -p build/logs
37+
3538
- name: PHPUnit Tests
36-
uses: php-actions/phpunit@v2
39+
uses: php-actions/phpunit@v3
3740
with:
38-
php_version: 8.2
41+
php_version: 8.3
3942
bootstrap: vendor/autoload.php
4043
configuration: phpunit.xml
4144
ssh_key: ${{ secrets.ssh_key }}
4245
ssh_key_pub: ${{ secrets.ssh_key_pub }}
46+
47+
- name: Capture PHPUnit Logs
48+
if: always()
49+
run: cat ./build/logs/junit.xml

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to `shopware-php-sdk` will be documented in this file.
44

55
Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
66

7+
### 2.3.0
8+
- feat: adding the previous exception to the ShopwareResponseException when it's mapped in Client
9+
- fix: catching the ShopwareResponseException in AdminAuthenticator since a BadResponseException always gets mapped to it in Client::handleException()
10+
711
### 2.2.0
812
- Compatibility with Shopware 6.6.10.0
913
- Update Criteria to support partial loading (Criteria.addFields)

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "A PHP SDK for Shopware 6 Platform",
44
"type": "library",
55
"license": "MIT",
6-
"version": "2.2.0",
6+
"version": "2.3.0",
77
"authors": [
88
{
99
"name": "vin",

phpunit.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,8 @@
1010
<php>
1111
<ini name="date.timezone" value="UTC"/>
1212
</php>
13+
14+
<logging>
15+
<junit outputFile="build/logs/junit.xml"/>
16+
</logging>
1317
</phpunit>

src/Client/AdminAuthenticator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function fetchAccessToken(): AccessToken
6262
]);
6363
} catch (ShopwareResponseException $exception) {
6464
throw new AuthorizationFailedException(
65-
$exception->getResponse()->getBody()->getContents(),
65+
$exception->getMessage(),
6666
$exception->getCode(),
6767
$exception
6868
);

tests/AdminAuthenticatorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function testFetchAccessTokenSuccess(): void
6060
public function testFetchAccessTokenFailed(): void
6161
{
6262
static::expectException(AuthorizationFailedException::class);
63-
$this->mock->append(new BadResponseException('Unauthenticated', new Request('POST', 'test'), new Response(401, [], '')));
63+
$this->mock->append(new AuthorizationFailedException('Unauthenticated'));
6464

6565
$this->authenticator->fetchAccessToken();
6666
}

0 commit comments

Comments
 (0)