Breaking: #96044 - Harden method signature of logicalAnd() and logicalOr()
See forge#96044
Description
The method signature of \TYPO3\
and \TYPO3\
has changed.
As a consequence the method signature of \TYPO3\
and \TYPO3\
has changed as well.
Both methods do no longer accept an array as first parameter.
Both methods do indeed accept an infinite number of further constraints.
The logical
method does now reliably return an instance of
\TYPO3\
instance
while the logical
method returns a \TYPO3\
instance.
Impact
This change impacts all usages of said methods with just one array parameter containing all constraints.
Affected Installations
All installations that passed all constraints as array.
Migration
The migration is the same for logical
and logical
since their method signature is the same. The upcoming example will show a
migration for a logical
call.
Example:
$query = $this->createQuery();
$query->matching($query->logicalAnd([
$query->equals('propertyName1', 'value1'),
$query->equals('propertyName2', 'value2'),
$query->equals('propertyName3', 'value3'),
]));
In this case an array is used as one and only method argument. The migration is easy and quickly done. Simply don't use an array:
$query = $this->createQuery();
$query->matching($query->logicalAnd(
$query->equals('propertyName1', 'value1'),
$query->equals('propertyName2', 'value2'),
$query->equals('propertyName3', 'value3'),
));