Remove unused is_domain_loopback helper - #1437
Conversation
is_domain_loopback DNS result in a short-lived transient
is_domain_loopback DNS result in a short-lived transientis_domain_loopback helper
|
This is a good code cleanup, we should get this into the next release (1.40.0) |
There was a problem hiding this comment.
Pull request overview
Removes an unused loopback-domain helper from the admin Helpers utility and deletes the now-orphaned PHPUnit test that only exercised that helper.
Changes:
- Removed
EDAC\Admin\Helpers::is_domain_loopback()fromadmin/class-helpers.php. - Deleted
tests/phpunit/Admin/HelpersLoopbackTest.php. - Updated
package-lock.json(lockfile metadata churn).
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
admin/class-helpers.php |
Deletes the unused loopback helper method. |
tests/phpunit/Admin/HelpersLoopbackTest.php |
Removes the PHPUnit test class that only covered the deleted helper. |
package-lock.json |
Contains lockfile-only changes unrelated to the helper/test removal. |
|
Hey @pattonwebz — I checked the pro plugin to verify Copilot's finding before this gets reviewed. Result: safe to merge.
A couple of things to double-check before requesting human review:
|
Co-authored-by: pattonwebz <3902039+pattonwebz@users.noreply.github.com>
Co-authored-by: pattonwebz <3902039+pattonwebz@users.noreply.github.com>
…callers Co-authored-by: pattonwebz <3902039+pattonwebz@users.noreply.github.com>
5e30ebb to
b757770
Compare
|
@pattonwebz, I fixed the lock file issue and merged in develop. Please review and if it looks good, merge it in. |
`Helpers::is_domain_loopback()` had no production call sites — it existed only alongside its own test file. Rather than cache the DNS lookup, the function and its tests are removed entirely.
Changes
is_domain_loopback()fromadmin/class-helpers.phptests/phpunit/Admin/HelpersLoopbackTest.phpOriginal prompt
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.