Repository navigation
Tell people to run the 1.x to 2.0 upgrade with Composer, not the extension manager - #605
Merged
Merged
Conversation
…nsion manager The upgrade guide currently says the extension manager can run this upgrade from its interface instead of the command line. It cannot, and the failure is structural rather than occasional. `CheckForUpdatesHandler` skips any package that is not a registered extension. `flarum/core` has no `flarum-extension` package type, so it is dropped from the update list on every run, the major-update flow never sees a new major, and it refuses. Behind that, the step that is meant to relax extension version constraints before a major update tests the wrong variable and relaxes nothing, so even once the first problem is fixed the update would run with core pinned to the new major and every extension still constrained to the old one. Someone following the current wording hits a refusal with no explanation of why, on the one upgrade where a half-applied change is most expensive. The guide now says to use Composer, says why in one sentence, and keeps the extension manager recommended for routine updates inside a major version, which is what it does well. Also adds the symptom to Troubleshooting, since people will search for the message rather than re-read the introduction, and corrects the same claim on the extensions page, which states the manager updates "Flarum itself" without qualification.
imorland
approved these changes
Oct 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
update.mdcurrently tells people they can run the 1.x to 2.0 upgrade from the extension manager's interface instead of the command line. It cannot do that upgrade, and the failure is structural rather than intermittent, so anyone who follows that sentence hits a refusal with no explanation on the one upgrade where a half-applied change costs the most.Why it cannot work
Two separate problems, one hiding the other.
CheckForUpdatesHandlerskips any package that is not a registered extension:Extension::nameToId('flarum/core')isflarum-core, andflarum/corehas noflarum-extensionpackage type, sogetExtension()returns null and core is dropped on every run.updates.installednever holds aflarum/coreentry,getNewMajorVersion()returns null, and the major-update flow refuses withno_new_major_version. The method's own docblock says the first composer call exists so major updates are visible and "That includes flarum/core itself", so the filter defeats its stated intent.Behind that,
ComposerJson::require('*', '*'), which is meant to relax every extension constraint before a major update, tests the wrong variable: in the wildcard branch the name being checked is the literal*, which never resolves to an extension, so every iteration continues and nothing is relaxed. Fixing only the first problem would therefore run the update with core pinned to the new major and every extension still constrained to the old one, which cannot resolve.I verified this on a real 1.8.19 forum prepared exactly per this guide, and measured zero packages recorded by the update check. Both problems are present on the current
2.xbranch of the framework.What this changes
update.md: the:::infoblock becomes a:::dangersaying to use Composer, with the reason in one sentence. It keeps the extension manager recommended for routine updates inside a major version, which is what it does well, so this is a narrowing rather than a blanket warning off the tool.update.md: adds the symptom to Troubleshooting, because people search for the message rather than re-reading the introduction.extensions.md: the Extension Manager section says it updates "both extensions and Flarum itself" with no qualification. Now scoped to within a major version, pointing at the upgrade guide.Notes
I have deliberately not referenced any fix PR here, since the docs should describe what today's release does. If the underlying behaviour is fixed and released, this wording should be revisited rather than left in place.
Builds clean with
docusaurus build --locale en, zero broken anchors in the 2.x English tree.:::dangerwith a title matches existing use inconsole.md,troubleshoot.md,bugs.mdandinstall.md. Merges cleanly with each of my other open docs PRs, including #595, which also touchesupdate.md.