← All changes
|
vendor/jetpack-autoloader/class-autoloader.php
+7
-7
16.2-beta
→
16.3-a.7
View file →
| @@ -4,9 +4,9 @@ | ||
| 4 | 4 | * |
| 5 | 5 | * @package automattic/jetpack-autoloader |
| 6 | 6 | */ |
| 7 | 7 | |
| 8 | -namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ16_2_beta\al6_0_0; | |
| 8 | +namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ16_3_a_7\al6_0_1; | |
| 9 | 9 | |
| 10 | 10 | // phpcs:ignore |
| 11 | 11 | |
| 12 | 12 | /** |
| @@ -59,14 +59,14 @@ | ||
| 59 | 59 | |
| 60 | 60 | // We combine the active list and cached list to preemptively load classes for plugins that are |
| 61 | 61 | // presently unknown but will be loaded during the request. While this may result in us considering packages in |
| 62 | 62 | // deactivated plugins there shouldn't be any problems as a result and the eventual consistency is sufficient. |
| 63 | - $all_plugins = array_merge( $active_plugins, $cached_plugins ); | |
| 64 | - | |
| 65 | - // In particular we also include the current plugin to address the case where it is the latest autoloader | |
| 66 | - // but also unknown (and not cached). We don't want it in the active list because we don't know that it | |
| 67 | - // is active but we need it in the all plugins list so that it is considered by the autoloader. | |
| 68 | - $all_plugins[] = $current_plugin; | |
| 63 | + // The current plugin is included to cover the case where it is the latest autoloader but unknown (and not | |
| 64 | + // cached). It goes ahead of the cached entries because manifests are read in order and ties go to the first | |
| 65 | + // read: a cached path can name a build a host just retired, which must not outrank the directory we are | |
| 66 | + // executing from. Do not move it ahead of the active entries, which would give each plugin a differently | |
| 67 | + // ordered list and trip the order-sensitive comparison in have_plugins_changed(). | |
| 68 | + $all_plugins = array_merge( $active_plugins, array( $current_plugin ), $cached_plugins ); | |
| 69 | 69 | |
| 70 | 70 | // We require uniqueness in the array to avoid processing the same plugin more than once. |
| 71 | 71 | $all_plugins = array_values( array_unique( $all_plugins ) ); |
| 72 | 72 | |