site-kit-wp icon indicating copy to clipboard operation
site-kit-wp copied to clipboard

Dashboard sharing controller set to dynamically defined property

Open aaemnnosttv opened this issue 1 year ago • 0 comments

Bug Description

The core Modules class has a property for $rest_controller which isn't used. It also assigns the dashboard sharing controller instance to an undefined property.

https://github.com/google/site-kit-wp/blob/412f9126c6bbb6736faa33107d1a3346232e21b4/includes/Core/Modules/Modules.php#L143 https://github.com/google/site-kit-wp/blob/412f9126c6bbb6736faa33107d1a3346232e21b4/includes/Core/Modules/Modules.php#L196

Dynamically defined properties (properties that are set but aren't defined on the class) still work but are deprecated in PHP 8.2.


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

  • The core Modules class should not define any properties dynamically

Implementation Brief

  • Rename the $rest_controller property to $rest_dashboard_sharing_controller

Test Coverage

  • No changes needed

QA Brief

  • This is such a small change that it can be QA'd by an engineer during CR.

Changelog entry

aaemnnosttv avatar Aug 24 '22 21:08 aaemnnosttv