bigbluebutton / bigbluebutton-api-php
BigBlueButton PHP API Library for PHP
Package info
github.com/bigbluebutton/bigbluebutton-api-php
pkg:composer/bigbluebutton/bigbluebutton-api-php
Requires
- php: >=8.2
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- ext-simplexml: *
Requires (Dev)
- bmitch/churn-php: ^1.7
- captainhook/captainhook: ^5.23
- captainhook/hook-installer: ^1.0
- fakerphp/faker: ^1.23
- friendsofphp/php-cs-fixer: ^3.54
- nunomaduro/phpinsights: ^2.11
- nyholm/psr7: ^1.8
- php-http/curl-client: ^2.4
- phpstan/phpstan: ^1.10
- phpunit/php-code-coverage: ^10.1
- phpunit/phpunit: ^10.5
- psr/http-client: ^1.0
- psr/http-factory: ^1.1
- squizlabs/php_codesniffer: ^3.9
- vlucas/phpdotenv: ^5.6
- wapmorgan/php-deprecation-detector: ^2.0
Suggests
- psr/http-client: To inject your own PSR-18 http client via BigBlueButton::createWithHttpClient()
- psr/http-factory: To inject your own PSR-17 factories via BigBlueButton::createWithHttpClient()
README
The official BigBlueButton PHP API Client provides a developer-friendly wrapper to interact with the BigBlueButton API. Built for PHP 8.2+, this library simplifies integration and management of BigBlueButton servers in your PHP applications.
Installation and Usage
Install the library via Composer:
composer require bigbluebutton/bigbluebutton-api-php
Usage instructions and the full API documentation live in the mdBook documentation (build it locally with mdbook build docs).
Bugs and feature requests are tracked on GitHub
Build the documentation
To build the documentation you need to install Rust and mdbook
curl https://sh.rustup.rs -sSf | sh -s -- -y source "$HOME/.cargo/env" cargo install mdbook
Contributing guidelines
See the contributing documentation for the full workflow.
๐ Issues & Feature Requests
Please use the GitHub Issues tracker to report bugs or suggest new features.
๐งช Code Quality & Testing
This project follows strict code quality checks before allowing commits. Here's how to contribute effectively:
1. Coding Style
# Using Composer alias composer code-fix # Or directly PHP_CS_FIXER_IGNORE_ENV=1 ./vendor/bin/php-cs-fixer fix --allow-risky yes
2. Static Analysis
composer code-check
# Or
./vendor/bin/phpstan analyse
3. Testing
# using an alias composer code-test # or the same w/o alias ./vendor/bin/phpunit
To run a specific test:
# using an alias $ composer code-test -- --filter BigBlueButtonTest::testApiVersion # or the same w/o alias $ ./vendor/bin/phpunit --filter BigBlueButtonTest::testApiVersion
To generate a code coverage report (requires a coverage driver such as Xdebug or PCOV, stored in ./var/coverage/):
composer code-coverage
Regular test runs (composer code-test) do not collect coverage and therefore do not require a coverage driver.
4. Configuration
To connect tests to your own BigBlueButton server, copy .env to .env.local and configure:
BBB_SERVER_BASE_URL=https://your-bbb-server.example.com/bigbluebutton/ BBB_SECRET=your-secret
5. HTTP Client
The library uses curl by default and has no HTTP client dependency. Alternatively, inject any PSR-18 client with its PSR-17 factories:
use BigBlueButton\BigBlueButton; use GuzzleHttp\Client; use GuzzleHttp\Psr7\HttpFactory; $factory = new HttpFactory(); $bbb = BigBlueButton::createWithHttpClient( new Client(['timeout' => 10]), $factory, $factory, 'https://your-bbb-server.example.com/bigbluebutton/', 'your-secret', );
See the HTTP Client documentation for more examples (Guzzle, Symfony HttpClient, php-http) and behavioral notes.
โ Pre-Commit Checks (CaptainHook)
We use CaptainHook to enforce code quality:
- โ๏ธ Commit message format (beams)
- โ๏ธ Code style (PHPCS-Fixer)
- โ๏ธ Static analysis (PHPStan)
- โ๏ธ PHPUnit tests
You can manually run all pre-commit checks to avoid errors:
composer code-fix composer code-check composer code-test
Do not skip checks using
--no-verifyunless absolutely necessary.
CaptainHook should be installed automatically after the first composer install. If not:
vendor/bin/captainhook install
๐ท๏ธ Versioning and Releases
This project follows Semantic Versioning (MAJOR.MINOR.PATCH):
- MAJOR for incompatible API changes
- MINOR for backwards-compatible functionality additions
- PATCH for backwards-compatible bug fixes
Releases are published as git tags in the x.x.x format without a v prefix (like the existing 2.3.1) and are summarized in CHANGELOG.md. When preparing a release, move the changelog's [Unreleased] section to the new version and tag the release commit.
๐ License
This project is licensed under the terms of the LGPL-3.0.
