PhoenixKit 1.7.230: Installs on a fresh Phoenix app, module versions in status
PhoenixKit 1.7.230 fixes mix igniter.install phoenix_kit on a newly generated Phoenix app, and makes the upgrade tasks report and migrate modules with their own tables reliably.
What changed
A new Phoenix app declares igniter for dev and test only, while PhoenixKit required it everywhere, so Mix refused to install and the installer stopped before writing anything. Igniter is now an optional dependency of PhoenixKit.
mix phoenix_kit.status now lists the schema version of each module that owns its migrations, and its Next line says when a module is behind. mix phoenix_kit.update writes all pending module migrations and runs ecto.migrate once. It now uses the repo’s own migrations folder, checks each module’s version afterwards, reports modules it could not read, and no longer crashes on duplicate timestamps or a re-run.
Language URLs such as /en-gb/ now open in that dialect when it is enabled, instead of redirecting to /en/.
Upgrading
If your mix.exs does not list igniter, add {:igniter, "~> 0.7", only: [:dev, :test]}, or the install, update and generator tasks stop working.
Full release notes: PhoenixKit 1.7.230
1.7.230 · 4 August 2026
Fixed
-
⚠️
mix igniter.install phoenix_kitfailed on every freshly generated Phoenix project. Core declared{:igniter, "~> 0.7"}as a required dependency in all environments. A stockmix phx.newapp declares{:igniter, "~> 0.6", only: [:dev, :test]}, and Mix refuses to converge the two:Dependencies have diverged: * igniter (Hex package) — the :only option for dependency igniter Remove the :only restriction from your depThe install aborted before writing anything. Igniter is now
optional: true, so the host’s own declaration wins and the documented install path works on a clean project. The version requirement is unchanged (~> 0.6and~> 0.7both admit igniter 0.7/0.8, so no host is forced to move).Making it optional means core must compile without igniter, which it previously could not:
mix/tasks/phoenix_kit.gen.admin.page.exandphoenix_kit.gen.user.dashboard.excalleduse Igniter.Mix.Taskunguarded and hard-failed aMIX_ENV=prodbuild. Both now carry the sameif Code.ensure_loaded?(Igniter.Mix.Task)guardphoenix_kit.installandphoenix_kit.updatealready had, and ten igniter-onlyPhoenixKit.Install.*helpers are guarded onCode.ensure_loaded?(Igniter)so a production build no longer prints a wall of “Igniter.X is undefined” warnings. The two helpers that cannot be guarded away because their non-igniter half is called from plain tasks —Install.Common(mix phoenix_kit.status) andInstall.JsIntegration(mix phoenix_kit.assets.rebuild) — instead use the existingInstall.IgniterCompat:no_warn_undefinedshim, which grew the three modules they reference. No task or helper changed behaviour when igniter is present.⚠️ Upgrading from ≤ 1.7.229 and your
mix.exsdoes not list:igniter? You were getting it transitively from PhoenixKit; an optional dep is not installed unless the host declares it, so aftermix deps.update phoenix_kitthe code-generating tasks stop working. Add:{:igniter, "~> 0.7", only: [:dev, :test]}mix phoenix_kit.install/.update/.gen.*now say exactly this when invoked without igniter rather than vanishing frommix help(the twogen.*tasks, newly guarded, had no fallback at all;installandupdatehad one each, and all four now shareInstall.MissingIgniter).PhoenixKit.Install.IgniterCompatgained a__mix_recompile__?/0keyed on igniter’s availability, so adding the dep later actually rebuilds the tasks instead of needingmix deps.compile phoenix_kit --force. Tasks that never touch igniter —phoenix_kit.status,.gen.migration,.assets.rebuild— are unaffected either way. -
mix phoenix_kit.updatecould crash when two modules needed migrating in the same second. Generated migration filenames took their version from a bare%Y%m%d%H%M%Stimestamp, so two modules upgraded together produced duplicate Ecto migration versions. Timestamps are now offset per file and bumped past anything already inpriv/repo/migrations. -
mix phoenix_kit.updatesilently skipped modules whose migration coordinator raised. The failure was swallowed and the host saw nothing at all, leaving it to assume its tables were current. Unreadable modules are now reported by name with the error and an explicit note that they were not migrated. -
mix phoenix_kit.updatewrote module migrations to a hardcodedpriv/repo/migrations. On a host whose first:ecto_reposentry is notMyApp.Repo, the file landed in a directory the migrator never scans, soecto.migrateexited 0 having done nothing — and the run still printed✅ <module> migrated to V##. The directory is now taken from the resolved repo, and each module’s version is re-read from the database afterwards rather than assumed, so a migration that did not run is reported as a failure with the path to check. -
mix phoenix_kit.updatecould hard-fail on a re-run after an interrupted update. The module path had no “migration already exists” guard (the core path has had one all along), so a second run wrote a second file with the same migration name andmix ecto.migraterefused everything withmigration name ... is duplicated. It now reuses the existing file. -
One bad module aborted the whole
mix phoenix_kit.updaterun. The per-moduletry/rescuewas lost in the rework, so a module that raised while its migration file was written killed the task after core had migrated — skipping every remaining module and the UUID repair pass. Each module is isolated again. -
mix phoenix_kit.statusreportedNext: Readydirectly under a1 unreadable ❌module row. An unreadable module is deliberately not “pending” (migrating a module whose version cannot be read would be worse), but it is not “ready” either.Nextnow names the modules to check. -
mix phoenix_kit.status --verboseclaimed “No installed module owns migrations” whenever the database was unreachable, which is a different fact from having none and sends anyone debugging a missing table the wrong way. Not-queried and none-found are now distinct. -
A module coordinator reporting a non-integer version read as up to date. Under Erlang term ordering
nil >= 2istrue, so a coordinator returningnilfor “no version comment found” was classified:up_to_dateand its migration skipped forever, while both tasks reported everything current.Modules.classify/2now requires integers and reports anything else as:error. -
Soft-failure paths guarded with
rescuealone now alsocatch :exit. Per the project’s own convention, an unreachable database raises on an unowned checkout but exits on a dead pool — so a dead pool crashedmix phoenix_kit.statusoutright and killed the closing summary of an otherwise-successfulmix phoenix_kit.update. -
The sitemap’s
x-defaultcould be claimed by a sibling-dialect entry (#679). Enabled codes are stored BCP-47 (en-GB) while sibling-dialect URLs render lowercase (/en-gb/…), so the case-sensitiveString.contains?never recognised such an entry as language-prefixed and let it pass as the unprefixed default. The default picker now matches case-insensitively, in line with the per-entry hreflang extraction that already did.
Added
-
The locale plug accepts enabled full-dialect URL segments (#679) instead of 301-ing every hyphenated segment to its base code. A segment that case-insensitively matches an enabled language (
/en-gb/…withen-GBenabled) is now served as that locale, with the stored-case code onconn.assigns.current_localeand its base oncurrent_locale_base. Disabled dialects, unknown dialects, and an empty enabled list (Languages module off) all keep the historical redirect-to-base, so nothing changes for an install that does not enable sibling dialects.This is what makes two enabled dialects of one base addressable as distinct public URLs —
phoenix_kit_publishinggives the non-primary sibling its own URL space and previously had it bounced to the base before its controller ever ran. The prefixless-primary canonical redirect deliberately does not apply on this branch: only non-primary siblings are addressed by full-code URLs, and the primary keeps its base-coded (or prefixless) shape. -
mix phoenix_kit.statusnow reports the schema version of every module that owns its migrations, not just core. Modules implementingc:PhoenixKit.Module.migration_module/0(phoenix_kit_inbox,phoenix_kit_boards,phoenix_kit_web_analytics,phoenix_kit_legal,phoenix_kit_stats) each report installed-vs-expected:PhoenixKit v1.7.230 ├── Installed: V159 ✅ ├── Database: Connected ✅ ├── Modules: 2 modules, 1 update available ⬆ │ ├── Boards: V01 ✅ │ └── Inbox: V01 → V02 available ⬆ └── Next: mix phoenix_kit.update (module schema behind: Inbox)Nextis module-aware: a host whose core is current but whose module tables are a version behind previously reported “Ready”.--verboseadds each module’s coordinator and exact version numbers. The row is omitted entirely when no installed module owns migrations, so a core-only install keeps its compact three-line tree. -
mix phoenix_kit.update’s closing summary lists module versions too, so the last thing printed answers “what version is everything at?” rather than covering core alone and leaving module versions in scrollback.
Changed
mix phoenix_kit.updatenow writes every pending module migration first and runsecto.migrateonce, instead of a full migrator pass per module.- New
PhoenixKit.Migrations.Modules— the shared read side of the module-migration contract, used by both tasks. Discovery previously lived insideupdateonly, which is whystatusnever knew modules existed. A module whose coordinator raises, exits, or reports a non-integer version is recorded as:error, never propagated, so a broken third-party module cannot take downmix phoenix_kit.status.classify/2is public because it is the whole read-side decision, and a private one could only be tested through a hand-built entry that supplied the answer. - New
PhoenixKit.Install.StatusTree— the tree layout, extracted from the status task so it can be unit tested without a database. It was previously a private function writing straight toIO.puts/1, so in practice changes to it went unverified.
PhoenixKit 1.7.230. Install or update: {:phoenix_kit, "~> 1.7"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.