Comments (7)
I just tagged a release of guzzle/command that addresses various issues I encountered while testing command based clients. Can you pull that down and see if it helps?
from guzzle-services.
Hey,
thanks for updating the repository. I still encounter the same issue. Here's the guzzle part of my package.json :
"require": {
"guzzlehttp/guzzle": "~4.0",
"guzzlehttp/guzzle-services": "dev-master",
"guzzlehttp/command": "0.4.0",
}
from guzzle-services.
Hi again,
I have finally solved, but I think this is still an issue.
The problem was that I didn't know that I had to replace the responseClass
by responseModel
, as it was not documented in the https://github.com/guzzle/guzzle/blob/master/UPGRADING.md .
FurtherMore, the test to see if an operation has a responseModel fails silently:
$operation = $command->getOperation();
if (!($modelName = $operation->getResponseModel())) {
return;
}
in the ProcessResponse
Class
from guzzle-services.
Hey guys! Sorry for jumping in out of nowhere.
@edi9999 if you want a working Guzzle 4 service client example, please take a look at this - https://github.com/dev-machine/guzzle-markus-client
It might be not perfect (as I'm investigating Guzzle 4 myself), but at least you can have a reference at service description and some tests. hth
from guzzle-services.
Yeah, you definitely need to specify responseModel (previously responseClass). I don't see that specified in your provided code which explains why nothing happened. I think it makes sense to convert responseClass attributes to responseModel when constructing an operation so that this works without needing to change an existing description.
As for failing silently, that's intentional; the command event system does not force a specific implementation but just provides a framework for injecting results onto commands. This should be allowed in most implementations of the command package to allow for flexible interoperability with other subscribers (e.g., someone might make a cache subscriber that intercepts commands).
from guzzle-services.
Ok thanks for the explanation, makes sense actually.
@lakiboy thanks a lot too, seems to be doing the same abstract things as I want !
from guzzle-services.
I pushed a change to make sure that responseClass is an alias of responseModel.
from guzzle-services.
Related Issues (20)
- Recommended test setup? HOT 1
- Unable to POST multipart parameters HOT 1
- Is there a way to put other models definition for list items ? HOT 1
- Raw request body data HOT 3
- What am i doing wrong ? HOT 3
- Please document how to use middleware with GuzzleClient HOT 1
- Better responseModel/responseClass feature. HOT 2
- Create request without root key HOT 1
- Support for Multiple `type` Options within Response Models
- Tests Fail with guzzlehttp/psr7 >= 1.6.0 HOT 1
- Feature Request - Ability to Bind Parameter Filters to Specific Request Stages
- What branch is under active development? HOT 2
- Feature Request: Ability to Specify "process: false" at Operation Level
- State of the project HOT 8
- guzzlehttp/guzzle dosn't work after update php to php 8 HOT 2
- Not possible to install on PHP <=7.3 HOT 2
- Why headers are not being passed ?
- Ran into composer issue because package does not auto update. HOT 5
- Extending a parameter that extends another parameter doesn't work as expected
- Add default property into response model HOT 1
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 guzzle-services.