Remove user module from kernel tests that don't need it

Created on 19 September 2025, 15 days ago

Problem/Motivation

Follow-up to #3547124: Remove system module from kernel tests that don't need it

Steps to reproduce

Proposed resolution

Use this bash script to find and replace possible candidates. If the test fails it will be reverted. If it passes, we can review and commit the change.

find core/ -type f -name '*Test.php' \
  | grep -E '/Kernel(/|Tests/)' \
  | while read -r FILE; do
    if grep -q "^    'user',\$" "$FILE"; then
      sed -i "/^    'user',\$/d" "$FILE"

      if ! ./vendor/bin/phpunit --stop-on-error --stop-on-fail -c core/phpunit.xml.dist "$FILE"; then
        echo "Test failed for $FILE, reverting..."
        git checkout -- "$FILE"
      else
        echo "Test passed for $FILE"
      fi
    fi
  done

Remaining tasks

User interface changes

N/A

Introduced terminology

N/A

API changes

N/A

Data model changes

N/A

Release notes snippet

N/A

📌 Task
Status

Needs review

Version

11.0 🔥

Component

user.module

Created by

🇦🇺Australia mstrelan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.71.5 2024