lwekuiper/statamic-hubspot
A Statamic addon that connects your site to HubSpot. Embed HubSpot forms, route Statamic form submissions into HubSpot, and keep contacts and lead data synced with your CRM through a simple, config-driven setup managed from the Statamic control panel.
v2.1.0 is primarily a platform-support release (Laravel 13, Statamic 6.5, PHP 8.3) plus one real bug fix for cached FormConfig objects. There are no new user-facing features, so if you are already on 2.0.x with Laravel 12, this upgrade is mostly about the version floor and the cache fix.
Before you require it, check your matrix:
| Requirement | v2.1.0 |
|---|---|
| PHP | 8.3+ |
| Laravel | 13 |
| Statamic | 6.5+ |
If you are on PHP 8.2, Laravel 12, or Statamic 6.4, stay on 2.0.x. The floor bumps are hard requirements, not soft suggestions — Composer will simply refuse to resolve.
Upgrade path:
composer require <vendor>/<package>:^2.1php artisan cache:clear && php artisan statamic:stache:clear && php artisan statamic:stache:warmWhere to look first in the codebase:
FormConfig class itself — this is the object that gets cached and was the subject of the fix.First use case: create a FormConfig entry (through the CP or a seeder), resolve it in a controller/antlers template, and render the form. That single flow exercises the content layer, the cache layer, and the fix in this release.
Treat forms as content, not code. The FormConfig model implies forms are editable entries. Lean into that: define the blueprint, let editors add/remove fields, and resolve the config at render time rather than hardcoding field lists. This is the whole reason to use the package over raw Statamic forms.
Resolving a config:
// Resolve through the repository/Stache — do not hand-parse YAML or JSON.
$config = FormConfig::findByHandle('contact');
Wrap hot lookups in a request-scoped singleton or once() helper if you resolve the same config multiple times per request, but do not push FormConfig instances into a long-lived cache store yourself — see the gotchas.
Programmatic creation (seeders, migrations, imports):
FormConfig::make()
->handle('newsletter')
->data([...])
->save();
Save through the model so Stache updates and events fire; writing the underlying files directly will leave the Stache stale until the next refresh.
Submission handling: let Statamic's form submission pipeline do validation against the blueprint. Your job is to resolve the right FormConfig, pass it to the form tag/view, and handle post-submit side effects (notifications, CRM push) in a listener rather than in the controller.
Testing:
setUp() and call statamic:stache:clear in tearDown().FormConfig and reads it back — that is your regression guard for the serialization fix.Deployment: config cache + Stache warm in the release step, in that order, after the code is on disk.
The cache serialization fix is the one thing to actually understand. Laravel 13 hardened unserialize() with an allowlist. Previously, a FormConfig that had been serialized into the cache could come back as __PHP_Incomplete_Class or throw an offset/unserialize() error. v2.1.0 registers the class through Statamic's registerSerializableClasses API.
Practical consequences:
FormConfig objects serialized by 2.0.x under Laravel 13 are unrecoverable — clearing is the fix, not a workaround. Same for Redis/Memcached, which outlive your app server.FormConfig, register your subclass in the same allowlist via registerSerializableClasses. The package registers its own class, not yours. This is the main extension point this release exposes.cache:clear first, debug second.Version floor traps:
composer why-not php 8.3 before assuming the resolution failure is this package's fault.Stache vs. framework cache are two different caches. cache:clear won't fix a stale Stache and statamic:stache:clear won't clear serialized objects in Redis. When debugging a FormConfig that looks wrong, clear both and confirm which one actually changed the behaviour before touching code.
Don't edit Stache YAML by hand while the Stache is warm — the file and the in-memory index will disagree, and you'll misattribute the problem to the serialization change.
No deprecations, no removed methods are called out in this release, so a 2.0.x → 2.1.0 diff should be safe code-wise. The risk is entirely in the environment (PHP/Laravel/Statamic versions) and in stale serialized state.
How can I help you explore Laravel packages today?