Skip to content

Only load \phpunit_util if not autoloadable#370

Merged
abgreeve merged 1 commit intomoodlehq:mainfrom
andrewnicols:phpunitUtilRename
Feb 11, 2026
Merged

Only load \phpunit_util if not autoloadable#370
abgreeve merged 1 commit intomoodlehq:mainfrom
andrewnicols:phpunitUtilRename

Conversation

@andrewnicols
Copy link
Contributor

From Moodle 5.2 the \phpunit_util class has been renamed to \core\test\phpunit\phpunit_util, supports the autoloader, and can still be autoloaded from its old location.

Attempting to manually load the file leads to a failure.

From Moodle 5.2 the `\phpunit_util` class has been renamed to
`\core\test\phpunit\phpunit_util`, supports the autoloader, and can
still be autoloaded from its old location.

Attempting to manually load the file leads to a failure.
@abgreeve abgreeve self-requested a review February 11, 2026 08:32
Copy link
Member

@abgreeve abgreeve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like we did this before with the core_renderer. Thanks for the update.

@abgreeve abgreeve merged commit e02ac82 into moodlehq:main Feb 11, 2026
47 of 51 checks passed
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 2.58%. Comparing base (b4c849b) to head (fca70e8).
⚠️ Report is 2 commits behind head on main.

❗ There is a different number of reports uploaded between BASE (b4c849b) and HEAD (fca70e8). Click for more details.

HEAD has 46 uploads less than BASE
Flag BASE (b4c849b) HEAD (fca70e8)
define_excluded 2 0
verifications 2 0
checkstyle_manipulations 2 0
detect_conflicts 2 0
check_upgrade_savepoints 2 0
continuous_manage_queues_validation 2 0
illegal_whitespace 2 0
setup 2 0
mustache_lint 2 0
travis-branch-checker 2 0
php_lint 2 0
diff_extract_changes 2 0
remote_branch_reporter 2 0
verify_phpunit_xml 2 0
upgrade_external_backup 2 0
mustache_lint_plugins 2 0
git_sync_two_branches 1 0
prepare_npm_stuff 2 0
versions_check_set 2 0
verify_commit_messages 2 1
list_valid_components 2 0
thirdparty_check 2 0
compare_databases 2 0
grunt_process 2 0
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #370       +/-   ##
==========================================
- Coverage   26.29%   2.58%   -23.72%     
==========================================
  Files          72      72               
  Lines        3289    3289               
==========================================
- Hits          865      85      -780     
- Misses       2424    3204      +780     
Flag Coverage Δ
check_upgrade_savepoints ?
checkstyle_manipulations ?
compare_databases ?
continuous_manage_queues_validation ?
define_excluded ?
detect_conflicts ?
diff_extract_changes ?
git_sync_two_branches ?
grunt_process ?
illegal_whitespace ?
list_valid_components ?
mustache_lint ?
mustache_lint_plugins ?
php_lint ?
prepare_npm_stuff ?
remote_branch_reporter ?
setup ?
thirdparty_check ?
travis-branch-checker ?
upgrade_external_backup ?
verifications ?
verify_commit_messages 2.58% <ø> (ø)
verify_phpunit_xml ?
versions_check_set ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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