-
Notifications
You must be signed in to change notification settings - Fork 338
Closed
Labels
P1Medium priorityMedium priorityPHPTeam SIssues for Squad 1Issues for Squad 1Type: EnhancementImprovement of an existing featureImprovement of an existing featureType: SupportSupport requestSupport request
Description
Bug Description
As reported by one user in the forums, there are deprecation notices stemming from the plugin, and not part of any third party dependency. These can be seem below:
E_DEPRECATED htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in file /wp-content/plugins/google-site-kit/includes/Core/Authentication/Clients/OAuth_Client.php on line 403
E_DEPRECATED strtotime(): Passing null to parameter #1 ($datetime) of type string is deprecated in file /wp-content/plugins/google-site-kit/includes/Modules/Analytics_4/Report.php on line 112
E_DEPRECATED htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in file /wp-content/plugins/google-site-kit/includes/Core/Authentication/Setup.php on line 234
Testing underway, with more insights and log files to be provided.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
- The code base should be audited for usage that raises PHP deprecations
- PHP deprecation messages should cause tests to fail
Implementation Brief
- Configure PHPUnit to enable the
convertDeprecationsToExceptionsattribute - Run unit tests using PHP 8.1 and address all failures
Test Coverage
- No new coverage to add
- If possible, update PHPUnit test matrix to run on PHP 8.1 or 8.2 instead of 8.0
QA Brief
- Using a web server running PHP 8.1 (or above)
- Do overall smoke testing of the Site Kit and general modules
- Verify that there are no deprecation or other notices in the error log
Changelog entry
- Fix PHP 8.1 deprecation notices.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P1Medium priorityMedium priorityPHPTeam SIssues for Squad 1Issues for Squad 1Type: EnhancementImprovement of an existing featureImprovement of an existing featureType: SupportSupport requestSupport request