Skip to content
Snippets Groups Projects
Commit bbeceef6 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/+/82593


Tested-by: default avatarBenjamin Franzke <ben@bnf.dev>
Reviewed-by: default avatarBenjamin Franzke <ben@bnf.dev>
Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
Tested-by: default avatarBenni Mack <benni@typo3.org>
Tested-by: default avatarcore-ci <typo3@b13.com>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
Tested-by: default avatarStefan Bürk <stefan@buerk.tech>
parent 8d064f0f
No related merge requests found
Showing
with 158 additions and 133 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