使WordPress成为核心

变更集57658


忽略:
时间戳:
2024年2月20日上午07:25:38(4个月(之前)
作者:
成本开发
消息:

插件依赖项:删除自动停用和引导逻辑。

自动停用具有未满足依赖项的依赖项需要对数据库执行写入操作。这是在Core引导期间执行的,这会使数据库和缓存在流量较大的站点上失去同步。

不再加载具有未满足需求的插件,还没有最终的方法在核心范围内确定,仍在讨论中#60491将在未来版本中处理。

这个插件数据该选项不再需要,它用于持久存储插件数据,以便在Core引导期间检测未满足的依赖项。

后续行动[57545][57592][57606][57617].

道具dd32、azaozz、swissspidy、desrosj、afragen、pbiron、zunaid321、costdev。
修复#60457。请参阅#60491#60510#60518.

地点:
大旅行箱
文件夹:
11编辑

图例:

未修改
补充
远离的
  • trunk/src/wp-admin/includes/class-plugin-upgrader.php

    57545兰特 57658卢比  
    155155//强制刷新插件更新信息。
    156156wp_clean_plugins_cache($parsed_args['clear_update_cache']);
    157 
    158 $all_plugin_data=get_option('plugin_data',array());
    159 $plugin_file=$this->new_plugin_data['file'];
    160 unset($this->new_plugin_data['file']);
    161 $all_plugin_data[$plugin_file]=$this->new_plugin_data;
    162 update_option('plugin_data',$all_plugin_data);
    163157
    164158if($parsed_args['overwrite_package']){
     
    489483$info=获取plugin_data($file,false,false);
    490484if(!空($info['Name'])){
    491 $basename=基本名称($file);
    492 $dirname=基本名称(目录名($file));
    493 
    494 if('.'===$dirname){
    495 $plugin_file=$basename;
    496 }其他{
    497 $plugin_file=“$dirname/$basename”;
    498                     }
    499 $this->new_plugin_data=($info);
    500 $this->new_plugin_data['file']=$plugin_file;
     485$this->new_plugin_data=$info;
    501486断裂;
    502487                }
  • trunk/src/wp-admin/includes/plugin-install.php

    57545卢比 57658兰特  
    928928//确定插件依赖的状态。
    929929$installed_plugins=get_plugins();
    930 $active_plugins=get_option('活动插件');
     930$active_plugins=get_option('活动插件',数组());
    931931$plugin_dependencies_count=计数($requires_plugins);
    932932$installed_plugin_dependencies_count=0;
  • trunk/src/wp-admin/includes/plugin.php

    57644兰特 57658兰特  
    334334    }
    335335
    336 $new_plugin_data=数组();
    337336foreach($plugin_files作为$pluging_file){
    338337if(!is_readable(“$plugin_root/$pluging_file”){
     
    347346        }
    348347
    349 $new_plugin_file=字符串替换(
    350 拖尾斜杠(WP_PLUGIN_DIR),
    351             '',
    352 “$plugin_root/$pluging_file”
    353         );
    354 
    355 $new_plugin_data[$new_pulgin_file]=$plugin_data;
    356348$wp_plugins[plugin_basename($plugin_file)]=$plugin_data;
    357349    }
     
    361353$cache_plugins[$plugin_folder]=$wp_plugins;
    362354wp_cache_set(“插件”,$cache_plugins,“插件”);
    363 
    364 if(!wp_installing()){
    365 update_option('plugin_data',$new_plugin_data);
    366     }
    367355
    368356返回$wp_plugins;
     
    976964
    977965$plugin_translations=wp_get_installed_translation(“插件”);
    978 $all_plugin_data=get_option('plugin_data',array());
    979966
    980967$errors=数组();
     
    10211008继续;
    10221009}
    1023 取消设置($all_plugin_data[$plugin_file]);
    10241010
    10251011$plugin_slug=目录名($pluging_file);
     
    10701056return new WP_Error('could_not_remove_plugin',sprintf($message,inplode(',',$errors));
    10711057    }
    1072 update_option('plugin_data',$all_plugin_data);
    10731058
    10741059返回true;
     
    12151200    }
    12161201
     1202WP_Plugin_Dependencies::initialize();
     1203
    12171204if(WP_Plugin_Dependencies::has_unmet_Dependencies($Plugin)){
    12181205$dependencies=WP_Plugin_dependencies::get_dependencies($Plugin);
  • trunk/src/wp-admin/plugin-install.php

    57545卢比 57658兰特  
    136136需要一次ABSPATH。”wp-admin/admin-header.php';
    137137
     138WP_Plugin_Dependencies::initialize();
    138139WP_Plugin_Dependencies::display_admin_notice_for_unmet_Dependencies();
    139 WP_插件依赖项::display_admin_notice_for_dactivated_dependents();
    140140WP_插件依赖项::display_admin_notice_for_circular_Dependencies();
    141141?>
  • trunk/src/wp-admin/plugins.php

    57586兰特 57658兰特  
    4040
    4141wp_enqueue_script('更新');
     42
     43WP_Plugin_Dependencies::initialize();
    4244
    4345if($action){
     
    742744
    743745<?php WP_Plugin_Dependencies::display_admin_notice_for_unmet_Dependencies();?>
    744 <?php WP_Plugin_Dependencies::display_admin_notice_for_dactivated_dependents();?>
    745746<?php WP_Plugin_Dependencies::display_admin_notice_for_circular_Dependencies();?>
    746747<div class=“wrap”>
  • trunk/src/wp-includes/class-wp-plugin-dependencies.php

    57617兰特 57658兰特  
    106106
    107107    /**
    108 *通过获取插件头和插件API数据进行初始化,
    109 *和停用具有未满足依赖项的依赖项。
     108*插件依赖项是否已初始化。
     109     *
     110*@自6.5.0起
     111*
     112*@var bool
     113     */
     114受保护的静态$initialized=false;
     115
     116    /**
     117*通过获取插件头和插件API数据进行初始化。
    110118     *
    111119*@自6.5.0起
    112120     */
    113121公共静态函数initialize(){
    114 自身::read_dependencies_from_plugin_headers();
    115 自身::get_dependency_api_data();
    116 self::deactive_dependents_with_unmet_dependencies();
     122if(false===self::$initialized){
     123自身::read_dependencies_from_plugin_headers();
     124自身::get_dependency_api_data();
     125self::$initialized=true;
     126        }
    117127    }
    118128
     
    126136     */
    127137公共静态函数has_dependents($plugin_file){
    128 返回in_array(self::convert_to_slag($plugin_file),self::$dependency_slugs,true);
     138返回in_array(self::convert_to_slag($plugin_file),(数组)self::$dependency_slugs,true);
    129139    }
    130140
     
    173183$dependents=数组();
    174184
    175 前臂(self::$依赖项作为$dependency=>$依赖项){
     185foreach公司((数组)self::$依赖项作为$dependency=>$依赖项){
    176186if(in_array($slug,$dependencies,true)){
    177187$dependents[]=$depend;
     
    370380
    371381    /**
    372 *如果依赖项已停用,则显示管理通知。
    373      *
    374 *@自6.5.0起
    375      */
    376 公共静态函数display_admin_notice_for_dactivated_dependents(){
    377 /*
    378 *如果不满足依赖项,插件将被停用。
    379 *瞬时10秒超时。
    380          */
    381 $deactive_requires=获取站点瞬态('wp_plugin_dependencies_deactived_plugins');
    382 if(!空($deactive_requires)){
    383 $deactivated_plugins=“”;
    384 foreach($deactive_requires作为$deactivated){
    385 $deactivated_plugins.='<li>’。esc_html(self::$plugins[$deactived]['Name'])。'</li>';
    386             }
    387 wp_admin_notice(管理员通知)(
    388 冲刺(
    389 /*转换器:1:插件名称*/
    390 __('由于卸载或不活动的依赖项,以下插件已被停用:%s'),
    391 “<ul>$停用插件</ul>”
    392                 ),
    393 阵列(
    394 “类型”=>“错误”,
    395 “dissible”=>true,
    396                 )
    397             );
    398         }
    399     }
    400 
    401     /**
    402382*如果安装了循环依赖项,则显示管理通知。
    403383     *
     
    544524        }
    545525
    546 $all_plugin_data=get_option('plugin_data',array());
    547 
    548 if(空($all_plugin_data)){
    549 需要一次ABSPATH。'/wp-admin/includes/plugin.php';
    550 $all_plugin_data=获取plugins();
    551         }
    552 
    553 self::$plugins=$all_plugin_data;
     526需要一次ABSPATH。”/wp-admin/includes/plugin.php';
     527self::$plugins=get_plugins();
    554528
    555529返回self::$plugins;
     
    622596
    623597    /**
    624 *获取依赖于依赖项的活动插件的插件文件路径。
    625      *
    626 *对于也是依赖项的每个依赖项重复。
    627      *
    628 *@param string$plugin_file依赖项的文件路径,相对于插件目录。
    629 *@return string[]相对于插件目录的活动相关插件文件路径数组。
    630      */
    631 受保护的静态函数get_active_dependents_in_dependency_tree($plugin_file){
    632 $all_dependents=数组();
    633 $dependents=自::get_dependents(自::convert_to_slag($plugin_file));
    634 
    635 if(空($dependents)){
    636 返回$all_dependents;
    637         }
    638 
    639 需要一次ABSPATH。”/wp-admin/includes/plugin.php';
    640 foreach($dependents作为$depend){
    641 if(is_plugin_active($dependent)){
    642 $all_dependents[]=$dependent;
    643 $all_dependents=数组合并(
    644 $所有依赖项,
    645 自我::get_active_dependents_in_dependency_tree($dependent)
    646                 );
    647             }
    648         }
    649 
    650 返回$all_dependents;
    651     }
    652 
    653     /**
    654 *停用依赖项未满足的依赖插件。
    655      *
    656 *@自6.5.0起
    657 */
    658 受保护的静态函数deactive_dependents_with_unmet_dependencies(){
    659 $dependents_to_deactivate=数组();
    660 $circular_dependencies=数组_减少(
    661 自身::get_circular_dependencies(),
    662 函数($all_circular,$circular_pair){
    663 返回array_merge($all_circular,$circular_pair);
    664             },
    665 数组()
    666         );
    667 
    668 需要一次ABSPATH。”/wp-admin/includes/plugin.php';
    669 foreach(self::$dependencies as$depend=>$depensions){
    670 //跳过不再安装或不活动的从属项。
    671 if(!array_key_exists($dependent,self::$plugins)|| is_plugin_inactive($dependent)){
    672 继续;
    673             }
    674 
    675 //跳过循环依赖关系树中的插件或没有未满足依赖关系的插件。
    676 if(in_array($dependent,$circular_dependencies,true)|!自我::has_unmet_dependencies($dependencies){
    677 继续;
    678             }
    679 
    680 $dependents_to_deactivate[]=$depend;
    681 
    682 //还要添加依赖于此插件的依赖项的任何插件。
    683 $dependents_to_deactive=数组合并(
    684 $依赖项_停用,
    685 自我::get_active_dependents_in_dependency_tree($dependent)
    686             );
    687         }
    688 
    689 //如果没有要停用的家属,则提早保释。
    690 if(空($dependents_to_deactivate)){
    691 回报;
    692         }
    693 
    694 $dependents_to_deactivate=数组唯一($dependants_to.deactive);
    695 
    696 deactive_plugins($dependents_to_desactive);
    697 set_site_transient('wp_plugin_dependencies_deactived_plugins',$dependents_to_deactivate,10);
    698     }
    699 
    700     /**
    701598*获取已安装依赖项的文件路径。
    702599*如果未安装依赖项,则文件路径默认为false。
     
    709606if(is_array(self::$dependency_filepaths)){
    710607return self::$dependency_filepaths;
     608}
     609
     610if(null===self::$dependency_slugs){
     611返回数组();
    711612        }
    712613
     
    847748        }
    848749
     750if(null===self::$dependencies){
     751返回数组();
     752        }
     753
    849754self::$circular_dependencies_slugs=array();
    850755
  • 中继/src/wp-settings.php

    57628兰特 57658兰特  
    389389需要ABSPATH。WPINC公司/交互-api/class-wp-interactivity-api-directives-processor.php';
    390390需要ABSPATH。WPINC公司/interactivity-api/interactivity-api.php';
     391需要ABSPATH。WPINC公司/class-wp-plugin-dependency.php';
    391392
    392393wp_script_modules()->add_hooks();
     
    419420
    420421$GLOBALS['wp_plugin_paths']=数组();
    421 
    422 //加载并初始化WP_Plugin_Dependencies。
    423 需要一次ABSPATH。WPINC公司/class-wp-plugin-dependency.php';
    424 if(!已定义('WP_RUN_CORE_TESTS')){
    425 WP_Plugin_Dependencies::initialize();
    426 }
    427422
    428423//负载必须使用插件。
     
    500495
    501496//加载活动插件。
    502 $all_plugin_data=get_option('plugin_data',array());
    503 $failed_plugins=数组();
    504 $plugins_dir_strlen=strlen(拖尾斜杠(WP_PLUGIN_dir));
    505497foreach(wp_get_active_and_valid_plugins()作为$plugin){
    506 $plugin_file=子项($plugin,$plugins_dir_strlen);
    507 
    508     /*
    509 *跳过尚未添加到“plugin_data”选项中的任何插件。
    510      *
    511 *一些插件文件可能会在本地添加并激活,但尚未激活
    512 *添加到“plugin_data”选项中。这会导致“active_plugins”选项
    513 *和“plugin_data”选项暂时不同步,直到下一次
    514 *调用`get_plugins()`。
    515      */
    516 if(isset($all_plugin_data[$plugin_file]){
    517 $plugin_headers=$all_plugin_data[$pluging_file];
    518 $errors=数组();
    519 $requirements=阵列(
    520 “需要”=>!空($plugin_headers['RequiresWP'])$plugin_headers[“需要WP”]:“”,
    521 “requires_php”=>!空($plugin_headers['RequiresPHP'])$plugin_headers[“需要PHP”]:“”,
    522         );
    523 $compatible_wp=is_wp_version_compatible($requirements['requires']);
    524 $compatible_php=is_php_version_compatible($requirements['requires_php']);
    525 
    526 $php_update_message=“</p><p>”。冲刺(
    527 /*翻译器:%s:更新PHP页面的URL*/
    528 __('<a href=“%s”>了解有关更新PHP</a>.'),
    529 esc_url(wp_get_update_php_url)
    530         );
    531 
    532 $annotation=wp_get_update_php_annotation();
    533 
    534 if($注释){
    535 $php_update_message.='</p> <p><em>'$注释。'</em>';
    536         }
    537 
    538 if(!$compatible_wp&&!$compatible_php){
    539 $errors[]=冲刺(
    540 /*翻译人员:1:当前WordPress版本,2:当前PHP版本,3:插件名称,4:所需WordPres版本,5:所需PHP版本*/
    541 _x('<strong>错误:</strong>当前版本的WordPress(%1$s)和PHP(%2$s)不符合%3$s的最低要求。插件需要WordPress%4$s和PHP%5$s,'plugin'),
    542 get_bloginfo(“版本”),
    543 PHP_版本,
    544 $plugin_headers[“名称”],
    545 $要求[“要求”],
    546 $要求['requires_php']
    547             ) . $php更新消息;
    548 }elseif(!$compatible_php){
    549 $errors[]=冲刺(
    550 /*翻译人员:1:当前PHP版本,2:插件名称,3:必需的PHP版本*/
    551 _x('<strong>错误:</strong>当前PHP版本(%1$s)不符合%2$s的最低要求。插件需要PHP%3$s,'plugin'),
    552 PHP_版本,
    553 $plugin_headers[“名称”],
    554 $要求['requires_php']
    555             ) . $php更新消息;
    556 }elseif(!$compatible_wp){
    557 $errors[]=冲刺(
    558 /*翻译人员:1:当前WordPress版本,2:插件名称,3:必需的WordPres版本*/
    559 _x('<strong>错误:</strong>当前WordPress版本(%1$s)不符合%2$s的最低要求。插件需要WordPress%3$s,'plugin'),
    560 get_bloginfo(“版本”),
    561 $plugin_headers[“名称”],
    562 $要求[“要求”]
    563             );
    564 }
    565 
    566 if(!空($errors)){
    567 $failed_plugins[$plugin_file]=“”;
    568 foreach($errors作为$error){
    569 $failed_plugins[$plugin_file].=wp_get_admin_notice(获取管理员通知)(
    570 $错误,
    571 阵列(
    572 “type”=>“error”,
    573 “dissible”=>true,
    574                     )
    575 );
    576             }
    577 继续;
    578         }
    579     }
    580 
    581498wp_register_plugin_realpath($plugin);
    582499
     
    596513unset($plugin,$_wp_plugin_file);
    597514
    598 if(!空($failed_plugins)){
    599 添加操作(_A)(
    600 '管理员通知',
    601 函数()use($failed_plugins){
    602 全局$pagenow;
    603 
    604 if('index.php'===$pagenow||'plugins.php'===$pagenow){
    605 echo内爆(“”,$failed_plugins);
    606             }
    607         }
    608     );
    609 }
    610 未设置($failed_plugins);
    611 
    612515//加载可插拔功能。
    613516需要ABSPATH。WPINC公司/可插拔.php’;
  • trunk/tests/phpunit/tests/admin/plugin-dependenciens/base.php

    57545兰特 57658兰特  
    3333“circular_dependencies_pairs”=>空,
    3434“circular_dependencies_slugs”=>空,
     35'initialized'=>错误,
    3536    );
    3637
     
    6364*每次测试后,将所有静态属性重置为默认值。
    6465     */
    65 公共函数set_up(){
    66 父级::set_up();
    67 
     66公共函数tear_down(){
    6867foreach(self::$static_properties as$name=>$default_value){
    6968$this->set_property_value($name,$default_value);
    7069        }
     70
     71父项::tear_down();
    7172    }
    7273
  • trunk/tests/phpunit/tests/admin/plugin-dependencies/getDependencyFilepath.php

    57545兰特 57658兰特  
    1717 */
    1818类Tests_Admin_WPPluginDependencies_GetDependencyFilepath扩展了WP_PluginDependences_UnitTestCase{
     19
     20    /**
     21*如果插件依赖项尚未初始化,则返回false的测试。
     22     *
     23*@票60457
     24     */
     25公共函数test_sshould_return_false_before_initialization(){
     26//确保插件依赖项尚未初始化。
     27$this->assertFalse(
     28$this->get_property_value(“已初始化”),
     29“插件依赖项已初始化。”
     30        );
     31
     32$this->资产相同(
     33自我::$static_properties['dependency_slugs'],
     34$this->get_property_value(“dependency_slugs”),
     35'“dependency_slugs”未设置为其默认值。'
     36        );
     37
     38$this->assertFalse(
     39self::$instance->get_dependency_filepath(“依赖项”),
     40“初始化之前未返回false。”
     41        );
     42    }
    1943
    2044    /**
  • trunk/tests/phpunit/tests/admin/plugin-dependencies/hasCircularDependency.php

    57545兰特 57658兰特  
    1717 */
    1818类Tests_Admin_WPPluginDependencies_HasCircularDependency扩展了WP_PluginDependences_UnitTestCase{
     19
     20    /**
     21*如果插件依赖项尚未初始化,则返回false的测试。
     22     *
     23*@票60457
     24     */
     25公共函数test_sshould_return_false_before_initialization(){
     26$this->set_property_value(
     27“插件”,
     28阵列(
     29“dependent/dependent.php”=>数组(
     30“名称”=>“从属”,
     31“RequiresPlugins”=>“依赖项”,
     32                ),
     33“dependency/dependency.php”=>数组(
     34“名称”=>“依赖关系”,
     35“RequiresPlugins”=>“dependent”,
     36                ),
     37            )
     38        );
     39
     40//确保插件依赖项尚未初始化。
     41$this->assertFalse(
     42$this->get_property_value(已初始化),
     43“插件依赖项已初始化。”
     44        );
     45
     46$this->资产相同(
     47自身::$static_properties['circular_dependencies_slugs'],
     48$this->get_property_value('circular_dependencies_slugs'),
     49'“circular_dependencies_slugs”未设置为其默认值。'
     50        );
     51
     52$this->assertFalse(
     53self::$instance->has_circular_dependency(“依赖项”),
     54“初始化之前未返回false。”
     55        );
     56    }
    1957
    2058    /**
  • trunk/tests/phpunit/tests/admin/plugin-dependenciences/initialize.php

    57545兰特 57658兰特  
    1515 */
    1616类Tests_Admin_WPPluginDependencies_Initialize扩展了WP_PluginDependences_UnitTestCase{
     17
     18    /**
     19*测试初始化只运行一次。
     20     *
     21*@票60457
     22     *
     23*@dataProvider data_static_properties_set_during_initialization
     24     *
     25*@param string$property_name要检查的属性的名称。
     26*/
     27公共函数test_should_only_initialize_once($property_name){
     28$this->assertFalse(
     29$this->get_property_value(“已初始化”),
     30“插件依赖项已初始化。”
     31        );
     32
     33self::$instance->initialize();
     34
     35$this->assertTrue(
     36$this->get_property_value(“已初始化”),
     37初始化期间,“initialized”未设置为true
     38        );
     39
     40$default_value=自身::$static_properties[$property_name];
     41
     42$this->资产不相同(
     43$default_value,
     44$this->get_property_value($property_name),
     45初始化期间未设置“{$property_name}\”
     46        );
     47
     48//重置为默认值。
     49$this->set_property_value($property_name,self::$static_properties[$property _name]);
     50
     51self::$instance->initialize();
     52
     53$this->资产相同(
     54$default_value,
     55$this->get_property_value($property_name),
     56在第二次初始化尝试期间设置了“{$property_name}”
     57        );
     58    }
     59
     60    /**
     61*数据提供商。
     62     *
     63*@return数组[]
     64     */
     65公共函数data_static_properties_set_during_initialization(){
     66/*
     67*这不包括“dependency_api_data”,因为它只是设置的
     68*在某些页面上。这将在稍后进行测试。
     69         */
     70return self::text_array_to_dataprovider(
     71阵列(
     72“插件”,
     73“依赖关系”,
     74“dependency_slugs”,
     75“dependent_slugs”,
     76            )
     77        );
     78    }
    1779
    1880    /**
     
    239301$this->assertSame($expected_slugs,$this->get_property_value('dependent_slugs'));
    240302    }
    241 
    242     /**
    243 *停用具有未满足依赖项的依赖项的测试。
    244 *
    245 *@门票22316
    246      *
    247 *@涵盖WP_Plugin_Dependencies::deactivate_dependents_with_unmet_Dependencies
    248 *@涵盖WP_Plugin_Dependencies::has_unmet_Dependencies
    249 *@covers WP_Plugin_Dependencies::get_active_dependencys_in_dependenty_tree
    250      *
    251 *@dataProvider data_should_only_deactive_dependents_with_unmet_dependencies
    252      *
    253 *@param array$active_plugins活动插件路径的数组。
    254 *@param array$plugins已安装插件的数组。
    255 *@param array$expected初始化后“active_plugins”的预期值。
    256 */
    257 公共函数test_should_deactive_dependents_with_uninstalled_dependencies($active_plugins,$plugins,$expected){
    258 update_option('active_plugins',$active_p卢gins);
    259 
    260 $this->set_property_value(“插件”,$plugins);
    261 self::$instance::initialize();
    262 
    263 $this->assertSame($expected,array_values(get_option('active_plugins',array()));
    264     }
    265 
    266     /**
    267 *数据提供商。
    268      *
    269 *@return数组[]
    270      */
    271 公共函数data_should_only_deactive_dependents_with_unmet_dependencies(){
    272 返回数组(
    273 “具有未安装依赖项的依赖项”=>数组(
    274 “active_plugins”=>数组(“dependent/dependent.php”),
    275 “插件”=>数组(
    276 “dependent/dependent.php”=>数组(“RequiresPlugins”=>“dependency”),
    277                 ),
    278 “应为”=>数组(),
    279 ),
    280 “具有非活动依赖项的依赖项”=>数组(
    281 “active_plugins”=>数组(“dependent/dependent.php”),
    282 “插件”=>数组(
    283 “dependent/dependent.php”=>数组(“RequiresPlugins”=>“depend”),
    284 “dependency/dependency.php”=>数组(“RequiresPlugins”=>“”),
    285                 ),
    286 “应为”=>数组(),
    287 ),
    288 “一个具有两个依赖项的依赖项,一个未安装,一个不活动”=>数组(
    289 “active_plugins”=>数组(“dependent/dependent.php”),
    290 “插件”=>数组(
    291 “dependent/dependent.php”=>数组(“RequiresPlugins”=>“depend,dependency2”),
    292 “dependency2/dependentency2.php”=>数组(“RequiresPlugins”=>“”),
    293                 ),
    294 “应为”=>数组(),
    295 ),
    296 “具有已安装且处于活动状态的依赖项的依赖项”=>数组(
    297 “active_plugins”=>数组(“dependency/dependency.php”,“depeendency/debendency/php”),
    298 “插件”=>数组(
    299 “dependent/dependent.php”=>数组(“RequiresPlugins”=>“depend”),
    300 “dependency/dependency.php”=>数组(“RequiresPlugins”=>“”),
    301                 ),
    302 “预期”=>数组(“dependency/dependency.php”,“depeendency/debendency/php”),
    303 ),
    304 “一个依赖项和两个已安装且处于活动状态的依赖项”=>数组(
    305 “active_plugins”=>数组(
    306 '依赖/依赖.php',
    307 '依赖项/依赖项.php',
    308 “dependency2/dependentency2.php”,
    309                 ),
    310 “插件”=>数组(
    311 “dependent/dependent.php”=>数组(“RequiresPlugins”=>“depend,dependency2”),
    312 “dependency/dependency.php”=>数组(“RequiresPlugins”=>“”),
    313 “dependency2/dependentency2.php”=>数组(“RequiresPlugins”=>“”),
    314                 ),
    315 “预期”=>数组(
    316 '依赖/依赖.php',
    317 '依赖/依赖.php',
    318 “dependency2/dependentency2.php”,
    319                 ),
    320 ),
    321 “两个依赖项,一个具有未安装的依赖项,另一个具有活动的依赖项”=>数组(
    322 “active_plugins”=>数组(
    323 '依赖/依赖.php',
    324 '依赖2/dependent2.php',
    325 “dependency2/dependentency2.php”,
    326                 ),
    327 “插件”=>数组(
    328 “dependent/dependent.php”=>数组(“RequiresPlugins”=>“depend”),
    329 “dependent2/dependency2.php”=>数组(“RequiresPlugins”=>“depend ency2”),
    330 “dependency2/dependentency2.php”=>数组(“RequiresPlugins”=>“”),
    331                 ),
    332 “需要”=>数组(“dependent2/dependency2.php”,“dependerency2/depeendency2.php”),
    333 ),
    334         );
    335     }
    336303}
注:请参阅TracChangeset(跟踪变更集)获取有关使用变更集查看器的帮助。