Skip to content

chore: fix instruction file tests for php#66

Merged
kessplas merged 8 commits into
fireegg-test-serversfrom
enable-instruction-file-php
Nov 10, 2025
Merged

chore: fix instruction file tests for php#66
kessplas merged 8 commits into
fireegg-test-serversfrom
enable-instruction-file-php

Conversation

@josecorella

Copy link
Copy Markdown

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@josecorella josecorella changed the base branch from main to fireegg-test-servers November 7, 2025 02:45
@josecorella josecorella marked this pull request as ready for review November 7, 2025 20:50
@josecorella josecorella changed the title chore: enable instruction file tests for php chore: fix instruction file tests for php Nov 7, 2025
Comment on lines +53 to +73
if (!$instructionFileConfig) {
$result = $s3ec->putObject([
'@SecurityProfile' => $legacy,
'@MaterialsProvider' => $materialProvider,
'@KmsEncryptionContext' => $encryptionContext,
'@CipherOptions' => $cipherOptions,
'Bucket' => $bucket,
'Key' => $key,
'Body' => $rawBody,
]);
} else {
$strategy = new InstructionFileMetadataStrategy($s3Client);
$result = $s3ec->putObject([
'@SecurityProfile' => $legacy,
'@MaterialsProvider' => $materialProvider,
'@KmsEncryptionContext' => $encryptionContext,
'@MetadataStrategy' => $strategy,
'@CipherOptions' => $cipherOptions,
'Bucket' => $bucket,
'Key' => $key,
'Body' => $rawBody,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style nit: can we refactor this to make it one putObject call, where '@MetadataStrategy' is conditionally set by !$instructionFileConfig? That would be more maintainable if possible.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe, I have to double check how the client deals with passing an empty MetadataStrategy

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'Key' => $key,
'Body' => $rawBody,
]);
} else {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

@kessplas kessplas merged commit 3c40ebb into fireegg-test-servers Nov 10, 2025
3 checks passed
@kessplas kessplas deleted the enable-instruction-file-php branch November 10, 2025 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants