Repository navigation
v2.0.0
Stewart 2.0 gives every part one word: Home Assistant's actions are actions everywhere, apps have one way to run code
later, and new projects get a namespace of their own. It also removes everything 1.x deprecated. One upgrading
command rewrites most of an existing project, and anything it leaves behind is named when Stewart starts, not found
when an app fails.
Highlights
Actions, from the call to the metrics. The types for calling an action carry its name, and so do the generated
classes:
$this->ha->callAction('light.turn_on', ['brightness_pct' => 60], ActionTarget::forAreas('hall'));
$this->actions->notify->mobileAppPhone(message: 'Motion in the hall');ServiceTarget, ServiceResponse and ServiceCallException are now ActionTarget, ActionResponse and
ActionCallException, and the generated Services is Actions. The limits and dry run that cover every call to Home
Assistant are ha_calls, and the metrics follow: stewart_app_ha_calls_total and the rest. "Service" now means
only your own classes in services.php.
One way to run code later. Apps no longer get Timers; runAfter() is the delay, shows in make status and
in traces, and Scheduler::waitFor() builds a wait of your own. How long an entity has held its state needs no
clock any more:
$quiet = $this->ha->getState('binary_sensor.hall_motion')?->isOff() === true
&& $this->ha->hasHeldStateFor('binary_sensor.hall_motion', Duration::minutes(10));A namespace for new projects. New projects put their apps under Automations\ instead of App\, which clashed
with the Stewart\Contracts\App interface every app imports. The generated classes take their namespace from
composer.json, so existing App\ projects need no setting.
Upgrades that explain themselves. Generated classes from 1.x, an old service_calls setting or a
STEWART_SERVICE_CALLS__… variable stop make check, the deploy gate and the start with one line that says what
to run. make stan reports old generated classes once instead of crashing on them.
Also new
make run DRY_RUN=1is nowstewart run --dry-run, so the Makefile no longer names a setting.- Metrics are served only on the metrics port; the admin port and the chart's
adminApi.podMonitorno longer offer
them. stewart generateno longer asks for--allow-shrinkwhen classes are only renamed.- Everything deprecated in 1.x is removed:
callService()and its test stubs,dispose()on apps without
Disposable, andActionManifest.
Upgrading
Run make upgrade VERSION=2.0, then the command from the
upgrading guide, then make generate, make stan and
make test. The command rewrites the renamed classes and settings in your apps, tests and configuration; make stan
points at the few hand edits left, such as an app that used Timers. Rename the metrics in dashboards and alerts,
and upgrade the Home Assistant integration and the Helm chart to 2.0.0 with the rest. The 1.x documentation stays at
stewart-php.github.io/docs/1.x, and runtime:1 images keep getting PHP and
Alpine fixes until the end of April 2027.
Every change is in the changelog.