Skip to content

[3.0] Imports the schema namespace FixDates now names - #9644

Merged
Sesquipedalian merged 1 commit into
SimpleMachines:release-3.0from
albertlast:3.0/fixdates-schema-import
Sep 6, 2026
Merged

Sesquipedalian merged 1 commit into
SimpleMachines:release-3.0from
albertlast:3.0/fixdates-schema-import

Conversation

@albertlast

Copy link
Copy Markdown
Collaborator

Description

A 2.1 forum cannot be upgraded on release-3.0 at the moment. The upgrade stops at the sixth substep of the migration step:

 +++ Fixing dates... ..failed with error:
     "Class "SMF\Maintenance\Migration\v2_1\Schema\v2_1\CalendarHolidays" not found"
stopped at step 4 of 7 (Migrations)

FixDates checks whether the holidays table is still there before touching it, and since c114b26 it does so by constructing Schema\v2_1\CalendarHolidays and calling exists(). The file has no use SMF\Db\Schema;, so the name resolves relative to the current namespace — SMF\Maintenance\Migration\v2_1\Schema\v2_1\CalendarHolidays — which does not exist.

CalendarUpdates was changed in the same commit to do the same thing and does have the import, which is why only this one file fails.

Every attempt reaches exactly the same substep, so this is not recoverable by retrying.

How this was verified

Against the 2.1.7 baseline from the 2.1 development environment, using .docker/rerun-upgrade.sh from #9622:

before after
CLI upgrade, 2.1.7 baseline dies at substep 6, database left at 2.1.7 runs to completion

Note that the upgrade completing is not the same as it being correct — see the separate report about the migration batches, which this fix uncovers rather than causes.

Not reachable from the unit suite

tests/bootstrap.php provides no database, and the code path is a migration doing nothing but talk to one. It is also not something phplint can see, since the class name is only resolved at runtime. Running an upgrade is what catches it.

Issues References (Fixes|Related|Closes)

  1. Related: [3.0] Lets an upgrade start again after the holidays table has gone #9626, which added the guard that c114b26 then rewrote.
  2. Related: [3.0][Testing] Check that an upgrade survives being run twice and being interrupted #9622, the check this was found with.

🤖 Generated with Claude Code

FixDates asks whether the holidays table is still there before touching it, and
since c114b26 it asks by constructing Schema\v2_1\CalendarHolidays and calling
exists() on it. The file has no `use SMF\Db\Schema;`, so that name resolves
relative to the current namespace, to
SMF\Maintenance\Migration\v2_1\Schema\v2_1\CalendarHolidays, which is nothing at
all.

The upgrade therefore ends at the sixth substep of the migration step with
"Class ... not found", and since every attempt gets exactly as far, a 2.1 forum
cannot be upgraded. CalendarUpdates, changed in the same commit to do the same
thing, has the import and is unaffected.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: albertlast <mathiaspapealbert@hotmail.com>
@Sesquipedalian
Sesquipedalian merged commit 23f25c8 into SimpleMachines:release-3.0 Sep 6, 2026
9 checks passed
@jdarwood007 jdarwood007 added this to the 3.0 Alpha 5 milestone Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants