Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
[HttpKernel][DI] allow bundles to declare classes that should be preloaded #33689
This adds new methods to allow apps and bundles to declare classes that should be preloaded (when using PHP 7.4's
Since #32032, the DI component is already able to generate a preloading script, based on services with the
Thus we should seek to preload all actually used classes. A bit more than that amount is better than a bit less.
As such, this PR now preloads all service classes and adds the infrastructure needed to list more classes when appropriate.
Listing more classes is done either via:
This works nice on a skeleton app but segfaults on a website-skeleton for now, so I won't give numbers.
This is nonetheless ready (merging would actually help php-internal to reproduce the segfault.)
PS: this requires dumping the autoloader, i.e.
stof left a comment
We also need a way to force some classes to stay out of preloading IMO.