- π«π·France andypost
Since PHP 8.4 the
exit()
now a function so could be overriddenRefs:
- https://wiki.php.net/rfc/exit-as-function
- https://github.com/php/php-src/commit/ac3cdf54df5f69c8210e0d9adc1a13af21...
Drupal core currently generates headers and/or prints content directly in various places. With the introduction of HttpKernel and Response objects, these exit; calls should be eliminated. This is necessary in order to return properly formatted error pages, ensure event subscribers are called and to facilitate code testing (it can be difficult to execute tests on code that calls exit). Additionally, we are very close to having the ability to run Drupal as a long-running process, and/or fork drupal processes to handle sub-requests and one of the few remaining steps is to eliminate exit; calls.
Replace exit calls with return. In instances where header/print was used to send content to the client, return an appropriately formed Response object. As the installer does not yet use the HttpKernel object, this proposed resolution does not cover/include the installer.
Reviews needed.
No user interface changes.
No API changes.
Needs work
11.0 π₯
Last updated
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Since PHP 8.4 the exit()
now a function so could be overridden
Refs:
- https://wiki.php.net/rfc/exit-as-function
- https://github.com/php/php-src/commit/ac3cdf54df5f69c8210e0d9adc1a13af21...