-
Notifications
You must be signed in to change notification settings - Fork 9.4k
CE#34567: Fix deprecation issues found by integration tests #34781
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
CE#34567: Fix deprecation issues found by integration tests #34781
Conversation
Hi @karyna-tsymbal-atwix. Thank you for your contribution
❗ Automated tests can be triggered manually with an appropriate comment:
You can find more information about the builds here ℹ️ Run only required test builds during development. Run all test builds before sending your pull request for review. For more details, review the Magento Contributor Guide documentation. 🕙 You can find the schedule on the Magento Community Calendar page. 📞 The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket. 🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel ✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel |
@magento run Static Tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
@@ -439,7 +417,8 @@ public function getLastLoginDate() | |||
*/ | |||
public function getStoreLastLoginDate() | |||
{ | |||
$date = strtotime($this->getCustomerLog()->getLastLoginAt()); | |||
$lastLogin = $this->getCustomerLog()->getLastLoginAt(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
app/code/Magento/Customer/Model/Logger.php:82
@magento run all tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
401600f
to
54e70fb
Compare
@magento run Integration Tests, Functional Tests CE, Functional Tests EE, Functional Tests B2B |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
@@ -488,7 +488,7 @@ private function setOptions(array $options): void | |||
$this->numberFormatter->setSymbol(\NumberFormatter::CURRENCY_SYMBOL, ''); | |||
} | |||
if (array_key_exists('precision', $options)) { | |||
$this->numberFormatter->setAttribute(\NumberFormatter::FRACTION_DIGITS, $options['precision']); | |||
$this->numberFormatter->setAttribute(\NumberFormatter::FRACTION_DIGITS, $options['precision'] ?? 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think thats right place for fix. There are few places that use null
as a value for precision while default is 2 \Magento\Framework\Pricing\PriceCurrencyInterface::DEFAULT_PRECISION
magento2/lib/internal/Magento/Framework/Pricing/PriceCurrencyInterface.php
Lines 50 to 56 in 548ac72
public function format( | |
$amount, | |
$includeContainer = true, | |
$precision = self::DEFAULT_PRECISION, | |
$scope = null, | |
$currency = null | |
); |
I would ask you to test and see if we really expect\want 0
as precision in
https://github.com/magento/partners-magento2b2b/blob/32b75f9bc94fb4ddf9aa3a07393179554406eab8/app/code/Magento/PurchaseOrder/Ui/Component/Listing/Column/Price.php#L81-L86
If 0
is desired value please replace null
with 0
97e0998
to
8ce2d14
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @karyna-tsymbal-atwix
Thank you for your contribution
Great work ✔️
Hi @andrewbess, thank you for the review.
|
@@ -939,7 +940,7 @@ protected function _getDimension($dimension, $configWeightUnit = false) | |||
); | |||
} | |||
|
|||
return round($dimension, 3); | |||
return $dimension ? round($dimension, 3) : 0.0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
type casting might be more suitable here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @xmav
Thank you for your review
Fixed, please check.
$this->addressHelper->getConfig('prefix_options', $store), | ||
$this->addressHelper->getConfig('prefix_show', $store) == NooptreqSource::VALUE_OPTIONAL | ||
); | ||
$options = $this->addressHelper->getConfig('prefix_options', $store); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please move logic to prepareNamePrefixSuffixOptions()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @xmav
Thank you for your review
Fixed, please check.
$this->addressHelper->getConfig('suffix_show', $store) == NooptreqSource::VALUE_OPTIONAL | ||
); | ||
$options = $this->addressHelper->getConfig('suffix_options', $store); | ||
return $options !== null ? $this->prepareNamePrefixSuffixOptions( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplication will be removed in internal PR
Description (*)
Fix deprecation warning found by Integration Tests for PHP 8.1. compatibility
Related Pull Requests
Related Issues
Contribution checklist (*)