PHPackages                             g4/gateway - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. g4/gateway

ActiveLibrary[HTTP &amp; Networking](/categories/http)

g4/gateway
==========

gateway php library

3.3.0(7mo ago)169.0k↓33.3%72MITPHPPHP &gt;=8.2

Since Jan 30Pushed 7mo ago10 watchersCompare

[ Source](https://github.com/g4code/gateway)[ Packagist](https://packagist.org/packages/g4/gateway)[ RSS](/packages/g4-gateway/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (5)Versions (54)Used By (2)

gateway
=======

[](#gateway)

> gateway - [php](http://php.net) library

Install
-------

[](#install)

Via Composer

```
composer require g4/gateway
```

Usage
-----

[](#usage)

```
use G4\Gateway\Options;
use G4\Gateway\Http;

$options = new Options();
$options
    ->addHeader('Accept', 'application/json')   // optional
    ->setTimeout(30)                            // optional
    ->setSslVerifyPeer(true);                   // optional

$http = new Http('http://api.url', $options)
$http
    ->setServiceName('maps');                   // optional

$response = $http->get(['id' => 123]);          // post(), put(), delete()

echo $response->getCode();
echo $response->getBody();
```

Development
-----------

[](#development)

### Install dependencies

[](#install-dependencies)

```
$ make install

```

### Run tests

[](#run-tests)

```
$ make unit-tests

```

License
-------

[](#license)

(The MIT License) see LICENSE file for details...

###  Health Score

56

—

FairBetter than 98% of packages

Maintenance62

Regular maintenance activity

Popularity33

Limited adoption so far

Community26

Small or concentrated contributor base

Maturity89

Battle-tested with a long release history

 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 ~81 days

Recently: every ~179 days

Total

49

Last Release

235d ago

Major Versions

0.x-dev → 1.0.02016-02-17

1.6.4 → 2.0.02019-01-25

2.3.0 → 3.0.02023-10-11

PHP version history (4 changes)0.1.0PHP &gt;=5.4

2.0.0PHP &gt;=5.6

3.0.0PHP &gt;=7.3

3.1.0PHP &gt;=8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/12ceafbc629c3019d7cd78dfec322d694f44e0df8741bc6044f4acbf99964ff8?d=identicon)[g4code](/maintainers/g4code)

---

Top Contributors

[![gomboc](https://avatars.githubusercontent.com/u/1145653?v=4)](https://github.com/gomboc "gomboc (53 commits)")[![sinisalackovic](https://avatars.githubusercontent.com/u/25299913?v=4)](https://github.com/sinisalackovic "sinisalackovic (38 commits)")[![ppavlovic](https://avatars.githubusercontent.com/u/2664974?v=4)](https://github.com/ppavlovic "ppavlovic (13 commits)")[![ivankoni](https://avatars.githubusercontent.com/u/570997?v=4)](https://github.com/ivankoni "ivankoni (13 commits)")[![mirko-bukilic](https://avatars.githubusercontent.com/u/76707321?v=4)](https://github.com/mirko-bukilic "mirko-bukilic (3 commits)")[![DarkGit](https://avatars.githubusercontent.com/u/10722199?v=4)](https://github.com/DarkGit "DarkGit (2 commits)")[![dsamardzija](https://avatars.githubusercontent.com/u/366252?v=4)](https://github.com/dsamardzija "dsamardzija (1 commits)")[![sanjamedic](https://avatars.githubusercontent.com/u/13198949?v=4)](https://github.com/sanjamedic "sanjamedic (1 commits)")[![draganninkoviccode](https://avatars.githubusercontent.com/u/79252639?v=4)](https://github.com/draganninkoviccode "draganninkoviccode (1 commits)")[![UrosPurtic](https://avatars.githubusercontent.com/u/52161020?v=4)](https://github.com/UrosPurtic "UrosPurtic (1 commits)")[![zeljkosbgd](https://avatars.githubusercontent.com/u/4016203?v=4)](https://github.com/zeljkosbgd "zeljkosbgd (1 commits)")

---

Tags

httpclientrestgateway

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/g4-gateway/health.svg)

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

###  Alternatives

[printu/labelary

PHP API for Labelary.com

34616.9k](/packages/printu-labelary)[slimpay/hapiclient

An HTTP Client using HAL as the format for resources.

14317.3k](/packages/slimpay-hapiclient)[e-moe/guzzle6-bundle

Integrates Guzzle 6 into your Symfony application

11259.2k](/packages/e-moe-guzzle6-bundle)[jsor/hal-client

A lightweight client for consuming and manipulating Hypertext Application Language (HAL) resources.

2425.9k1](/packages/jsor-hal-client)

PHPackages © 2026

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