diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2020-11-03 11:50:14 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-11-03 11:50:14 +0100 |
commit | 51b5f7d67d639fedcc12451a457f09f493f7db34 (patch) | |
tree | b8764d6538f6435df36d32733fd2f97766490b9f | |
parent | 14c42c69611a6c3e2f077ce6b389b1000edd2995 (diff) | |
download | php-git-51b5f7d67d639fedcc12451a457f09f493f7db34.tar.gz |
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.
-rw-r--r-- | ext/opcache/ZendAccelerator.c | 1 | ||||
-rw-r--r-- | ext/opcache/tests/preload_variance.inc | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index 39d04f9a95..5f1d80c083 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -4450,7 +4450,6 @@ static int accel_preload(const char *config, zend_bool in_child) } CG(compiler_options) |= ZEND_COMPILE_PRELOAD; CG(compiler_options) |= ZEND_COMPILE_HANDLE_OP_ARRAY; - CG(compiler_options) |= ZEND_COMPILE_IGNORE_INTERNAL_CLASSES; CG(compiler_options) |= ZEND_COMPILE_DELAYED_BINDING; CG(compiler_options) |= ZEND_COMPILE_NO_CONSTANT_SUBSTITUTION; CG(compiler_options) |= ZEND_COMPILE_IGNORE_OTHER_FILES; diff --git a/ext/opcache/tests/preload_variance.inc b/ext/opcache/tests/preload_variance.inc index 7b2dd7b8ff..b1e84b5b5d 100644 --- a/ext/opcache/tests/preload_variance.inc +++ b/ext/opcache/tests/preload_variance.inc @@ -13,10 +13,12 @@ class B extends Z { class C extends Z { public function method($a): self {} public function method2($a): C {} + public function method3($a): object {} } class D extends C { public function method($a): self {} public function method2($a): D {} + public function method3($a): stdClass {} } // Works. |