PHPackages                             skyraptor/guzzle-services - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. skyraptor/guzzle-services

ActiveLibrary[API Development](/categories/api)

skyraptor/guzzle-services
=========================

Provides an implementation of the Guzzle Command library that uses Guzzle service descriptions to describe web services, serialize requests, and parse responses into easy to use model structures.

1.1.4(5y ago)0544MITPHPPHP &gt;=5.5

Since Mar 15Pushed 5y agoCompare

[ Source](https://github.com/bumbummen99/guzzle-services)[ Packagist](https://packagist.org/packages/skyraptor/guzzle-services)[ RSS](/packages/skyraptor-guzzle-services/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (4)Versions (16)Used By (0)

Guzzle Services
===============

[](#guzzle-services)

[![License](https://camo.githubusercontent.com/4ebfcc6f93b9ab9a275e755c3d035462c5e04d3136eff69ff5519b35413446b0/68747470733a2f2f706f7365722e707567782e6f72672f67757a7a6c65687474702f67757a7a6c652d73657276696365732f6c6963656e7365)](https://packagist.org/packages/guzzlehttp/guzzle-services)[![Build Status](https://camo.githubusercontent.com/2ef7ded3f2161e6652e9b42bbac8fa29a18f517e5c1b589ae2996d14be45a626/68747470733a2f2f7472617669732d63692e6f72672f67757a7a6c652f67757a7a6c652d73657276696365732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/guzzle/guzzle-services)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/2a20fb7814a76cde8a2487e18aefc51fa205b8c7c10359bf5ce5619851d03028/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f67757a7a6c652f67757a7a6c652d73657276696365732f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/guzzle/guzzle-services/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/eca87048d5b2fe4105fefcf8a91dd72397fc952d541460048bf6625ffccdb6d6/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f67757a7a6c652f67757a7a6c652d73657276696365732f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/guzzle/guzzle-services/?branch=master)[![SensioLabsInsight](https://camo.githubusercontent.com/09ef156317218b3981ba6afc2582a537cf617169a9d8f6095526005f8be0122d/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f62303862653637362d623230392d343062372d613664662d6236643133653864666636322f6d696e692e706e67)](https://insight.sensiolabs.com/projects/b08be676-b209-40b7-a6df-b6d13e8dff62)[![Latest Stable Version](https://camo.githubusercontent.com/6ba2ce138aecd205d5fbe0e988bf8756a3abf4d25c0b83dfe4a06efd73135db8/68747470733a2f2f706f7365722e707567782e6f72672f67757a7a6c65687474702f67757a7a6c652d73657276696365732f762f737461626c65)](https://packagist.org/packages/guzzlehttp/guzzle-services)[![Latest Unstable Version](https://camo.githubusercontent.com/cd239493a94440690967081b9ae8cd814292bdd29fad013d86c94a4efeaab671/68747470733a2f2f706f7365722e707567782e6f72672f67757a7a6c65687474702f67757a7a6c652d73657276696365732f762f756e737461626c65)](https://packagist.org/packages/guzzlehttp/guzzle-services)[![Total Downloads](https://camo.githubusercontent.com/f8ffefa3626217c01f01fa388398d50d0e39aa58e73d2161898d22e713ead631/68747470733a2f2f706f7365722e707567782e6f72672f67757a7a6c65687474702f67757a7a6c652d73657276696365732f646f776e6c6f616473)](https://packagist.org/packages/guzzlehttp/guzzle-services)

Provides an implementation of the Guzzle Command library that uses Guzzle service descriptions to describe web services, serialize requests, and parse responses into easy to use model structures.

```
use GuzzleHttp\Client;
use GuzzleHttp\Command\Guzzle\GuzzleClient;
use GuzzleHttp\Command\Guzzle\Description;

$client = new Client();
$description = new Description([
	'baseUri' => 'http://httpbin.org/',
	'operations' => [
		'testing' => [
			'httpMethod' => 'GET',
			'uri' => '/get{?foo}',
			'responseModel' => 'getResponse',
			'parameters' => [
				'foo' => [
					'type' => 'string',
					'location' => 'uri'
				],
				'bar' => [
					'type' => 'string',
					'location' => 'query'
				]
			]
		]
	],
	'models' => [
		'getResponse' => [
			'type' => 'object',
			'additionalProperties' => [
				'location' => 'json'
			]
		]
	]
]);

$guzzleClient = new GuzzleClient($client, $description);

$result = $guzzleClient->testing(['foo' => 'bar']);
echo $result['args']['foo'];
// bar
```

Installing
----------

[](#installing)

This project can be installed using Composer:

`composer require guzzlehttp/guzzle-services`

For **Guzzle 5**, use `composer require guzzlehttp/guzzle-services:0.6`.

**Note:** If Composer is not installed [globally](https://getcomposer.org/doc/00-intro.md#globally) then you may need to run the preceding Composer commands using `php composer.phar` (where `composer.phar` is the path to your copy of Composer), instead of just `composer`.

Plugins
-------

[](#plugins)

- Load Service description from file \[\]

Transition guide from Guzzle 5.0 to 6.0
---------------------------------------

[](#transition-guide-from-guzzle-50-to-60)

### Change regarding PostField and PostFile

[](#change-regarding-postfield-and-postfile)

The request locations `postField` and `postFile` were removed in favor of `formParam` and `multipart`. If your description looks like

```
[
    'baseUri' => 'http://httpbin.org/',
    'operations' => [
        'testing' => [
            'httpMethod' => 'GET',
            'uri' => '/get{?foo}',
            'responseModel' => 'getResponse',
            'parameters' => [
                'foo' => [
                    'type' => 'string',
                    'location' => 'postField'
                ],
                'bar' => [
                    'type' => 'string',
                    'location' => 'postFile'
                ]
            ]
        ]
    ],
]
```

you need to change `postField` to `formParam` and `postFile` to `multipart`.

More documentation coming soon.

Cookbook
--------

[](#cookbook)

### Changing the way query params are serialized

[](#changing-the-way-query-params-are-serialized)

By default, query params are serialized using strict RFC3986 rules, using `http_build_query` method. With this, array params are serialized this way:

```
$client->myMethod(['foo' => ['bar', 'baz']]);

// Query params will be foo[0]=bar&foo[1]=baz
```

However, a lot of APIs in the wild require the numeric indices to be removed, so that the query params end up being `foo[]=bar&foo[]=baz`. You can easily change the behaviour by creating your own serializer and overriding the "query" request location:

```
use GuzzleHttp\Command\Guzzle\GuzzleClient;
use GuzzleHttp\Command\Guzzle\RequestLocation\QueryLocation;
use GuzzleHttp\Command\Guzzle\QuerySerializer\Rfc3986Serializer;
use GuzzleHttp\Command\Guzzle\Serializer;

$queryLocation   = new QueryLocation('query', new Rfc3986Serializer(true));
$serializer      = new Serializer($description, ['query' => $queryLocation]);
$guzzleClient    = new GuzzleClient($client, $description, $serializer);
```

You can also create your own serializer if you have specific needs.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~197 days

Recently: every ~329 days

Total

13

Last Release

2068d ago

Major Versions

0.6.0 → 1.0.02016-11-24

PHP version history (2 changes)0.2.0PHP &gt;=5.4.0

1.0.0PHP &gt;=5.5

### Community

Maintainers

![](https://www.gravatar.com/avatar/509a5baf8d7d8f7ae8c5b569ee81b1d04ed6af1af625696777e51e997ff9a685?d=identicon)[bumbummen99](/maintainers/bumbummen99)

---

Top Contributors

[![mtdowling](https://avatars.githubusercontent.com/u/190930?v=4)](https://github.com/mtdowling "mtdowling (44 commits)")[![Konafets](https://avatars.githubusercontent.com/u/363363?v=4)](https://github.com/Konafets "Konafets (25 commits)")[![bakura10](https://avatars.githubusercontent.com/u/1198915?v=4)](https://github.com/bakura10 "bakura10 (9 commits)")[![GrahamCampbell](https://avatars.githubusercontent.com/u/2829600?v=4)](https://github.com/GrahamCampbell "GrahamCampbell (9 commits)")[![jeremeamia](https://avatars.githubusercontent.com/u/107867?v=4)](https://github.com/jeremeamia "jeremeamia (6 commits)")[![cordoval](https://avatars.githubusercontent.com/u/328359?v=4)](https://github.com/cordoval "cordoval (4 commits)")[![bumbummen99](https://avatars.githubusercontent.com/u/4533331?v=4)](https://github.com/bumbummen99 "bumbummen99 (4 commits)")[![sprak3000](https://avatars.githubusercontent.com/u/5545555?v=4)](https://github.com/sprak3000 "sprak3000 (4 commits)")[![fuhry](https://avatars.githubusercontent.com/u/1379912?v=4)](https://github.com/fuhry "fuhry (2 commits)")[![magnetik](https://avatars.githubusercontent.com/u/345029?v=4)](https://github.com/magnetik "magnetik (1 commits)")[![mookle](https://avatars.githubusercontent.com/u/164292?v=4)](https://github.com/mookle "mookle (1 commits)")[![my2ter](https://avatars.githubusercontent.com/u/52558?v=4)](https://github.com/my2ter "my2ter (1 commits)")[![peterfox](https://avatars.githubusercontent.com/u/1716506?v=4)](https://github.com/peterfox "peterfox (1 commits)")[![rfink](https://avatars.githubusercontent.com/u/108414?v=4)](https://github.com/rfink "rfink (1 commits)")[![siwinski](https://avatars.githubusercontent.com/u/1034024?v=4)](https://github.com/siwinski "siwinski (1 commits)")[![ASA1-ET-JENKINS](https://avatars.githubusercontent.com/u/48315530?v=4)](https://github.com/ASA1-ET-JENKINS "ASA1-ET-JENKINS (1 commits)")[![stovak](https://avatars.githubusercontent.com/u/119924?v=4)](https://github.com/stovak "stovak (1 commits)")[![bonndan](https://avatars.githubusercontent.com/u/143695?v=4)](https://github.com/bonndan "bonndan (1 commits)")[![danieledangeli](https://avatars.githubusercontent.com/u/3957293?v=4)](https://github.com/danieledangeli "danieledangeli (1 commits)")[![danizord](https://avatars.githubusercontent.com/u/1850941?v=4)](https://github.com/danizord "danizord (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/skyraptor-guzzle-services/health.svg)

```
[![Health](https://phpackages.com/badges/skyraptor-guzzle-services/health.svg)](https://phpackages.com/packages/skyraptor-guzzle-services)
```

###  Alternatives

[php-opencloud/openstack

PHP SDK for OpenStack APIs. Supports BlockStorage, Compute, Identity, Images, Networking and Metric Gnocchi

2292.2M23](/packages/php-opencloud-openstack)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
