update.php 848 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. /**
  3. * @file
  4. * The PHP page that handles updating the Drupal installation.
  5. *
  6. * All Drupal code is released under the GNU General Public License.
  7. * See COPYRIGHT.txt and LICENSE.txt files in the "core" directory.
  8. */
  9. use Drupal\Core\Update\UpdateKernel;
  10. use Symfony\Component\HttpFoundation\Request;
  11. $autoloader = require_once 'autoload.php';
  12. // Disable garbage collection during test runs. Under certain circumstances the
  13. // update path will create so many objects that garbage collection causes
  14. // segmentation faults.
  15. require_once 'core/includes/bootstrap.inc';
  16. if (drupal_valid_test_ua()) {
  17. gc_collect_cycles();
  18. gc_disable();
  19. }
  20. $kernel = new UpdateKernel('prod', $autoloader, FALSE);
  21. $request = Request::createFromGlobals();
  22. $response = $kernel->handle($request);
  23. $response->send();
  24. $kernel->terminate($request, $response);