Skip to content

Commit 8c63c4d

Browse files
authored
Merge pull request #110 from Nahornii/php-deprecated-fix
Fix PHP 8.4 deprecations: make implicitly nullable parameters explicit
2 parents 3363ec0 + 7284244 commit 8c63c4d

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/Handler/SignedUrlBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class SignedUrlBuilder
88
{
99

1010

11-
public function createFromJob(string $base, string $signingSecret, Job $job, string $cacheKey = null): string
11+
public function createFromJob(string $base, string $signingSecret, Job $job, ?string $cacheKey = null): string
1212
{
1313

1414
$json = json_encode($job->getPayload());

src/Models/Task.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class Task
8888
* @param string|null $operation
8989
* @param string|null $name
9090
*/
91-
public function __construct(string $operation = null, string $name = null)
91+
public function __construct(?string $operation = null, ?string $name = null)
9292
{
9393
$this->operation = $operation;
9494
$this->name = $name;

src/Resources/TasksResource.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public function delete(Task $task): void
9898
*
9999
* @return ResponseInterface
100100
*/
101-
public function upload(Task $task, $file, string $fileName = null): ResponseInterface
101+
public function upload(Task $task, $file, ?string $fileName = null): ResponseInterface
102102
{
103103
if ($task->getOperation() !== 'import/upload') {
104104
throw new \BadMethodCallException('The task operation is not import/upload');

src/Transport/HttpTransport.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ public function delete(string $path): ResponseInterface
207207
*
208208
* @return ResponseInterface
209209
*/
210-
public function upload($path, $file, string $fileName = null, array $additionalParameters = []): ResponseInterface
210+
public function upload($path, $file, ?string $fileName = null, array $additionalParameters = []): ResponseInterface
211211
{
212212
$builder = new MultipartStreamBuilder($this->getStreamFactory());
213213
foreach ($additionalParameters as $parameter => $value) {

0 commit comments

Comments
 (0)