diff --git a/composer.json b/composer.json index 66a9010..3db186a 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ "php": ">=8.5", "psr/http-client": "^1.0", "psr/http-message": "^2.0", - "utopia-php/client": "^0.4", + "utopia-php/client": "^0.5", "utopia-php/psr7": "^0.2" }, "require-dev": { diff --git a/composer.lock b/composer.lock index 9d75785..80e342f 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "dd6b6d68534faf4fd36a21db56a4dceb", + "content-hash": "8350530fff342c96993f6ecb51b51848", "packages": [ { "name": "brick/math", @@ -1879,16 +1879,16 @@ }, { "name": "utopia-php/client", - "version": "0.4.3", + "version": "0.5.1", "source": { "type": "git", "url": "https://github.com/utopia-php/client.git", - "reference": "d68a5890afa6002b44691cb3f265123a6331e03e" + "reference": "7cea773be6c2c7ba2d25625a61f17278b00ee01c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/client/zipball/d68a5890afa6002b44691cb3f265123a6331e03e", - "reference": "d68a5890afa6002b44691cb3f265123a6331e03e", + "url": "https://api.github.com/repos/utopia-php/client/zipball/7cea773be6c2c7ba2d25625a61f17278b00ee01c", + "reference": "7cea773be6c2c7ba2d25625a61f17278b00ee01c", "shasum": "" }, "require": { @@ -1910,8 +1910,11 @@ }, "type": "library", "autoload": { + "files": [ + "src/compat.php" + ], "psr-4": { - "Utopia\\": "src/" + "Utopia\\Client\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1930,9 +1933,9 @@ ], "support": { "issues": "https://github.com/utopia-php/client/issues", - "source": "https://github.com/utopia-php/client/tree/0.4.3" + "source": "https://github.com/utopia-php/client/tree/0.5.1" }, - "time": "2026-09-05T15:25:56+00:00" + "time": "2026-09-23T14:09:54+00:00" }, { "name": "utopia-php/pools", diff --git a/src/Pay/Adapter/Stripe.php b/src/Pay/Adapter/Stripe.php index 7cd5f1a..c374b1b 100644 --- a/src/Pay/Adapter/Stripe.php +++ b/src/Pay/Adapter/Stripe.php @@ -4,8 +4,8 @@ use Psr\Http\Client\ClientExceptionInterface; use Psr\Http\Client\ClientInterface; -use Utopia\Client; use Utopia\Client\Adapter\Curl\Client as Curl; +use Utopia\Client\Client; use Utopia\Pay\Adapter; use Utopia\Pay\Address; use Utopia\Pay\Exception; diff --git a/tests/Pay/Adapter/StripeTest.php b/tests/Pay/Adapter/StripeTest.php index 2d87a61..4d01432 100644 --- a/tests/Pay/Adapter/StripeTest.php +++ b/tests/Pay/Adapter/StripeTest.php @@ -12,7 +12,7 @@ class StripeTest extends TestCase protected function setUp(): void { - $secretKey = getenv('STRIPE_SECRET') ? getenv('STRIPE_SECRET') : ''; + $secretKey = getenv('STRIPE_SECRET') ?: ''; $this->stripe = new Stripe( $secretKey ); @@ -20,7 +20,14 @@ protected function setUp(): void public function testName(): void { - $this->assertEquals($this->stripe->getName(), 'Stripe'); + $this->assertEquals('Stripe', $this->stripe->getName()); + } + + public function testConstructsWithoutAClient(): void + { + $this->expectNotToPerformAssertions(); + + new Stripe('sk_test_probe'); } /**