*/
protected static $zendOpcacheEnabled;
+ public const BOOTSTRAP_LOADER = \WCF_DIR . '/lib/bootstrap.php';
+
/**
* Calls all init functions of the WCF class.
*/
final protected function runBootstrappers(): void
{
try {
- $bootstrappers = require(\WCF_DIR . 'lib/bootstrap.php');
+ $bootstrappers = require(self::BOOTSTRAP_LOADER);
} catch (\Exception $e) {
\wcf\functions\exception\logThrowable($e);
$command = new RebuildBootstrapper();
$command();
- $bootstrappers = require(\WCF_DIR . 'lib/bootstrap.php');
+ $bootstrappers = require(self::BOOTSTRAP_LOADER);
}
foreach ($bootstrappers as $bootstrapper) {
use wcf\data\package\Package;
use wcf\data\package\PackageList;
use wcf\system\io\AtomicWriter;
+use wcf\system\WCF;
/**
* Rebuilds the bootstrapping script.
EOT;
$result .= "\n";
- $writer = new AtomicWriter(\WCF_DIR . 'lib/bootstrap.php');
+ $writer = new AtomicWriter(WCF::BOOTSTRAP_LOADER);
$writer->write($result);
$writer->flush();
+
+ WCF::resetZendOpcache(WCF::BOOTSTRAP_LOADER);
}
private function bootstrapExists(Package $package): bool