-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deprecate the $check_key_exists parameter from AssetDataRegistry and …
…disallow duplicate data for all cases (#46139) * Ensures data is added to the registry just once. * ditch unnecessary param. * Deprecate the param for AssetDataRegistry * Remove the param for additional calls to AssetDataRegistry::add() * Remove the param for additional call to AssetDataRegistry::add() on WCAdminSharedSettings * Trigger a PHP warning instead of throwing a fatal whenever the key being registered is not a string and whenever attempting to override existing data. * Add changefile(s) from automation for the following project(s): woocommerce * Replace trigger_error with error_log to clear out lint errors. * Address lint for trigger_error * Update the test_already_existing_key_on_adding_data test to expect a warning instead of an exception * Update tests * Update method from add_data to add. * Remove the throw InvalidArgumentException for the add and add_data methods. * Remove the now unnecessary test_already_existing_key_on_adding_data test, considering we now return early whenever the key is duplicated, the code never reaches this stage via AssetDataRegistry:add * Move the call to the exists method to within the add_data method. --------- Co-authored-by: github-actions <github-actions@github.com>
- Loading branch information
Showing
27 changed files
with
100 additions
and
126 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
...oocommerce/changelog/46139-43404-cys-when-wp_debug-is-enabled-the-assembler-is-not-loaded
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: major | ||
Type: fix | ||
|
||
Deprecate the $check_key_exists parameter from AssetDataRegistry and disallow duplicate data for all cases. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.