Skip to content
Snippets Groups Projects
Commit b51bf284 authored by Stefan Bürk's avatar Stefan Bürk Committed by Christian Kuhn
Browse files

[TASK] Provide forward-compatible CompositeExpression/ExpressionBuilder

doctrine/dbal changed their API and usage for CompositeExpression
and ExpressionBuilder with 4.0, which they already deprecated in
3.x.

To avoid a big drift over time core has to follow these changes
in the provided facade implementations, but keep the
core promises up. Furthermore this paves the way to be able to
raise doctrine/dbal:^4.0 later without being breaking. At least
this is one preparation for this goal, not the last.

To give extension developers the ability to support their extensions
for two core versions without doing dirty hacks to avoid deprecation
messages spammed into the logs, this patch provides the new methods
as a forward-compatible backport change. Core usages and the finally
deprecation will be done in dedicated follow up patches for the
main branch.

This patch provides following new methods:

* static 'CompositeExpression::and()' and 'or()' as drop-in
  replacement for 'new CompositeExpress( $type , array $parts)',
  where $type is 'and' or 'or'
* 'ExpressionBuilder::and()' as drop-in replacement for 'andX()'
* 'ExpressionBuilder::or()' as drop-in replacement for 'orX()'

Argument types of the new methods will be made strict with the
following deprecation patch as union types are not supported
by all required PHP versions for v11.5.

Resolves: #97081
Releases: main, 11.5
Change-Id: Ia3db19afe0d6e4375f92080ea278b7ab6d96a3a2
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/73766


Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 0ecaf94a
Branches
Tags
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment