google-cloud-php
google-cloud-php copied to clipboard
verify class references across the client libraries
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@seefails to match a class. - As a last resort, verify manually by searching for
@seereferences in the handwritten libraries.
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.
Fixed by #6647