Releases: rasuvaeff/yii3-webhooks-db
Releases · rasuvaeff/yii3-webhooks-db
Release list
v2.0.1
- Docs: the documented
setSourceNamespaces()migration registration does not
find the bundled migration and never has —yiisoft/db-migrationmatches the
PSR-4 map by string prefix and resolves into the core package, so
./yii migrate:upexits 0 having created nothing. Both READMEs now say so and
give a workingInjector-based recipe until the upstream fix ships.
v2.0.0
Breaking. See UPGRADE.md — an installation that already
applied the migration must rewrite one row in the migration table.
- The bundled migration moved to
Rasuvaeff\Yii3WebhooksDb\Migration\M260612000000CreateWebhookTables
(src/Migration/, PSR-4 autoloaded) from a global class inmigrations/.
Register it withsetSourceNamespaces()instead of avendor/path. Being
autoloadable is what makes it safe to reference in DI at all: with the old
global class, adding any container definition for it made
Yiisoft\Di\Containerfatal at build time in every request, because
new ReflectionClass()ran before the migration runner had required the file. - The documented way to rename the table never worked.
M...::class => ['__construct()' => ['table' => ...]]is ignored:
yiisoft/db-migrationbuilds migrations throughInjector::make(), which
resolves arguments by name or type from the container and does not read
definitions keyed by the migration's class — and a scalarstring $tablehas
no type to resolve. Users following the README silently got the default name. - The table names are now typed value objects that
Injectorcan resolve,
built byconfig/di.phpfrom params. One source of truth: the migration and
DbWebhookDeliveryStoragecannot disagree any more (in 1.x the runtime read params while the
migration used its own default, so configuring params pointed the runtime at a
table the migration had never created). - New
table_prefixparam, prepended to bothdeliveryTableandnonceTable
— a single place to keep package tables out of the way of an application's
own. - Two value objects, one per table (
WebhookDeliveryTableName,
WebhookNonceTableName), matching the two existing params keys. A single
table_prefixapplies to both. - All three index names are derived from their table's name. Unchanged for the
default names; in PostgreSQL, where index names are unique per schema rather
than per table, hard-coded names collided between two installations sharing a
schema. - The identifier regex, previously duplicated in both storages, now lives only
in the value objects.