Skip to content

fix: drop stale optional dependency on v17development/flarum-seo - #87

Merged
rafaucau merged 1 commit into
FriendsOfFlarum:2.xfrom
qin-yu:fix/stale-seo-optional-dependency
Nov 3, 2026
Merged

rafaucau merged 1 commit into
FriendsOfFlarum:2.xfrom
qin-yu:fix/stale-seo-optional-dependency

Conversation

@qin-yu

@qin-yu qin-yu commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

I ran into this while upgrading my forum from Flarum 1.8 to 2.0. Its composer.json still required v17development/flarum-seo, and after the upgrade Sitemap could no longer be enabled.

Changes proposed in this pull request:

Removes v17development/flarum-seo from extra.flarum-extension.optional-dependencies on the 2.x branch.

The entry was added in #64 so that Sitemap booted after v17development/flarum-seo and could remove that extension's robots.txt route. #66 dropped the route removal for Flarum 2.0, and no SEO release that supports Flarum 2.0 registers a robots.txt route, so the entry no longer orders anything Sitemap needs.

It now causes a circular dependency. SEO, now fof/seo, lists fof/sitemap in its own optional-dependencies (added in FriendsOfFlarum/seo#124), and Packagist still serves it under the old name. On a forum that installed SEO as v17development/flarum-seo, which is the likely path when upgrading from 1.x, enabling Sitemap fails:

Circular dependencies detected: FoF Best Answer, FoF Merge Discussions, FoF SEO, FoF Sitemap, FoF Upload, FoF User Directory, Markdown, Suspend, Tags - aborting. Please fix this by disabling the extensions that are causing the circular dependencies.

Reviewers should focus on:

  • The entry is removed rather than renamed to fof/seo. Renaming it would create the same loop on every forum running both extensions.
  • The 1.x branch is left alone. It still removes the old SEO's robots.txt route, so it still needs the entry for forums on v17development/flarum-seo 2.0.9 or earlier. The same loop does happen on 1.x with SEO 3.x installed under the old name, but fixing it there needs a different approach, so it is not part of this PR.

Confirmed

  • Frontend changes: tested on a local Flarum installation.
  • Backend changes: tests are green (run composer test).

There are no frontend changes. How it was tested:

  • composer test on PHP 8.5.12 with MariaDB 11.4: unit 1 test, integration 56 tests (3 skipped), all passing, with the same results as unpatched 2.x.
  • On a local Flarum 2.0.2 forum with v17development/flarum-seo 4.0.0-beta.16 enabled, enabling fof/sitemap 3.0.0 failed with the error above. With this branch installed through a Composer path repository, both extensions enabled, Sitemap first, and /sitemap.xml, /robots.txt and discussion pages answered 200.
  • Installing SEO as fof/seo instead, as the SEO README describes, also avoids the loop, since the old name then matches no installed extension.

The entry was added in FriendsOfFlarum#64 so that Sitemap booted after
v17development/flarum-seo and could remove that extension's robots.txt
route. FriendsOfFlarum#66 dropped the route removal for Flarum 2.0, and no SEO release
for Flarum 2.0 registers a robots.txt route, so on this branch the entry
no longer orders anything Sitemap needs.

It now causes a circular dependency. SEO, now fof/seo, lists fof/sitemap
in its own optional-dependencies, and Packagist still serves it under
the old name. On a forum that installed SEO as v17development/flarum-seo,
Flarum refuses to enable the second of the two extensions.

The entry is not renamed to fof/seo, because that would create the same
loop on every forum running both.
@qin-yu
qin-yu requested a review from a team as a code owner November 3, 2026 22:06
@imorland

imorland commented Nov 3, 2026

Copy link
Copy Markdown
Member

Note

Automated review for @qin-yu. Multiple AI models with Flarum-specific knowledge reviewed this pull request for me, and a further agent verified their findings; I haven't read it myself yet. I'll look at this pull request personally as soon as I can.

No findings that need fixing in this pull request.

The change merges cleanly into 2.x. Claude, Codex, and the security reviewer completed, and my own pass over the diff, Sitemap's integration points, core's dependency resolver, and SEO's dependency metadata found no regression. Removing the obsolete ordering dependency breaks the cycle without adding the equivalent cycle for installations using fof/seo.

This assessment is based on code inspection; I did not independently run tests or reproduce the forum upgrade.

@rafaucau
rafaucau merged commit 537756f into FriendsOfFlarum:2.x Nov 3, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants