Skip to content

Commit 8e9f909

Browse files
committed
updated to PHP 8.1
1 parent 0c5854b commit 8e9f909

8 files changed

+32
-32
lines changed

api/index.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
$client = new Client();
1010

1111
if (!empty($_GET['test-put'])) {
12-
$result = $client->put('this-is-test.txt', 'Testing');
12+
$result = $client->put($_GET['test-put'], 'Testing');
1313

1414
echo "<pre>";
1515
echo var_export($result, true);

composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dam-bal/vercel-blob-php",
3-
"description": "Vercel Blob for PHP",
3+
"description": "PHP Client for Vercel Blob",
44
"type": "library",
55
"autoload": {
66
"psr-4": {
@@ -13,7 +13,7 @@
1313
}
1414
],
1515
"require": {
16-
"php": "^8.2",
16+
"php": "^8.1",
1717
"guzzlehttp/guzzle": "^7.8"
1818
}
1919
}

composer.lock

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/CommonCreateBlobOptions.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
namespace VercelBlobPhp;
44

5-
readonly class CommonCreateBlobOptions
5+
class CommonCreateBlobOptions
66
{
77
public function __construct(
8-
public string $access = 'public',
9-
public ?bool $addRandomSuffix = false,
10-
public ?string $contentType = null,
11-
public ?int $cacheControlMaxAge = null,
8+
public readonly string $access = 'public',
9+
public readonly ?bool $addRandomSuffix = false,
10+
public readonly ?string $contentType = null,
11+
public readonly ?int $cacheControlMaxAge = null,
1212
) {
1313
}
1414
}

src/CopyBlobResult.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
namespace VercelBlobPhp;
44

5-
readonly class CopyBlobResult
5+
class CopyBlobResult
66
{
77
public function __construct(
8-
public string $url,
9-
public string $downloadUrl,
10-
public string $pathname,
11-
public ?string $contentType,
12-
public string $contentDisposition,
8+
public readonly string $url,
9+
public readonly string $downloadUrl,
10+
public readonly string $pathname,
11+
public readonly ?string $contentType,
12+
public readonly string $contentDisposition,
1313
) {
1414
}
1515
}

src/HeadBlobResult.php

+9-9
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@
44

55
use DateTime;
66

7-
readonly class HeadBlobResult
7+
class HeadBlobResult
88
{
99
public function __construct(
10-
public string $url,
11-
public string $downloadUrl,
12-
public int $size,
13-
public DateTime $uploadedAt,
14-
public string $pathname,
15-
public string $contentType,
16-
public string $contentDisposition,
17-
public string $cacheControl,
10+
public readonly string $url,
11+
public readonly string $downloadUrl,
12+
public readonly int $size,
13+
public readonly DateTime $uploadedAt,
14+
public readonly string $pathname,
15+
public readonly string $contentType,
16+
public readonly string $contentDisposition,
17+
public readonly string $cacheControl,
1818
) {
1919
}
2020
}

src/PutBlobResult.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
namespace VercelBlobPhp;
44

5-
readonly class PutBlobResult
5+
class PutBlobResult
66
{
77
public function __construct(
8-
public string $url,
9-
public string $downloadUrl,
10-
public string $pathname,
11-
public ?string $contentType,
12-
public string $contentDisposition,
8+
public readonly string $url,
9+
public readonly string $downloadUrl,
10+
public readonly string $pathname,
11+
public readonly ?string $contentType,
12+
public readonly string $contentDisposition,
1313
) {
1414
}
1515
}

vercel.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"functions": {
33
"api/*.php": {
4-
"runtime": "vercel-php@0.7.0"
4+
"runtime": "vercel-php@0.5.4"
55
}
66
},
77
"routes": [

0 commit comments

Comments
 (0)