Skip to main content

Upgrading from 2.x

3.0.0 removes the last traces of the package this one replaced in 1.0 — a command name, a derived key, and a column in webhook_calls. No behavior changes anywhere else, and nothing was taken away: the importer reads more shapes than it did, and the permission guidance covers more packages than it did.

Most applications need to change nothing. The three sections below are the exceptions, in descending order of what they cost if you miss them.

1. If you already imported a backlog, do not re-run the import

This is the one that bites, and it bites silently.

Each imported row's primary key is derived from (source, source row id), which is what makes the import idempotent — a second run re-derives the same ids and writes nothing. That derivation changed in 3.0, so ids from an import you ran on 2.x no longer re-derive. The insert no longer recognizes those rows, and running the command again over the same source table would import the whole backlog a second time.

Nothing can detect it for you. An imported row is, by design, indistinguishable from one this package received itself.

--dry-run answers it before any write:

php artisan webhooks:import-calls --from-table=your_old_table --dry-run

Over a backlog you already imported, that must report everything as already present. If it reports rows to import, this is what you are looking at, and the answer is not to run it — your history is already there.

A backlog you have not imported yet is unaffected. So is an installation that never ran the import, which is most of them.

2. The import command was renamed

-php artisan webhooks:import-spatie-calls --from-table=… --from-connection=…
+php artisan webhooks:import-calls --from-table=… --from-connection=…

Every option you were passing still exists and still means the same thing. What is new is that the source shape is declared rather than assumed — five options name the columns, and their defaults are exactly the ones the old command hardcoded:

OptionDefault
--from-idid
--from-sourcename
--from-payloadpayload
--from-headersheaders
--from-errorexception

So an invocation that worked on 2.x works unchanged apart from the name, and a table that spells its columns differently no longer needs a fork. See Coming from another webhook package.

3. The exception column is dropped from webhook_calls

Nothing in this package ever wrote it — not the receive path, not the import, not a listener. It was declared when the table was created, outlived the rewrite it arrived with, and stood null on every row while reading like a feature.

A migration drops it. Re-run migrations as usual:

php artisan migrate
If you used the column yourself

It is a package-owned table, and nothing in the package filled that column — but a host that adopted it for its own bookkeeping has data in it. Copy the values out before migrating. Rolling the migration back restores the column's shape and cannot restore its contents.

The status it used to decide is unchanged: an imported row whose source recorded a failure is still written failed. Only the text is not carried, which was always the case — the documentation said otherwise, and that is fixed rather than the behavior.

What needs no action

  • The permission guidance now names the mechanism rather than one package: the trap is any permission package that resolves through its own Gate::before hook and reads the first positional gate argument as a guard name. admin.ability, admin.abilities and their behavior are unchanged — only the wording is wider, so hosts on a different permission package are warned too.
  • Two internal class names changed, and they are named here rather than pointed at, because no reference page carries them: the import command is now Pushery\Webhooks\Client\Console\ImportCallsCommand, and the SQL builder behind it renamed its one method to calls(). Both are marked @internal and sit outside the supported API, so nothing needs changing unless you reached for them anyway.