Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Namespace issue on google analytics-admin and analytics-data php api. #2586

Open
bilal-ahmed-wpb opened this issue Apr 16, 2024 · 2 comments

Comments

@bilal-ahmed-wpb
Copy link

A question raised in my mind. The files in which there is the following comment:

Generated by the protocol buffer compiler. DO NOT EDIT!
In google/analytics-admin and google/analytics-data can I add my custom plugin namespace on them and will they work then?

And to make them work as I am using php-scoper to contain them under my own custom namespace in order to avoid plugin conflicts on Wordpress. Any guidance on this please.

@ajupazhamayil
Copy link

To give you a context on the comment, the code is fully generated by a generator and, in normal scenarios, if we change that code and merge it to the repository, the generator will generate the code again and overwrite it in the repository (local machines are safe on this overwrite as long as you don't pull the latest, but local machine will be stuck with the old code). Thats why we have that warning.

Hope this information helps.

@bilal-ahmed-wpb
Copy link
Author

bilal-ahmed-wpb commented Apr 25, 2024

But as I use the php-scoper or strauss (namespace tool) and then reuse the plugin I get following error:

WARNING MyPlugin\Google\Analytics\Admin\V1alpha\DataStream is not found in descriptor pool. Only generated classes may derive from Message

WARNING MyPlugin\Google\Analytics\Admin\V1alpha\ListDataStreamsRequest is not found in descriptor pool

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants