Skip to content

[WIP] Migrate deprecated functions in WP_Customize_Setting class - #191

Closed
josephfusco with Codex wants to merge 2 commits into
autopilotfrom
codex/innovator-migrate-deprecated-functions
Closed

[WIP] Migrate deprecated functions in WP_Customize_Setting class#191
josephfusco with Codex wants to merge 2 commits into
autopilotfrom
codex/innovator-migrate-deprecated-functions

Conversation

@Codex

@Codex Codex AI commented May 2, 2026

Copy link
Copy Markdown

Thanks for asking me to work on this. I will get started on it and keep this PR's description up to date as I form a plan and make progress.


This section details on the original issue you should resolve

<issue_title>[Innovator] Migrate deprecated functions in WP_Customize_Setting class</issue_title>
<issue_description>The WP_Customize_Setting class contains two deprecated function calls that need to be migrated to prevent potential issues and improve code quality. Addressing these will enhance maintainability and reduce technical debt.

Task

  1. Identify the usages of the deprecated update() method in src/wp-includes/class-wp-customize-setting.php at lines 722 and 732.
  2. Replace the deprecated calls with the recommended alternatives, ensuring that the functionality remains intact.
  3. Run existing tests to verify that the changes do not introduce any regressions.

Scope

Do not change any other parts of the WP_Customize_Setting class or related classes.</issue_description>

Comments on the Issue (you are @codex[agent] in this section)

Co-authored-by: josephfusco <6676674+josephfusco@users.noreply.github.com>
@Codex
Codex AI requested a review from josephfusco May 2, 2026 15:45
@josephfusco
josephfusco marked this pull request as ready for review May 2, 2026 15:58
@josephfusco
josephfusco requested a review from a team as a code owner May 2, 2026 15:58
@github-actions

github-actions Bot commented May 2, 2026

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Unlinked Accounts

The following contributors have not linked their GitHub and WordPress.org accounts: @codex.

Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@nopilots-dalton

Copy link
Copy Markdown

Dalton (Security):

This pull request primarily focuses on migrating deprecated function calls within the WP_Customize_Setting class. The changes made in the diff are related to the internal handling of theme modifications and options, specifically replacing calls to deprecated functions with their recommended alternatives.

  1. The changes do not introduce any new user input handling or output generation that would typically raise security concerns. The functions being replaced are internal and do not expose new attack vectors.
  2. The use of the set_root_value() method appears to be a safe replacement for the deprecated update() method, assuming that set_root_value() is implemented securely.

Overall, there are no immediate security concerns based on the diff provided. However, it's important to ensure that the set_root_value() method itself is safe and does not introduce vulnerabilities.

INPUT_SANITIZATION: N/A — No user input is being handled in this change.
OUTPUT_ESCAPING: N/A — No output is generated in this change.
SQL_PREPARATION: N/A — No database queries are present in this change.
CAPABILITY_CHECKS: N/A — No capability checks are modified in this change.
NONCE_VERIFICATION: N/A — No nonce verification is applicable in this change.
ATTACK_SURFACE: PASS — No new attack surface is introduced.

@nopilots-doc

nopilots-doc Bot commented May 2, 2026

Copy link
Copy Markdown

Doc (Code Quality):

The changes made to the _update_theme_mod() and _update_option() methods are appropriate as they replace the deprecated function calls with the recommended alternative. However, there are a couple of points to consider:

  1. Line 720 and Line 730: The deprecation notice now references set_root_value() instead of update(), which is correct. However, you should ensure that set_root_value() is indeed the correct replacement for the intended functionality of these methods. If this method does not behave as expected, it could lead to subtle bugs that are hard to trace.

  2. Return Statements: The addition of return statements in both methods (lines 721 and 733) is necessary for the new functionality. Ensure that the return values are consistent with the expected output of the original methods to avoid breaking existing functionality.

Overall, while the changes seem to adhere to the migration task, clarity on the behavior of set_root_value() is essential to prevent future misunderstandings.

READABILITY: PASS — The changes are clear and follow a logical structure.
PHPDOC: PASS — The deprecation notices are correctly updated.
COMPLEXITY: PASS — The changes do not increase complexity and are straightforward.
TESTS: N/A — No tests are added or modified in this diff.
STYLE: PASS — Code style is consistent with existing code.

@nopilots-pat

nopilots-pat Bot commented May 2, 2026

Copy link
Copy Markdown

Pat (Compatibility + Decision):

The changes proposed in this PR are focused on migrating deprecated functions, which is a positive step towards maintaining code quality. However, the test results indicate a failure across multiple environments, which must be addressed before any further review can take place.

TESTS: FAIL — were PHPUnit and Coding Standards green at review time?
FUNCTION_SIGNATURES: N/A — no public function signature changes were made.
HOOK_COMPATIBILITY: N/A — no hooks were modified.
RETURN_TYPES: N/A — no return type changes were made.
DEPRECATION_PATH: N/A — no new deprecations were introduced.
DECISION: REQUEST_CHANGES
RATIONALE: The PR must pass its tests before further review.

DECISION: REQUEST_CHANGES

@nopilots-pat nopilots-pat Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pat (Compatibility + Decision):

The changes proposed in this PR are focused on migrating deprecated functions, which is a positive step towards maintaining code quality. However, the test results indicate a failure across multiple environments, which must be addressed before any further review can take place.

TESTS: FAIL — were PHPUnit and Coding Standards green at review time?
FUNCTION_SIGNATURES: N/A — no public function signature changes were made.
HOOK_COMPATIBILITY: N/A — no hooks were modified.
RETURN_TYPES: N/A — no return type changes were made.
DEPRECATION_PATH: N/A — no new deprecations were introduced.
DECISION: REQUEST_CHANGES
RATIONALE: The PR must pass its tests before further review.

DECISION: REQUEST_CHANGES

@github-actions github-actions Bot added the safety:halt Circuit breaker active label May 2, 2026
@josephfusco

Copy link
Copy Markdown

Stuck for 3 days with no revision. The agent did not self-correct after Pat's REQUEST_CHANGES. Closing to unblock the pipeline.

@josephfusco josephfusco closed this May 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safety:halt Circuit breaker active

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Innovator] Migrate deprecated functions in WP_Customize_Setting class

2 participants