Skip to content

[ticket/17732] Report real merge conflicts in the automatic updater - #7068

Open
dmzx wants to merge 1 commit into
phpbb:3.3.xfrom
dmzx:ticket/17732
Open

dmzx wants to merge 1 commit into
phpbb:3.3.xfrom
dmzx:ticket/17732

Conversation

@dmzx

@dmzx dmzx commented Sep 29, 2026

Copy link
Copy Markdown

Checklist:

  • Correct branch: master for new features; 3.3.x for fixes
  • Tests pass
  • Code follows coding guidelines: master and 3.3.x
  • Commit follows commit message format

Tracker ticket:

https://tracker.phpbb.com/browse/PHPBB-17732

Since #6216 (PHPBB-16570) a file with a real merge conflict is treated as already merged and silently left out of the update. There are two causes in diff_files.php:

  1. The in_array() check is inverted, so a conflict is never added to the list on a first run.
  2. On a first run, merged_orig_output() (the board side of every conflict) equals the board file whenever all of phpBB's changes to that file conflict. So $empty is true and the conflict is skipped even with !in_array().

A conflicted file now only counts as merged by the user on a later run, when it is already in the conflict list. Otherwise it is added to the list.

tests/installer/diff_files_test.php runs the real diff_files task on fixtures:

  • a pure conflict;
  • a conflict plus a non-conflicting phpBB change;
  • a conflict kept by the user on a later run;
  • a clean three-way merge;
  • a file already equal to the new version.

Both conflict cases fail without the fix.

A file with a real merge conflict was treated as already merged by the
user and silently left out of the update: the in_array() check was
inverted, and on a first run merged_orig_output() always equals the
board file when all changes conflict. Only a file that is already in
the conflict list can now count as merged by the user.

PHPBB-17732
@github-actions

Copy link
Copy Markdown

The attempt to merge branch 3.3.x into master has completed after considering the changes in this PR.

  • Merge result: Conflict ❌

A separate PR will be needed to merge 3.3.x into master.

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.

1 participant