Skip to content

Commit 51b5f7d

Browse files
committed
Don't ignore internal classes during preloading
When preloading, it's fine to make use of internal class information, as we do not support Windows. It is also necessary to allow proper variance checks against internal classes.
1 parent 14c42c6 commit 51b5f7d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

ext/opcache/ZendAccelerator.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4450,7 +4450,6 @@ static int accel_preload(const char *config, zend_bool in_child)
44504450
}
44514451
CG(compiler_options) |= ZEND_COMPILE_PRELOAD;
44524452
CG(compiler_options) |= ZEND_COMPILE_HANDLE_OP_ARRAY;
4453-
CG(compiler_options) |= ZEND_COMPILE_IGNORE_INTERNAL_CLASSES;
44544453
CG(compiler_options) |= ZEND_COMPILE_DELAYED_BINDING;
44554454
CG(compiler_options) |= ZEND_COMPILE_NO_CONSTANT_SUBSTITUTION;
44564455
CG(compiler_options) |= ZEND_COMPILE_IGNORE_OTHER_FILES;

ext/opcache/tests/preload_variance.inc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@ class B extends Z {
1313
class C extends Z {
1414
public function method($a): self {}
1515
public function method2($a): C {}
16+
public function method3($a): object {}
1617
}
1718
class D extends C {
1819
public function method($a): self {}
1920
public function method2($a): D {}
21+
public function method3($a): stdClass {}
2022
}
2123

2224
// Works.

0 commit comments

Comments
 (0)