Introduce Pub\Sub bucket notifications#680
Conversation
src/Storage/Bucket.php
Outdated
| * @param string $projectId The project ID. | ||
| */ | ||
| public function __construct(ConnectionInterface $connection, $name, array $info = []) | ||
| public function __construct(ConnectionInterface $connection, $name, array $info = [], $projectId) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
6f69454 to
95c2237
Compare
jdpedrie
left a comment
There was a problem hiding this comment.
just a couple little things. looks good overall!
src/Storage/Bucket.php
Outdated
| * Storage. | ||
| * @param string $name The bucket's name. | ||
| * @param array $info [optional] The bucket's metadata. | ||
| * @param string $projectId The project ID. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| * @param string|Topic $topic The topic used to publish notifications. | ||
| * @param array $options [optional] { | ||
| * Configuration options. | ||
| * |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
src/Storage/Bucket.php
Outdated
| private function getFormattedTopic($topic) | ||
| { | ||
| if ($topic instanceof Topic) { | ||
| return sprintf('//pubsub.googleapis.com/%s', $topic->name()); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| use Google\Cloud\Storage\Connection\ConnectionInterface; | ||
|
|
||
| /** | ||
| * Cloud Pub/Sub Notifications sends information about changes to objects in |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
src/Storage/composer.json
Outdated
| "suggest": { | ||
| "phpseclib/phpseclib": "May be used in place of OpenSSL for creating signed Cloud Storage URLs. Please require version ^2." | ||
| "phpseclib/phpseclib": "May be used in place of OpenSSL for creating signed Cloud Storage URLs. Please require version ^2.", | ||
| "google/cloud-pubsub": "May be used to register a topic to publish bucket notifications." |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
For more information: https://cloud.google.com/storage/docs/pubsub-notifications
System tests to be added soon