Comments (7)
Ok we've got a fix planned. It will come early next week. Sorry about the breakage, please continue to use 1.10 for now.
from gax-php.
FYI @fiboknacky @aohren
from gax-php.
Not sure if that helps but debugging the unit test that fail, I found that the ApiException
instance is not created in the same way depending on the version of gax-php
being used.
1.10.0
: It uses the method createFromStdClass
and the metadata
is NULL
.
1.11.2
: It uses the method createFromRpcStatus
and the metadata
is a RepeatedField
got from status
.
from gax-php.
That definitely helps! That looks like the root cause.
from gax-php.
Actually, in looking at the create
documentation, the $metadata
may either be a PHP array OR a RepeatedField. So the fact that this is a RepeatedField is allowed.
from gax-php.
However, the documentation for ApiException
constructor indicates $metadata
should be an array
.
hmm.
from gax-php.
Ok so we are thinking that the this is a bug in gax-php that has kind of been lurking.
ApiException::create
is documented as accepting []mixed|RepeatedField
for $metadata
. That $metadata
value is passed to ApiException::_construct
untouched. ApiException::_construct
documents that it expects $metadata
to be an array
, and ApiException::getMetadata
documents the return type i.e. $metadata
is []mixed
.
So the bug is that ApiException::create
needs to convert $metadata
that's instanceof RepeatedField
into an array
prior to constructing the ApiException
.
The problem was introduced because ServerStream::readAll
was changed to construct an exception via ApiException::createFromRpcStatus
whereas it was ApiException::createFromStdClass
(a gRPC specific type) before. The former (the code recently released) supplies the Google/Rpc/Status::getDetails()
directly to ApiException::create
. Since it isn't "massaged" to the array
type as I mentioned earlier, this whole issue popped up.
from gax-php.
Related Issues (20)
- CredentialsWrapper doesn't use authCache when building ApplicationDefaultCredentials HOT 1
- syntax error, unexpected token "readonly", expecting identifier HOT 4
- PHP 8.1 Deprecation HOT 3
- Call to undefined method Google\Auth\CredentialsLoader::shouldLoadClientCertSource() HOT 2
- feat: add strict types to all class files
- Warning on PHP 8.1 in Polling Trait HOT 1
- ApiException::create() throws a fatal error when the error['message'] is not set. HOT 1
- how can i config auth http handler for CredentialsWrapper and how to make it become effective. HOT 4
- Feature Request: add GAPIC surface version to the x-goog header HOT 1
- Credential fetching exceptions aren't being handled HOT 3
- pollUntilComplete unauthenticated while (successfully) creating glossary HOT 1
- Creation of dynamic property Google\ApiCore\Tests\Unit\GapicClientTraitStub::$newClient is deprecated HOT 1
- Documentation generation is broken
- Bug Regarding URI Template HOT 2
- Error Google\ApiCore\Middleware\RetryMiddleware problem line 179 or 183 HOT 2
- v1.34.0 breaks the Google Ads API PHP users HOT 4
- segfault or memory exceeded for gRPC and invalid universe domain HOT 1
- 1.28.1 release breaking google-cloud-php-spanner (Universe domain check for grpc transport) HOT 3
- CredentialsWrapper doesn't use authHttpClient when updating meta data HOT 5
- Support for Compute V2 Operations Client in OperationsResponse
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gax-php.