Search by

westyx / nexus

westyx

Westyx Nexus PHP SDK - secrets, configs and feature flags

Package info

gitlab.com/westyx/nexus/sdk/php

pkg:composer/westyx/nexus

Statistics

Installs: 14

Dependents: 0

Suggesters: 0

Stars: 0

v0.19.1 2026-11-19 14:40 UTC

This package is auto-updated.

Last update: 2026-11-19 14:08:53 UTC


README

Official PHP SDK for the Westyx Nexus secrets, configs and feature flags platform. Reads are served from an in-memory snapshot refreshed on a TTL; a long-running worker can follow the live stream instead. Built on PSR-18 and PSR-17, so it uses the HTTP client your project already has. A Laravel service provider and an OpenFeature provider ship inside the package.

Documentation: docs.westyx.dev/sdks/php - start with Installation. The wiki carries the same pages.

Package

westyx/nexus on Packagist and on the GitLab Composer registry. PHP 8.3 or newer; every release is tested on 8.3, 8.4 and 8.5. Latest release: v0.19.1 - see the version history.

Install

composer require westyx/nexus

You also need a PSR-18 HTTP client. Most projects already have one; if yours does not:

composer require guzzlehttp/guzzle          # or
composer require symfony/http-client nyholm/psr7

Quick start

use WestyxNexus\NexusClient;
use WestyxNexus\NexusConfig;

$client = NexusClient::create(new NexusConfig(
    baseUrl: 'https://blue-ocean-a5rx7.westyx.dev',
    apiKey:  (string) getenv('NEXUS_API_KEY'),
));

$host    = $client->getConfig('db_host');
$pass    = $client->getSecret('db_password');
$enabled = $client->getFlag('new-feature', false);

create performs the first sync and throws if it fails. In Laravel, installing the package is the whole setup: app('nexus') and constructor injection of NexusClient both work.

Development

composer install
vendor/bin/phpunit                                   # tests
vendor/bin/phpstan analyse --memory-limit=1G         # static analysis, level 10
vendor/bin/php-cs-fixer fix --dry-run --diff         # code style

Publishing

A pushed semver tag publishes the package to the GitLab Composer registry and notifies Packagist, both taking the version from the tag. Committing to main releases nothing.

License

MIT