verystar / nacos-php-sdk
The alibaba nacos SDK for php
Installs: 486
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 4
Forks: 0
Open Issues: 0
pkg:composer/verystar/nacos-php-sdk
Requires
- php: >=5.6
 
Requires (Dev)
- phpunit/phpunit: ~5.7
 
This package is auto-updated.
Last update: 2025-10-07 19:16:27 UTC
README
Aliyun Nacos SDK for PHP
Install
composer require verystar/nacos-php-sdk
Or add a dependency to the composer.json
"require": {
    "verystar/nacos-php-sdk": "1.0.*"
}
Run
composer update
Usage
use Very\Nacos\Client; $client = new Client([ "username"=>"***********", "password"=>"***********", "server_addr"=>"https://test.nacos.com", "namespace"=>"***********", ]); //get config $ret = $client->getConfig("test","DEFAULT_GROUP"); print_r($ret); //save config if config file not exists $client->saveConfig("test","DEFAULT_GROUP","./config/db.php");
Exception
if throw NacosException,the fetch configuration failed
License
The SDK is open-sourced software licensed under the MIT license.