google-cloud-php icon indicating copy to clipboard operation
google-cloud-php copied to clipboard

feat!: [Datastore] Upgrade to V2

Open yash30201 opened this issue 11 months ago • 1 comments

Main PR for all the Datastore PHP v2 upgrade changes as mentioned below:

  • [x] Enable direct Gapic Client instantiation in Google\Cloud\Datastore\DatastoreClient https://github.com/googleapis/google-cloud-php/pull/7179/commits/7215b2e1d5122e03707e6667ef84449bbbfd093f
  • [x] Add credentials wrapper support in DatastoreClient https://github.com/googleapis/google-cloud-php/pull/7179/commits/237531f488ac98f37a67de99b509151f7ce6f339
  • [x] Instantiate serializer and Request Handler in DatastoreClient. https://github.com/googleapis/google-cloud-php/pull/7179/commits/cac76f1a08e21c7c897a38841012fb322add0afe
  • [x] Update Resource classes to add serializer and requesthandler in their constructor. https://github.com/googleapis/google-cloud-php/pull/7179/commits/f39189f126490865f22b10183ba23e0b6cd4108e
  • [x] Update all the Snippet and Units tests to add $requestHandler prophecy and serializer https://github.com/googleapis/google-cloud-php/pull/7179/commits/be2533c5dd2b102c9e40da10e6c4154db08c3df8
  • [x] Update Client + ResourceClass methods to use request handler for everything, correspondingly, update their unit tests and snippet tests.
    • BeginTransaction and AllocateIds RPC: https://github.com/googleapis/google-cloud-php/pull/7179/commits/d06abf7abcfe6b71e292fbf1122c3698ce05cc34
    • Lookup RPC: https://github.com/googleapis/google-cloud-php/pull/7179/commits/cee1539e8bdd218dcca4f281b4f291783476c69a
    • RunQuery RPC: https://github.com/googleapis/google-cloud-php/pull/7179/commits/927d510be68b6232ed555fa5ee94b0663cbeb228
    • RunAggregationQuery RPC: https://github.com/googleapis/google-cloud-php/pull/7179/commits/c9d2186af045c6fcc361d88f0bbbfc7698876361
    • Commit RPC: https://github.com/googleapis/google-cloud-php/pull/7179/commits/82716bdcb2e14bd323f2a1e06120760bfc04abe5
    • Rollback RPC: https://github.com/googleapis/google-cloud-php/pull/7179/commits/fcdcf9bdf3d03cf57989fc03b2376bfe3838e22b
  • [x] Remove all references of connection classes from everywhere https://github.com/googleapis/google-cloud-php/pull/7179/commits/4c32fc97dc19c022c32a7f1ecb812ebc94846319
  • [x] Update System tests [Not needed as none of the tests broke🎉]
  • [x] Add MIGRATING.md file https://github.com/googleapis/google-cloud-php/pull/7179/commits/e098d66e7b0c0e0d4d940da4bb6594f72b9057b5
  • [x] Update DatastoreClient's documentation https://github.com/googleapis/google-cloud-php/pull/7179/commits/2196aa21a0bb61dcfff0beda37c6ee7023952dec
  • [x] Remove old GAPIC files (class aliases, etc) https://github.com/googleapis/google-cloud-php/pull/7179/commits/0596f277fa6ef38269683c767e9461a0c770ed4c
  • [x] Increase minimum core to ^1.55 https://github.com/googleapis/google-cloud-php/pull/7179/commits/bf2c50b7b85c663beec4861ef21ccb8c72b04538
  • [x] Mark Operation class as internal https://github.com/googleapis/google-cloud-php/pull/7179/commits/d6e2823a396a9190d0048e62b118d3e423d05180

BREAKING_CHANGE_REASON=RC-1 for the version 2 of the Datastore library.

yash30201 avatar Mar 26 '24 08:03 yash30201

I'll give this a more thorough review later today, but don't forget we need to remove all V1 GAPIC client classes. For Datastore V1, that would be Datastore/src/V1/DatastoreClient.php and Datastore/src/V1/DatastoreGrpcClient.php.

Also the PR title should be renamed to better describe what the PR is doing. For PubSub, we said "remove connection classes". I don't mind using V2 in the title (since we are bumping to a V2 version), but we do not need to include PHP in the title.

bshaffer avatar May 07 '24 15:05 bshaffer