PHPackages                             pecm/pickling - 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. pecm/pickling

ActiveLibrary[API Development](/categories/api)

pecm/pickling
=============

A REST API Client for PECL and PEAR

561PHPCI failing

Since Nov 5Pushed 1y agoCompare

[ Source](https://github.com/pecm/pickling)[ Packagist](https://packagist.org/packages/pecm/pickling)[ RSS](/packages/pecm-pickling/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Pickling [![Maintainability](https://camo.githubusercontent.com/58b23a10817f455774107efc9a8668233696c7a911a8a227c10161ba5304392b/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f35393831313834306265333763356232653434342f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/pecm/pickling/maintainability) [![Total Downloads](https://camo.githubusercontent.com/d97ae07e4d0c62c6bb3cd35c0abf981b8ef02f7bc53744f50b7839be2b954d11/68747470733a2f2f706f7365722e707567782e6f72672f7065636d2f7069636b6c696e672f646f776e6c6f616473)](//packagist.org/packages/pecm/pickling)
====================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#pickling--)

Pickling is a simple yet powerful client for [PHP Extension Community Library](https://pecl.php.net/) and [PHP Extension and Application Repository](https://pear.php.net/) REST APIs.

Installation
------------

[](#installation)

At the core, Pickling works out-of-the-box with many HTTP Clients through [HTTPlug Discovery](https://packagist.org/packages/php-http/discovery).

In other words, it requires at least one package for each of the following implementations:

1. [psr/http-client-implementation](https://packagist.org/providers/psr/http-client-implementation)
2. [psr/http-factory-implementation](https://packagist.org/providers/psr/http-factory-implementation)
3. [psr/http-message-implementation](https://packagist.org/providers/psr/http-message-implementation)

To add Pickling to composer:

```
composer require pecm/pickling
```

A general suggestion for HTTP Client, using [kriswallsmith/buzz](https://packagist.org/packages/kriswallsmith/buzz)and [nyholm/psr7](https://packagist.org/packages/nyholm/psr7):

```
composer require kriswallsmith/buzz nyholm/psr7
```

Usage
-----

[](#usage)

More usage examples beyond the simple ones below can be found on the [examples/](examples/) folder.

**Factory Instantiation**

```
// pecl client with standard options
$peclClient = Pickling\Factory::createPecl();

// pear client with standard options
$pearClient = Pickling\Factory::createPear();
```

**Customized Instantiation**

```
// pecl client
$peclClient = new Pickling\Client(
  // a class that implements Pickling\Channel\ChannelInterface
  new Pickling\Channel\Pecl(),
  // a class that implements Psr\Http\Client\ClientInterface
  new Http\Client\Socket\Client(),
  // a class that implements Psr\Http\Message\RequestFactoryInterface
  new Nyholm\Psr7\Factory\Psr17Factory(),
  // a class that implements Psr\Http\Message\StreamFactoryInterface
  new Nyholm\Psr7\Factory\Psr17Factory()
);

// pear client
$pearClient = new Pickling\Client(
  // a class that implements Pickling\Channel\ChannelInterface
  new Pickling\Channel\Pear(),
  // a class that implements Psr\Http\Client\ClientInterface
  new Http\Client\Socket\Client(),
  // a class that implements Psr\Http\Message\RequestFactoryInterface
  new Nyholm\Psr7\Factory\Psr17Factory(),
  // a class that implements Psr\Http\Message\StreamFactoryInterface
  new Nyholm\Psr7\Factory\Psr17Factory()
);
```

### Client

[](#client)

**Get Package List**

```
$peclClient->getPackageList();

Pickling\Resource\PackageList Object
(
  [channel:Pickling\Resource\PackageList:private] => "pecl.php.net"
  [list:Pickling\Resource\PackageList:private] => Array
  (
    [0] => "ahocorasick"
    // ...
    [408] => "zstd"
  )
)
```

### Package

[](#package)

**Get Package Release List**

```
$peclClient->with('amqp')->getReleaseList();

Pickling\Resource\Package\ReleaseList Object
(
  [packageName:Pickling\Resource\Package\ReleaseList:private] => "amqp"
  [channel:Pickling\Resource\Package\ReleaseList:private] => "pecl.php.net"
  [list:Pickling\Resource\Package\ReleaseList:private] => Array
  (
    [0] => Pickling\Resource\Package\Release\Version Object
    (
      [number:Pickling\Resource\Package\Release\Version:private] => "1.10.2"
      [stability:Pickling\Resource\Package\Release\Version:private] => "stable"
    )
    // ...
    [41] => Pickling\Resource\Package\Release\Version Object
    (
      [number:Pickling\Resource\Package\Release\Version:private] => "0.1.0"
      [stability:Pickling\Resource\Package\Release\Version:private] => "beta"
    )
  )
)
```

**Get Package Latest Release**

```
$peclClient->with('amqp')->getLatestVersion();

"1.10.2"
```

**Get Package Info**

```
$peclClient->with('amqp')->getInfo();

Pickling\Resource\Package\Info Object
(
  [packageName:Pickling\Resource\Package\Info:private] => "amqp"
  [channel:Pickling\Resource\Package\Info:private] => "pecl.php.net"
  [category:Pickling\Resource\Package\Info:private] => "Networking"
  [license:Pickling\Resource\Package\Info:private] => "PHP License"
  [licenseUri:Pickling\Resource\Package\Info:private] => ""
  [summary:Pickling\Resource\Package\Info:private] => "Communicate with any AMQP compliant server"
  [description:Pickling\Resource\Package\Info:private] => "This extension can communicate with any AMQP spec 0-9-1 compatible server, such as RabbitMQ, OpenAMQP and Qpid, giving you the ability to create and delete exchanges and queues, as well as publish to any exchange and consume from any queue."
  [packageReleasesLocation:Pickling\Resource\Package\Info:private] => ""
  [parentPackage:Pickling\Resource\Package\Info:private] => ""
  [packageReplaceBy:Pickling\Resource\Package\Info:private] => ""
  [channelReplaceBy:Pickling\Resource\Package\Info:private] => ""
)
```

### Package Release

[](#package-release)

**Get Release Info**

```
$peclClient->with('amqp')->at('1.10.2')->getInfo();

Pickling\Resource\Package\Release\Info Object
(
  [packageName:Pickling\Resource\Package\Release\Info:private] => "amqp"
  [channel:Pickling\Resource\Package\Release\Info:private] => "pecl.php.net"
  [version:Pickling\Resource\Package\Release\Info:private] => "1.10.2"
  [stability:Pickling\Resource\Package\Release\Info:private] => "stable"
  [license:Pickling\Resource\Package\Release\Info:private] => "PHP License"
  [releasingMaintainer:Pickling\Resource\Package\Release\Info:private] => "lstrojny"
  [summary:Pickling\Resource\Package\Release\Info:private] => "Communicate with any AMQP compliant server"
  [description:Pickling\Resource\Package\Release\Info:private] => "This extension can communicate with any AMQP spec 0-9-1 compatible server, such as RabbitMQ, OpenAMQP and Qpid, giving you the ability to create and delete exchanges and queues, as well as publish to any exchange and consume from any queue."
  [releaseDate:Pickling\Resource\Package\Release\Info:private] => "2020-04-05 15:41:28"
  [releaseNotes:Pickling\Resource\Package\Release\Info:private] => "- Windows build: avoid variable lengths arrays (Christoph M. Becker) (https://github.com/pdezwart/php-amqp/issues/368)

For a complete list of changes see:
https://github.com/pdezwart/php-amqp/compare/v1.10.1...v1.10.2"
  [releaseSize:Pickling\Resource\Package\Release\Info:private] => 107350
  [downloadUri:Pickling\Resource\Package\Release\Info:private] => "https://pecl.php.net/get/amqp-1.10.2"
  [packageLink:Pickling\Resource\Package\Release\Info:private] => ""
)
```

License
-------

[](#license)

This library is licensed under the [MIT License](LICENSE).

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance30

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity16

Early-stage or recently created project

 Bus Factor1

Top contributor holds 80% of commits — single point of failure

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/42b9c9cbc06973a61587667fc811b853f4d71843f35ba2535f3900083e69ab3f?d=identicon)[flavioheleno](/maintainers/flavioheleno)

---

Top Contributors

[![flavioheleno](https://avatars.githubusercontent.com/u/471860?v=4)](https://github.com/flavioheleno "flavioheleno (28 commits)")[![llaville](https://avatars.githubusercontent.com/u/364342?v=4)](https://github.com/llaville "llaville (7 commits)")

---

Tags

pearpeclphp-libraryrest-apirest-api-clientrest-client

### Embed Badge

![Health badge](/badges/pecm-pickling/health.svg)

```
[![Health](https://phpackages.com/badges/pecm-pickling/health.svg)](https://phpackages.com/packages/pecm-pickling)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[facebook/php-business-sdk

PHP SDK for Facebook Business

90821.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

74513.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

265103.1M454](/packages/google-gax)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)

PHPackages © 2026

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