You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add set_object_contexts.php to demonstrate upload contexts.
Add get_object_contexts.php to show retrieval of structured metadata.
Add list_object_contexts.js to demonstrate server-side filtering.
Implement comprehensive system tests in storageTest.php covering presence, absence (-), and existence (:) filter operators.
Ensure samples use the correct 'contexts' field with 'custom' map structure.
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces new PHP code samples for managing Google Cloud Storage object contexts, including scripts to set, retrieve, and list objects based on custom context metadata. It also adds a comprehensive test case in storageTest.php. The review feedback identifies several inaccuracies in the docstrings and output messages for the retrieval and listing functions, which currently incorrectly describe their purpose as attaching or modifying contexts.
The reason will be displayed to describe this comment to others. Learn more.
The docstring for this function is incorrect. It describes attaching or modifying contexts, but this function is intended to list objects using a filter.
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces new sample scripts for managing Google Cloud Storage object contexts, including functionality for setting, retrieving, and listing objects using context filters. It also includes a new test case to verify these operations. The review feedback identifies several documentation errors where docstrings were likely copied from other functions and a misleading output message in the retrieval script that incorrectly implies an update operation.
The reason will be displayed to describe this comment to others. Learn more.
The docstring for this function is incorrect. It appears to be a copy-paste from the set_object_contexts function. It should describe the retrieval of contexts.
The reason will be displayed to describe this comment to others. Learn more.
The output message says 'were updated', which is misleading for a retrieval (GET) operation. It should simply state that these are the contexts for the object.
printf('Contexts for object %s:' . PHP_EOL, $objectName);
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add set_object_contexts.php to demonstrate upload contexts.
Add get_object_contexts.php to show retrieval of structured metadata.
Add list_object_contexts.js to demonstrate server-side filtering.
Implement comprehensive system tests in storageTest.php covering presence, absence (-), and existence (:) filter operators.
Ensure samples use the correct 'contexts' field with 'custom' map structure.