Repository navigation
Tonka 3 Release #8
clicalmani
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Tonka v3.0.0 Release Notes
Release Date: October 24, 2026
Tonka v3.0.0 is a major release that modernizes the framework's data layer, expands the broadcasting and dependency injection capabilities, and introduces queueable metrics and notifications. Several changes affect existing APIs, so please review the Breaking Changes and Upgrade Guide sections before updating.
Highlights
mail,database, andbroadcast.InjectionResolverInterface.Breaking Changes
The following changes are not backward compatible. Applications upgrading from v2.x must update their entity definitions and custom property implementations.
1. Default values are now assigned directly to properties
The
Property(default: ...)attribute has been removed. Default values must now be assigned directly to the class property using native PHP syntax.Before (v2.x):
After (v3.x):
2. Nullable properties use native PHP 8 nullable types
The
Property(nullable: true)attribute has been removed. Nullable columns must now be declared using PHP 8's nullable type syntax (?type).Before (v2.x):
After (v3.x):
3. Custom properties moved from models to entities
Custom properties previously defined on models using Laravel-style accessors (
getXXXAttribute) are now defined on entities using PHP 8 property hooks or dedicated accessor methods. This aligns custom property resolution with the entity layer rather than the model layer.Before (v2.x):
After (v3.x):
This separation clarifies the responsibility boundary: models handle persistence and query building, while entities handle value representation and presentation logic.
What's New
1. Database & Entities
Native PHP 8 attributes for schema definition
Entity definitions are now fully expressed through native PHP 8 syntax — typed properties, default values, and nullable types. This makes entity classes self-documenting and eliminates the need for custom attributes.
Improved migration versioning through manifests
Migration versioning is now more discoverable and traceable through manifests. Each migration run produces a manifest entry that records the applied migrations and changes. This improves:
2. Custom Broadcasting Channels
Broadcasting previously supported three built-in channels:
mail,database, andbroadcast. In v3.0, you can define custom channels to deliver broadcast events through any transport — SMS, push notifications, webhooks, or proprietary protocols.A custom channel is a class that implements the channel contract and is registered in your application:
Register the channel in your broadcasting configuration and reference it by name in your events or notifications:
This makes Tonka's broadcasting system fully extensible — the built-in channels are no longer a closed set.
3. Method-Level Service Injection
Custom services can now be injected into controller methods (in addition to controller constructors) by implementing
InjectionResolverInterface. This reduces constructor bloat for controllers that use a service in only one or two methods.The resolver inspects the method signature, resolves the type-hinted services from the container, and injects them at call time. This is particularly useful for:
4. Queueable Metrics and Notifications
Notifications can now be queued for background processing, following the same patterns used for queueable mail and broadcast events. This is useful when:
Upgrade Guide
Follow these steps to upgrade from v2.x to v3.0:
Step 1 — Update the framework
Step 2 — Migrate entity attributes
Search your codebase for
Property(usages and replace them with native PHP syntax:grep -rn "Property(" app/Entities/For each occurrence:
#[Property(default: 'active')]protected string $status = 'active';#[Property(nullable: true)]protected ?string $bio = null;Step 3 — Migrate custom properties
Move custom property definitions from models (
getXXXAttribute) to entities using PHP 8 property hooks or explicit accessor methods.Step 4 — Review migration manifests
Run the migration status command to verify that all previous migrations are correctly recorded:
If a migration is reported as modified, restore the original file from version control before continuing.
Step 5 — Review custom broadcasting channels
If you relied on the closed set of built-in channels, no action is required — they are still supported. If you previously implemented ad-hoc delivery logic, consider refactoring it into a custom channel for clarity and reuse.
Step 6 — Review controllers for method-level injection
No action is required. Method-level injection via
InjectionResolverInterfaceis opt-in. You can adopt it incrementally where it improves clarity.Step 7 — Test in staging
Run your full test suite and exercise the application in a staging environment before deploying to production. Pay particular attention to:
Deprecations
The following APIs are deprecated in v3.0 and will be removed in v4.0:
Property(default: ...)attributeProperty(nullable: true)attribute?typegetXXXAttribute()accessorsDeprecated APIs continue to function in v3.0 with a deprecation notice logged once per request. Plan your migration accordingly.
Bug Fixes
Contributors
Thank you to everyone who contributed to this release. Your feedback, bug reports, and pull requests made this release possible.
Looking Ahead
Tonka v4.0 will remove the deprecated attributes and model-level accessors introduced in v2.x. We encourage all applications to migrate before then. In the meantime, we are continuing to invest in:
Stay tuned.
Upgrade issues? Open an issue on GitHub or reach out on the community forum.
Full Changelog: v2.5...v3.0
This discussion was created from the release Tonka 3 Release.
All reactions