From e512305581bb1bb3e4226e3073b89f2a25214403 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 18 Dec 2017 21:57:23 +0100 Subject: [PATCH] Remove opcache.inherited_hack This ini directive has already been ignored since PHP 5.3. --- UPGRADING | 4 ++++ ext/opcache/README | 13 ------------- ext/opcache/ZendAccelerator.h | 1 - ext/opcache/zend_accelerator_module.c | 2 -- php.ini-development | 1 - php.ini-production | 1 - 6 files changed, 4 insertions(+), 18 deletions(-) diff --git a/UPGRADING b/UPGRADING index 695177e0c8..856914e065 100644 --- a/UPGRADING +++ b/UPGRADING @@ -160,6 +160,10 @@ PGSQL: - birdstep.max_links . This INI directive has been removed. +- opcache.inherited_hack + . This INI directive has been removed. The value has already been ignored + since PHP 5.3.0. + ======================================== 12. Windows Support ======================================== diff --git a/ext/opcache/README b/ext/opcache/README index 6f07f7ee58..936d6456c4 100644 --- a/ext/opcache/README +++ b/ext/opcache/README @@ -143,19 +143,6 @@ opcache.optimization_level (default "0xffffffff") A bitmask, where each bit enables or disables the appropriate OPcache passes -opcache.inherited_hack (default "1") - Enable this hack as a workaround for "Cannot redeclare class" errors. - The OPcache stores the places where DECLARE_CLASS opcodes use - inheritance (These are the only opcodes that can be executed by PHP, - but which may not be executed because the parent class is missing due to - optimization). When the file is loaded, OPcache tries to bind the - inherited classes by using the current environment. The problem with this - scenario is that, while the DECLARE_CLASS opcode may not be needed for the - current script, if the script requires that the opcode at least be defined, - it may not run. The default for this directive is disabled, which means - that optimization is active. In php-5.3 and above this hack is not needed - anymore and this setting has no effect. - opcache.dups_fix (default "0") Enable this hack as a workaround for "Cannot redeclare class" errors. diff --git a/ext/opcache/ZendAccelerator.h b/ext/opcache/ZendAccelerator.h index 84157b7c1b..3183e58ee1 100644 --- a/ext/opcache/ZendAccelerator.h +++ b/ext/opcache/ZendAccelerator.h @@ -177,7 +177,6 @@ typedef struct _zend_accel_directives { zend_bool save_comments; zend_bool protect_memory; zend_bool file_override_enabled; - zend_bool inherited_hack; zend_bool enable_cli; zend_bool validate_permission; #ifndef ZEND_WIN32 diff --git a/ext/opcache/zend_accelerator_module.c b/ext/opcache/zend_accelerator_module.c index de3e4c9ec0..a1af5d1b9d 100644 --- a/ext/opcache/zend_accelerator_module.c +++ b/ext/opcache/zend_accelerator_module.c @@ -280,7 +280,6 @@ ZEND_INI_BEGIN() #ifndef ZEND_WIN32 STD_PHP_INI_BOOLEAN("opcache.validate_root" , "0", PHP_INI_SYSTEM, OnUpdateBool, accel_directives.validate_root , zend_accel_globals, accel_globals) #endif - STD_PHP_INI_BOOLEAN("opcache.inherited_hack" , "1", PHP_INI_SYSTEM, OnUpdateBool, accel_directives.inherited_hack , zend_accel_globals, accel_globals) STD_PHP_INI_BOOLEAN("opcache.dups_fix" , "0", PHP_INI_ALL , OnUpdateBool, accel_directives.ignore_dups , zend_accel_globals, accel_globals) STD_PHP_INI_BOOLEAN("opcache.revalidate_path" , "0", PHP_INI_ALL , OnUpdateBool, accel_directives.revalidate_path , zend_accel_globals, accel_globals) @@ -702,7 +701,6 @@ static ZEND_FUNCTION(opcache_get_configuration) #ifndef ZEND_WIN32 add_assoc_bool(&directives, "opcache.validate_root", ZCG(accel_directives).validate_root); #endif - add_assoc_bool(&directives, "opcache.inherited_hack", ZCG(accel_directives).inherited_hack); add_assoc_bool(&directives, "opcache.dups_fix", ZCG(accel_directives).ignore_dups); add_assoc_bool(&directives, "opcache.revalidate_path", ZCG(accel_directives).revalidate_path); diff --git a/php.ini-development b/php.ini-development index 5272fd8820..47c5056058 100644 --- a/php.ini-development +++ b/php.ini-development @@ -1784,7 +1784,6 @@ ldap.max_links = -1 ; passes ;opcache.optimization_level=0xffffffff -;opcache.inherited_hack=1 ;opcache.dups_fix=0 ; The location of the OPcache blacklist file (wildcards allowed). diff --git a/php.ini-production b/php.ini-production index e2707e0db3..0f171fa72d 100644 --- a/php.ini-production +++ b/php.ini-production @@ -1791,7 +1791,6 @@ ldap.max_links = -1 ; passes ;opcache.optimization_level=0xffffffff -;opcache.inherited_hack=1 ;opcache.dups_fix=0 ; The location of the OPcache blacklist file (wildcards allowed). -- 2.40.0