Bamboo v1.0 Upgrade Guide¶
This guide walks 0.x installations through the final steps required to adopt the v1.0 contract freeze. It assumes the application already targets Bamboo v0.4 and OpenSwoole deployments.
Audience and prerequisites¶
- Source application currently running on Bamboo
^0.4
. - PHP 8.4 with the cURL, OpenSwoole, and Redis extensions available.
- Access to the deployment environment to update system packages and restart the HTTP workers.
Before proceeding, confirm the toolchain versions:
php -v
php --ri openswoole | grep Version
Step-by-step upgrade flow¶
- Back up configuration and environment files.
-
Commit local changes or create copies of
.env
and theetc/
directory. -
Update Composer dependencies.
- Bump Bamboo to the v1.0 constraint:
composer require greenarmor/bamboo:^1.0
. -
Run
composer install
to download updated packages. -
Run configuration validation.
- Execute
composer validate:config
to run the newconfig.validate
command. -
Address reported issues (missing keys, empty secrets, invalid timeouts) before continuing.
-
Adopt new configuration files.
- Copy
etc/resilience.php
and merge any project-specific overrides. This file defines timeout and circuit breaker defaults consumed by the new middleware. -
Ensure
etc/middleware.php
containsBamboo\Web\Middleware\CircuitBreakerMiddleware::class
andBamboo\Web\Middleware\TimeoutMiddleware::class
in the global stack. Custom configurations should merge these entries into their own arrays. -
Review module bootstrapping.
-
Applications relying on modules must update
etc/modules.php
to include module classes explicitly; v1.0 treats module order as part of the public contract documented indocs/modules.md
. -
Refresh the route cache (if used).
-
Run
php bin/bamboo routes.cache
after the application boots locally to regeneratevar/cache/routes.cache.php
without closures. -
Validate operational scripts.
- Update CI pipelines to call
composer validate:config
alongside linting and tests. -
Add
php bin/bench/http --label="pre-release"
to capture baseline numbers for regression monitoring. -
Smoke-test the application.
php bin/bamboo http.serve
locally; verify/
,/metrics
,/healthz
, and/readyz
respond as expected.-
Run the integration test suite (
composer test
). -
Deploy.
- Publish the updated Docker image or artefact.
- Monitor
/metrics
and the new circuit breaker metrics for anomalies during the first traffic window.
Compatibility matrix¶
Component | Supported versions |
---|---|
PHP | 8.4.x |
OpenSwoole | 22.1 or newer (built with coroutine and HTTP/WS support) |
Redis | 6.x or newer |
Prometheus client | promphp/prometheus_client_php ^2.7 |
Configuration deprecation policy¶
Configuration keys and files under etc/
participate in the v1.x compatibility promise. When schema changes are necessary:
- Deprecated keys remain functional for at least one minor release (e.g. a key marked in v1.2 continues working through v1.3). During the window Bamboo emits
E_USER_DEPRECATED
notices whenever the legacy key is read and highlights the pending removal in the release notes. - Replacement keys must be documented in both the configuration reference and release notes. Maintain fallbacks that read from both keys until the grace period expires.
- Run
composer validate:config
after updating Bamboo; the validator reports missing keys, empty secrets, and other drift before the configuration ships to production.
Example rename workflow¶
When etc/http.php
renames timeouts.default
to timeouts.client_default
:
- Ship Bamboo v1.2 with support for both keys:
$httpConfig = $config->get('http');
$defaultTimeout = $httpConfig['timeouts']['client_default']
?? $httpConfig['timeouts']['default']
?? 3.0;
Accessing timeouts.default
triggers a deprecation notice.
(In this example $config
is the injected Bamboo\Core\Config
service.)
- Document the rename in the release notes and update
docs/configuration/overview.md
so operators see the new key alongside the migration guidance. - Encourage users to run
composer validate:config
after updating their configuration files; the validator warns when only the deprecated key is present. - Remove the fallback in v1.4 once the grace period expires.
This policy keeps configuration migrations predictable while ensuring operators have clear tooling and documentation for the change window. Refer to the configuration overview for the canonical schema tables and additional examples.
Deprecations lifted in v1.0¶
No runtime deprecations remained pending for v1.0. The release formalises the configuration schema, router behaviour, and CLI command catalogue introduced throughout the 0.4 series. Future deprecations will be announced with warning emissions, upgrade notes, and automated tooling per the policies captured in the CLI and configuration references.
Additional resources¶
- CLI reference
- Router contract
- Configuration overview
- Performance benchmark playbook
- Starter blueprint hub
For further assistance, open a discussion on the project repository or join the community chat linked from the README.