Skip to content

Commit 3aff24c

Browse files
committed
Merge remote-tracking branch 'karyna/php8-compatibility/deprecate-framework-filter-money' into platform-health
2 parents f1e92c8 + 38aad67 commit 3aff24c

File tree

1 file changed

+11
-1
lines changed
  • lib/internal/Magento/Framework/Filter

1 file changed

+11
-1
lines changed

lib/internal/Magento/Framework/Filter/Money.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
*/
66
namespace Magento\Framework\Filter;
77

8+
/**
9+
* @deprecated As money_format() was removed in PHP 8.0
10+
* @see https://www.php.net/manual/en/function.money-format.php
11+
*/
812
class Money implements \Zend_Filter_Interface
913
{
1014
/**
@@ -21,11 +25,17 @@ public function __construct($format)
2125
}
2226

2327
/**
28+
* Returns the result of filtering $value
29+
*
2430
* @param float $value
31+
*
2532
* @return string
33+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
34+
* @deprecated
2635
*/
2736
public function filter($value)
2837
{
29-
return money_format($this->_format, $value);
38+
trigger_error('Class is deprecated', E_USER_DEPRECATED);
39+
return '';
3040
}
3141
}

0 commit comments

Comments
 (0)