update.php in Drupal 9
Same filename in this branch
- 9 update.php
- 9 core/assets/scaffold/files/update.php
- 9 core/lib/Drupal/Core/Database/Query/Update.php
- 9 core/lib/Drupal/Core/Database/Driver/pgsql/Update.php
- 9 core/tests/fixtures/database_drivers/module/corefake/src/Driver/Database/corefakeWithAllCustomClasses/Update.php
- 9 core/tests/Drupal/Tests/Composer/Plugin/Scaffold/fixtures/drupal-assets-fixture/assets/update.php
- 9 core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestPgsql/Update.php
Same filename and directory in other branches
The PHP page that handles updating the Drupal installation.
All Drupal code is released under the GNU General Public License. See COPYRIGHT.txt and LICENSE.txt files in the "core" directory.
File
core/assets/scaffold/files/update.phpView source
<?php
/**
* @file
* The PHP page that handles updating the Drupal installation.
*
* All Drupal code is released under the GNU General Public License.
* See COPYRIGHT.txt and LICENSE.txt files in the "core" directory.
*/
use Drupal\Core\Update\UpdateKernel;
use Symfony\Component\HttpFoundation\Request;
$autoloader = (require_once 'autoload.php');
// Disable garbage collection during test runs. Under certain circumstances the
// update path will create so many objects that garbage collection causes
// segmentation faults.
if (drupal_valid_test_ua()) {
gc_collect_cycles();
gc_disable();
}
$kernel = new UpdateKernel('prod', $autoloader, FALSE);
$request = Request::createFromGlobals();
$response = $kernel
->handle($request);
$response
->send();
$kernel
->terminate($request, $response);