centralnic-reseller / php-sdk
API connector library for the insanely fast Team Internet Backend APIs (CentralNic Reseller, Internet.bs, Moniker)
Package info
github.com/centralnicgroup-opensource/rtldev-middleware-php-sdk
pkg:composer/centralnic-reseller/php-sdk
Requires
- php: >=8.3.0
- ext-curl: *
- centralnic-reseller/idn-converter: ^1.0
Requires (Dev)
- phpstan/extension-installer: ^1.4
- phpstan/phpstan: ^2.0
- phpunit/phpunit: ^12.0
- rector/rector: ^2.0
- robiningelbrecht/phpunit-pretty-print: ^1.5
- slevomat/coding-standard: ^8.0
- squizlabs/php_codesniffer: ^4.0
- vimeo/psalm: ^6.0
This package is auto-updated.
Last update: 2026-06-12 14:10:18 UTC
README
This module is a connector library for the insanely fast CNIC Backend APIs (CentralNic Reseller, internet.bs, moniker). Do not hesitate to contact us in case of questions.
Resources
- Documentation Links (PHP-SDK internal registrar id available in round brackets):
- Release Notes
Usage
composer require centralnic-reseller/php-sdk
Find a demo app for the Brand of choice in the tests folder that should help you with getting started.
e.g. tests/CNR/app.php etc.
Dev Container
If you want to contribute, we recommend using Visual Studio Code and to follow the below setup instructions:
- Add an entry in your hosts file:
127.0.0.1 devsdk.centralnicreseller.net
PHP SDK Data can be accessed via apache server at this url: http://devsdk.centralnicreseller.net
Environment variables (env.sh)
The devcontainer looks for an env.sh file in the workspace root and automatically sources it in two places:
- Every new integrated-terminal session — the file is sourced via
~/.zshenvso credentials are available as soon as you open a terminal, without a manualsource env.sh. - PHPUnit runs triggered from the VSCode UI — the PHPUnit wrapper script sources
env.shbefore invoking PHP, so IDE-triggered tests see the same variables ascomposer testdoes from the terminal.
env.sh is listed in .gitignore and will never be committed. Create it once in the workspace root with the variables you need, for example:
export RTLDEV_MW_CI_USER_CNR=<your-username> export RTLDEV_MW_CI_USERPASSWORD_CNR=<your-password> export RTLDEV_MW_CI_ROLE_CNR=<your-user-role-name> export RTLDEV_MW_CI_ROLEPASSWORD_CNR=<your-user-role-password> export RTLDEV_MW_CI_USER_IBS=<your-username> export RTLDEV_MW_CI_USERPASSWORD_IBS=<your-password> export RTLDEV_MW_CI_USER_MONIKER=<your-username> export RTLDEV_MW_CI_USERPASSWORD_MONIKER=<your-password>
Note
The auto-loading takes effect for new terminal sessions. If your terminal was already open when you created or updated env.sh, run source env.sh once in that session or open a new terminal.
Running the Demo Application
To run the demo application, follow these steps:
-
Set Your Credentials: You need to ensure your credentials are available. The recommended approach inside the devcontainer is to create an
env.shfile in the workspace root — see Environment variables (env.sh) for details. Alternatively, you can directly replace the credential placeholders inside the demo application file. -
Execute the Demo: Once the credentials are configured, run the appropriate demo command:
Run the below npm scripts (or execute the related commands covered in package.json):
# CentralNic Reseller npm run test-demo-cnr # internet.bs npm run test-demo-ibs # Moniker npm run test-demo-moniker
-
Update Demo Contents: If you need to modify the demo contents, the relevant files are located at:
# CentralNic Reseller tests/CNR/app.php # internet.bs tests/IBS/app.php # Moniker tests/MONIKER/app.php
CI / Testing
CI is powered by reusable GitHub Actions workflows. The test matrix covers:
| PHP Version | Status |
|---|---|
| 8.3 | ✓ |
| 8.4 | ✓ |
| 8.5 | ✓ |
The matrix is configured via the repository variable RTLDEV_MW_CI_PHP_MATRIX.
Maintainers
- Kai Schwarz - KaiSchwarz-cnic
- Asif Nawaz - KaiSchwarz-cnic
License
This project is licensed under the MIT License - see the LICENSE file for details.