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

`BetaAnalyticsDataClient` is documented as deprecated

Open cawa-93 opened this issue 1 year ago • 1 comments

The BetaAnalyticsDataClient has {@inheritdoc} inline tag

https://github.com/googleapis/google-cloud-php/blob/7e7440d62a8317c7c75dd96d292fae5c32f95829/AnalyticsData/src/V1beta/BetaAnalyticsDataClient.php#L31-L36

And inherit its docs from BetaAnalyticsDataGapicClient. But BetaAnalyticsDataGapicClient marked as @deprecated

https://github.com/googleapis/google-cloud-php/blob/7e7440d62a8317c7c75dd96d292fae5c32f95829/AnalyticsData/src/V1beta/Gapic/BetaAnalyticsDataGapicClient.php#L94-L99

This leads to a false-positive deprecation warning:

BetaAnalyticsDataClient is deprecated. 

Please use the new service client {@see \Google\Analytics\Data\V1beta\Client\BetaAnalyticsDataClient}

cawa-93 avatar Feb 06 '24 10:02 cawa-93

Same for AnalyticsAdminServiceClient https://github.com/googleapis/google-cloud-php/blob/7e7440d62a8317c7c75dd96d292fae5c32f95829/AnalyticsAdmin/src/V1beta/AnalyticsAdminServiceClient.php#L31-L36

https://github.com/googleapis/google-cloud-php/blob/7e7440d62a8317c7c75dd96d292fae5c32f95829/AnalyticsAdmin/src/V1beta/Gapic/AnalyticsAdminServiceGapicClient.php#L144-L149

cawa-93 avatar Feb 06 '24 11:02 cawa-93

Hey @cawa-93!

Thanks for letting us know, will take a look on this for a proper solution.

Hectorhammett avatar May 06 '24 20:05 Hectorhammett

Discussed offline but to summarize, these are separate classes. Let me try to explain better:

  • The class Google\Analytics\Data\V1beta\BetaAnalyticsDataClient is deprecated, and it extends Google\Analytics\Data\V1beta\Gapic\BetaAnalyticsDataClient. Both of these classes are deprecated, and they recommend using Google\Analytics\Data\V1beta\Client\BetaAnalyticsDataClient instead.
  • The class Google\Analytics\Data\V1beta\Client\BetaAnalyticsDataClient is NOT deprecated (notice it includes an extra Client namespace), and is the one recommended for use.

This is the same for the other classes you've listed. Sorry for the confusion - we will be removing the deprecated classes soon.

That being said, the messaging could absolutely be more clear, and we will work to improve this.

bshaffer avatar May 10 '24 16:05 bshaffer