Skip to content

Commit 5661441

Browse files
authored
Merge pull request #376 from koriym/fix-preload-warning
Change preload function
2 parents 72c34ba + 2decfe1 commit 5661441

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Compiler/CompilePreload.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,15 @@ public function __invoke(AbstractAppMeta $appMeta, string $context): string
5555
$requiredOnceFile = '';
5656
foreach ($paths as $path) {
5757
$requiredOnceFile .= sprintf(
58-
"opcache_compile_file(%s);\n",
58+
"require %s;\n",
5959
$path
6060
);
6161
}
6262

6363
$preloadFile = sprintf("<?php
6464
6565
// %s preload
66-
67-
opcache_compile_file( __DIR__ . '/vendor/autoload.php');
66+
require __DIR__ . '/vendor/autoload.php';
6867
6968
%s", $this->context, $requiredOnceFile);
7069
$fileName = realpath($appMeta->appDir) . '/preload.php';

0 commit comments

Comments
 (0)