<NME> bootstrap.php
<BEF> <?php

namespace Bolt;
// Do bootstrapping within a new local scope to avoid polluting the global
return call_user_func(
  function () {
      global $app;

      $dirSep = DIRECTORY_SEPARATOR;

 * Second stage loader. Do bootstrapping within a new local scope to avoid
 * polluting the global space.
 *
 * Here we bootstrap the app:
 * - Initialize mb functions for UTF-8
 * - Figure out root path
 * - Bring in the autoloader
 * - Call Bolt\Bootstrap to create the application
 *
 * @throws BootException
 *
 * @return \Silex\Application
 */
return call_user_func(function () {
    // Resolve Bolt-root
    $boltRootPath = realpath(__DIR__ . '/..');

    // Look for the autoloader in known positions relative to the Bolt-root,
    // and autodetect an appropriate configuration class based on this
    // information. (autoload.php path maps to a configuration class)
    $autodetectionMappings = [
        $boltRootPath . '/vendor/autoload.php' => [Standard::class, $boltRootPath],
        $boltRootPath . '/../../autoload.php'  => [Composer::class, $boltRootPath . '/../../..'],
    ];

    foreach ($autodetectionMappings as $autoloadPath => list($resourcesClass, $rootPath)) {
        if (!file_exists($autoloadPath)) {
            continue;
        }

        require_once $autoloadPath;

        /** @deprecated Can be removed when support for PHP 5.5 is dropped. */
        // Use UTF-8 for all multi-byte functions
        \mb_internal_encoding('UTF-8');
        \mb_http_output('UTF-8');

        return Bootstrap::run($rootPath, $resourcesClass);
    }

    require_once $boltRootPath . '/src/Exception/BootException.php';
    throw BootException::earlyExceptionComposer();
});

<MSG> No global $app uses anymore, global functions can access $app via ResourceManager::getApp(). Early access attempt to $app throws LowlevelException

<DFF> @@ -4,7 +4,6 @@ namespace Bolt;
 // Do bootstrapping within a new local scope to avoid polluting the global
 return call_user_func(
   function () {
-      global $app;
 
       $dirSep = DIRECTORY_SEPARATOR;
 

{'addition_count': 0, 'commit_subject': 'No global $app uses anymore, global functions can access $app via ResourceManager::getApp(). Early access attempt to $app throws LowlevelException', 'deletion_count': 1, 'file_extension': '.php', 'lang': 'php', 'license': 'mit', 'repo_name': 'bolt/bolt'}