update.php 804 B

123456789101112131415161718192021222324252627282930
  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. if (drupal_valid_test_ua()) {
  16. gc_collect_cycles();
  17. gc_disable();
  18. }
  19. $kernel = new UpdateKernel('prod', $autoloader, FALSE);
  20. $request = Request::createFromGlobals();
  21. $response = $kernel->handle($request);
  22. $response->send();
  23. $kernel->terminate($request, $response);