Skip to content

Latest commit

 

History

History
27 lines (26 loc) · 975 Bytes

2023-12-08-move-comparison-methods-to-comparison-classes.md

File metadata and controls

27 lines (26 loc) · 975 Bytes
title issue
Move comparison methods to comparison classes
NEXT-23252

Core

  • Added new method compare in src/Core/Framework/Util/FloatComparator.php
  • Added new class src/Core/Framework/Util/ArrayComparator.php
  • Deprecated two methods floatMatch and arrayMatch in src/Core/Framework/Rule/CustomFieldRule.php

Upgrade Information

Deprecation of methods floatMatch and arrayMatch in CustomFieldRule

Before

CustomFieldRule::floatMatch($operator, $floatA, $floatB)
CustomFieldRule::arrayMatch($operator, $arrayA, $arrayB)

After

We introduced new compare method in FloatComparator and ArrayComparator classes.

FloatComparator::compare($floatA, $floatB, $operator)
ArrayComparator::compare($arrayA, $arrayB, $operator)

Next Major Version Changes

Deprecated comparison methods:

  • floatMatch and arrayMatch methods in src/Core/Framework/Rule/CustomFieldRule.php will be removed for Shopware 6.7.0.0