Skip to content

Conversation

@DavideIadeluca
Copy link
Contributor

@DavideIadeluca DavideIadeluca commented Nov 10, 2025

1.x equivalent to #4279

Fixes #4276

Changes proposed in this pull request:
Early return if minimum number of primary and secondary tags is 0. Deferring it rather then force allowing in that case allows other policies to take action

Reviewers should focus on:
Consider this more of a POC. Unsure yet if this PR causes regression in other parts

Screenshot

Necessity

  • Has the problem that is being solved here been clearly explained?
  • If applicable, have various options for solving this problem been considered?
  • For core PRs, does this need to be in core, or could it be in an extension?
  • Are we willing to maintain this for years / potentially forever?

Confirmed

  • Frontend changes: tested on a local Flarum installation.
  • Backend changes: tests are green (run composer test).
  • Core developer confirmed locally this works as intended.
  • Tests have been added, or are not appropriate here.

Required changes:

  • Related documentation PR: (Remove if irrelevant)

Deferring it rather then force allowing in that case allows other policies to take action. Consider this more of a POC
@DavideIadeluca DavideIadeluca changed the title fix(tags): defer policy if min primary & secondary tags 0 [1.x] fix(tags): defer policy if min primary & secondary tags 0 Nov 10, 2025
@DavideIadeluca DavideIadeluca marked this pull request as ready for review November 10, 2025 16:00
@DavideIadeluca DavideIadeluca requested a review from a team as a code owner November 10, 2025 16:00
@DavideIadeluca
Copy link
Contributor Author

Tentatively marking this ready for review to gather some feedback on the general approach. As mentioned for now I'm treating this PR more of quick POC to address the issue. If general feedback is good I can then move on to add tests and work on a 2.x PR as well

@imorland imorland added this to the 1.8.12 milestone Nov 10, 2025
@imorland
Copy link
Member

Good catch @DavideIadeluca

Personally I'm happy with the approach for sure. As you say, we'd need to test around this to ensure we don't cause issues elsewhere, but I suspect this will be fine.

Some CI tests here would be ideal 👍

@DavideIadeluca
Copy link
Contributor Author

@imorland I've added the tests and also created a 2.x PR at #4279. Ready for final review from my side

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.

2 participants