PHPackages                             universityofadelaide/openshift-client - 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. universityofadelaide/openshift-client

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

universityofadelaide/openshift-client
=====================================

Simple OpenShift client for PHP.

0.1.2(7y ago)49.9k↓50%2[1 PRs](https://github.com/universityofadelaide/openshift-client/pulls)MITPHP

Since Jun 30Pushed 7mo ago7 watchersCompare

[ Source](https://github.com/universityofadelaide/openshift-client)[ Packagist](https://packagist.org/packages/universityofadelaide/openshift-client)[ RSS](/packages/universityofadelaide-openshift-client/feed)WikiDiscussions develop Synced 1mo ago

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

Simple OpenShift PHP Client
===========================

[](#simple-openshift-php-client)

Provides a simple standalone client and a wrapper for the rather verbose [universityofadelaide/openshift-restclient-php](https://github.com/universityofadelaide/openshift-restclient-php) generated by [Swagger codegen](https://github.com/swagger-api/swagger-codegen).

Getting started
---------------

[](#getting-started)

Require the client using composer:

```
composer require universityofadelaide/openshift-client dev-master

```

Usage
-----

[](#usage)

Create an instance of the `Client` class by providing an OpenShift API URL and authentication token:

```
use UniversityOfAdelaide\OpenShift\Client;

...

$client = new Client('https://192.168.64.2:8443/api/v1/', 'big_secret_token_hash', 'project');
```

How to Test
-----------

[](#how-to-test)

Create a `test.php` or similar file in the root of the project.

Add the following to this file:

```
require_once __DIR__ . './../../autoload.php';

use UniversityOfAdelaide\OpenShift\Client;

$host = 'https://pathToOpenshift.host';
$token = 'yourOpenShiftToken';
$namespace = 'project';

// Get the arguments required
$client = new Client($host, $token, $namespace, TRUE);

// Attempt to create a secret.
$response = $client->createSecret('superSecret', ['username' => 'pied_piper', 'pass', 'middleout']);
```

How to test with phpunit and minishift
--------------------------------------

[](#how-to-test-with-phpunit-and-minishift)

Ensure that you have the oc command available.

The token will expire every 24 hours, if the token is expired you will need to login again.

```
oc login -u developer -p developer
```

```
# Assumes myproject (default) is available.
# From the /vendor/universityofadelaide/openshift-client directory
../../bin/phpunit tests/ClientTest.php $(minishift console --url) $(oc whoami -t) myproject client_test.json
```

Actual deployment
-----------------

[](#actual-deployment)

Manually create a mysql container in OpenShift, make note of the db name, username and password, and put those into the client\_test.json envVars section.

### Test clean up scripts

[](#test-clean-up-scripts)

Remove all objects created during tests :

```
# Assuming all the names for items created contain 'pied'
name=pied; for type in dc bc is svc pvc route pods job cronjob secrets; do for item in $(oc get "${type}" | grep ${name} | awk '{ print $1 }'); do oc delete ${type} ${item}; done; done
```

Todo
----

[](#todo)

- Complete implementation of interface.
- Improve test coverage, test the response json object rather that just the status code.

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance44

Moderate activity, may be stable

Popularity29

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 56.9% 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.

###  Release Activity

Cadence

Every ~23 days

Total

2

Last Release

2567d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/234746?v=4)[Simon Lindsay](/maintainers/singularo)[@singularo](https://github.com/singularo)

![](https://www.gravatar.com/avatar/5d047134e546e52cef36163d4369e3a8cbc2e191882137fb8ea638c559673503?d=identicon)[caseyfw](/maintainers/caseyfw)

![](https://www.gravatar.com/avatar/8b61edeef33ea50ed397d29e4e9fbb068526e37e7e032c64d52f5ca112525e1e?d=identicon)[pingers](/maintainers/pingers)

---

Top Contributors

[![pingers](https://avatars.githubusercontent.com/u/1512865?v=4)](https://github.com/pingers "pingers (62 commits)")[![bart88](https://avatars.githubusercontent.com/u/2253412?v=4)](https://github.com/bart88 "bart88 (31 commits)")[![acbramley](https://avatars.githubusercontent.com/u/569927?v=4)](https://github.com/acbramley "acbramley (14 commits)")[![caseyfw](https://avatars.githubusercontent.com/u/248665?v=4)](https://github.com/caseyfw "caseyfw (2 commits)")

---

Tags

openshiftphprest-client

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/universityofadelaide-openshift-client/health.svg)

```
[![Health](https://phpackages.com/badges/universityofadelaide-openshift-client/health.svg)](https://phpackages.com/packages/universityofadelaide-openshift-client)
```

###  Alternatives

[spatie/crawler

Crawl all internal links found on a website

2.8k16.3M52](/packages/spatie-crawler)[omniphx/forrest

A Laravel library for Salesforce

2724.4M8](/packages/omniphx-forrest)[akamai-open/edgegrid-client

Implements the Akamai {OPEN} EdgeGrid Authentication specified by https://developer.akamai.com/introduction/Client\_Auth.html

482.5M6](/packages/akamai-open-edgegrid-client)[muhammadhuzaifa/telescope-guzzle-watcher

Telescope Guzzle Watcher provide a custom watcher for intercepting http requests made via guzzlehttp/guzzle php library. The package uses the on\_stats request option for extracting the request/response data. The watcher intercept and log the request into the Laravel Telescope HTTP Client Watcher.

98239.8k1](/packages/muhammadhuzaifa-telescope-guzzle-watcher)[onesignal/onesignal-php-api

A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com

34170.2k2](/packages/onesignal-onesignal-php-api)[ory/hydra-client-php

Documentation for all of Ory Hydra's APIs.

1710.8k](/packages/ory-hydra-client-php)

PHPackages © 2026

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