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

verify class references across the client libraries

Open bshaffer opened this issue 1 year ago • 1 comments

See https://github.com/googleapis/google-cloud-php/pull/6624

We had broken class references in our PHPDoc @see tags. We need to verify this does not exist in other components (namely, handwritten libraries). Some ways to potentially do this:

  • See if it's possible to check these using phpstan - this would be the most ideal place, if it's possible.
  • Verify these as part of our DocFX tests - as these are parsed by phpunit.xml, there should be a way to throw an error when @see fails to match a class.
  • As a last resort, verify manually by searching for @see references in the handwritten libraries.

bshaffer avatar Sep 13 '23 16:09 bshaffer

The PR provided here changes objects in a namespace {@see Google\Cloud\Storage\StorageObject} to {@see StorageObject}, but I think a better way to handle could have been {@see \Google\Cloud\Storage\StorageObject}, extra \ before Google. This way we can retain the full reference if a future tool needs it.

But its a full path vs relative path debate.

vishwarajanand avatar Sep 23 '23 12:09 vishwarajanand

Fixed by #6647

yash30201 avatar Apr 30 '24 08:04 yash30201