Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP 8.2 Deprecation Messages #2022

Merged
merged 4 commits into from
Jul 25, 2023
Merged

PHP 8.2 Deprecation Messages #2022

merged 4 commits into from
Jul 25, 2023

Conversation

mikkamp
Copy link
Contributor

@mikkamp mikkamp commented Jul 24, 2023

Changes proposed in this Pull Request:

This PR handles some PHP 8.2 deprecation messages. They were not caught in the original PR #1937 for PHP 8.2 because that code is not covered in unit testing. The code is mainly used for conditionally display on product and coupon pages which means it would fit better in E2E testing.

Closes #2021

Detailed test instructions:

  1. Run the extension on a PHP 8.2 site
  2. Confirm that there are no deprecation warnings when loading the plugin
  3. View the products screen and edit an individual product
  4. View the coupons screen and edit an individual coupon

Additional details:

With the latest version of WooCommerce and WordPress there are no longer any PHP 8.2 deprecation warnings. So this PR also enables PHP 8.2 unit testing in GitHub actions.

Changelog entry

  • Fix - Prevent PHP 8.2 deprecation messages.

@mikkamp mikkamp self-assigned this Jul 24, 2023
@github-actions github-actions bot added changelog: fix Took care of something that wasn't working. type: bug The issue is a confirmed bug. labels Jul 24, 2023
@mikkamp mikkamp marked this pull request as ready for review July 24, 2023 11:14
@mikkamp mikkamp requested a review from a team July 24, 2023 11:14
@codecov
Copy link

codecov bot commented Jul 24, 2023

Codecov Report

Merging #2022 (e1af152) into develop (7c56147) will increase coverage by 0.0%.
The diff coverage is 14.3%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##             develop   #2022   +/-   ##
=========================================
  Coverage       58.1%   58.1%           
  Complexity      4119    4119           
=========================================
  Files            455     455           
  Lines          17694   17695    +1     
=========================================
+ Hits           10277   10278    +1     
  Misses          7417    7417           
Flag Coverage Δ
php-unit-tests 58.1% <14.3%> (+<0.1%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/Admin/MetaBox/ChannelVisibilityMetaBox.php 0.0% <0.0%> (ø)
...c/Admin/MetaBox/CouponChannelVisibilityMetaBox.php 0.0% <0.0%> (ø)
src/Admin/Product/Attributes/AttributesTab.php 0.0% <0.0%> (ø)
src/Proxies/WC.php 37.8% <ø> (ø)
src/Product/ProductRepository.php 96.2% <100.0%> (+<0.1%) ⬆️

Copy link
Contributor

@martynmjones martynmjones left a comment

Choose a reason for hiding this comment

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

Hey @mikkamp,

Thanks for the quick fix 🙌

Tested locally to confirm that the PHP deprecation messages have been resolved and that everything is working as expected so LGTM ✅

@mikkamp mikkamp merged commit d12eb24 into develop Jul 25, 2023
12 of 13 checks passed
@mikkamp mikkamp deleted the fix/2021-php82-deprecations branch July 25, 2023 07:28
@martynmjones martynmjones mentioned this pull request Aug 1, 2023
17 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: fix Took care of something that wasn't working. type: bug The issue is a confirmed bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Current Deprecated warnings as of version 2.5.0
2 participants