Skip to content
Snippets Groups Projects
Commit 983b7163 authored by Benjamin Franzke's avatar Benjamin Franzke
Browse files

[TASK] Use first class closures for service provider factories

Adapt the service provider compiler to perform the same level of
optimization as for the array-based callable syntax:
We unroll the static closure into its static components (class name and
method name). That means the effective generated dependency injection
php code is the same as before with the gain of better DX.

Note that first class closures can only be used where methods of the
current scope are referenced, late state binding is not supported.
AbstractServiceProvider therefore keeps using array-based callable
syntax to be able to reference method scope of extending classes.

Resolves: #103104
Releases: main, 12.4
Change-Id: I2f8ca7a69b1b69c51b1ff6bec384ddafe4492a41
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/83033


Tested-by: default avatarBenjamin Franzke <ben@bnf.dev>
Reviewed-by: default avatarBenjamin Franzke <ben@bnf.dev>
Tested-by: default avatarStefan Bürk <stefan@buerk.tech>
Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
Tested-by: default avatarcore-ci <typo3@b13.com>
parent 045f87ef
Branches
Tags
Showing
with 153 additions and 127 deletions
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