Skip to content

v2.1.0

Choose a tag to compare

@cjmellor cjmellor released this 24 May 14:24
· 89 commits to 3.x since this release
a74ada9

Fixed

  • PostgreSQL: Multiplier::scopeTo() with User or Tier targets now works. Eloquent's morph join previously generated multiplier_scopes.scopeable_id = tiers.id, which Postgres rejects as a varchar/bigint type mismatch. A new MorphToManyWithTextCast relation class wraps the join key in CAST(... AS TEXT) on pgsql connections only; MySQL and SQLite are unchanged. The workaround will be removed in v3 when multiplier_scopes is replaced with typed pivot tables.
  • v1.x → v2.x upgrade no longer crashes on addPoints(). Laravel's mergeConfigFrom is a shallow merge, so v1.x users whose published config/level-up.php lacked the v2-era models block hit a null-class instantiation in the points listener. The service provider now deep-merges the package's bundled defaults into the published config at runtime, so any missing keys fall back to package defaults while user-set keys are preserved.

Documentation

  • Added ## v2.0 -> v2.1 section to UPGRADE.md with database compatibility notes and an explicit callout that feature toggles (tiers.enabled, multipliers.enabled, challenges.enabled) now default to true for v1.x upgraders — explicitly disable them in your published config if you don't want them.
  • Added CONTRIBUTING.md with Laravel-style branch policy.