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.
westyx/nexus on Packagist. PHP 8.3 or newer;
every release is tested on 8.3, 8.4, 8.5 and 8.6. Latest release: v0.21.1 - see the
version history.
composer require westyx/nexusYou also need a PSR-18 HTTP client. Most projects already have one; if yours does not:
composer require 'guzzlehttp/guzzle:^7.15.1' # or
composer require symfony/http-client nyholm/psr7When using auto-discovery, the SDK automatically disables redirects and enforces finite timeouts on Guzzle and Symfony HttpClient. If you pass your own PSR-18 client instance, configure it with redirects disabled so credentials are never replayed to a redirect target.
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.
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 styleMIT