Changeset 3421209
- Timestamp:
- 12/16/2025 03:45:09 PM (4 weeks ago)
- Location:
- posts-on-this-day/trunk
- Files:
-
- 46 edited
-
composer.json (modified) (1 diff)
-
posts-on-this-day.php (modified) (1 diff)
-
readme.txt (modified) (3 diffs)
-
src/class-posts-on-this-day-widget.php (modified) (3 diffs)
-
src/class-query.php (modified) (1 diff)
-
vendor/autoload.php (modified) (1 diff)
-
vendor/autoload_packages.php (modified) (1 diff)
-
vendor/automattic/jetpack-autoloader/.phpcs.dir.xml (modified) (1 diff)
-
vendor/automattic/jetpack-autoloader/CHANGELOG.md (modified) (2 diffs)
-
vendor/automattic/jetpack-autoloader/README.md (modified) (3 diffs)
-
vendor/automattic/jetpack-autoloader/SECURITY.md (modified) (1 diff)
-
vendor/automattic/jetpack-autoloader/composer.json (modified) (3 diffs)
-
vendor/automattic/jetpack-autoloader/src/AutoloadFileWriter.php (modified) (4 diffs)
-
vendor/automattic/jetpack-autoloader/src/AutoloadGenerator.php (modified) (9 diffs)
-
vendor/automattic/jetpack-autoloader/src/AutoloadProcessor.php (modified) (4 diffs)
-
vendor/automattic/jetpack-autoloader/src/CustomAutoloaderPlugin.php (modified) (6 diffs)
-
vendor/automattic/jetpack-autoloader/src/ManifestGenerator.php (modified) (2 diffs)
-
vendor/automattic/jetpack-autoloader/src/class-autoloader-locator.php (modified) (2 diffs)
-
vendor/automattic/jetpack-autoloader/src/class-autoloader.php (modified) (1 diff)
-
vendor/automattic/jetpack-autoloader/src/class-latest-autoloader-guard.php (modified) (1 diff)
-
vendor/automattic/jetpack-autoloader/src/class-path-processor.php (modified) (1 diff)
-
vendor/automattic/jetpack-autoloader/src/class-php-autoloader.php (modified) (2 diffs)
-
vendor/automattic/jetpack-autoloader/src/class-plugin-locator.php (modified) (3 diffs)
-
vendor/automattic/jetpack-autoloader/src/class-version-loader.php (modified) (3 diffs)
-
vendor/composer/ClassLoader.php (modified) (24 diffs)
-
vendor/composer/InstalledVersions.php (modified) (5 diffs)
-
vendor/composer/autoload_real.php (modified) (2 diffs)
-
vendor/composer/autoload_static.php (modified) (3 diffs)
-
vendor/composer/installed.json (modified) (2 diffs)
-
vendor/composer/installed.php (modified) (3 diffs)
-
vendor/composer/jetpack_autoload_classmap.php (modified) (1 diff)
-
vendor/composer/jetpack_autoload_psr4.php (modified) (1 diff)
-
vendor/jetpack-autoloader/class-autoloader-handler.php (modified) (1 diff)
-
vendor/jetpack-autoloader/class-autoloader-locator.php (modified) (3 diffs)
-
vendor/jetpack-autoloader/class-autoloader.php (modified) (2 diffs)
-
vendor/jetpack-autoloader/class-container.php (modified) (1 diff)
-
vendor/jetpack-autoloader/class-hook-manager.php (modified) (1 diff)
-
vendor/jetpack-autoloader/class-latest-autoloader-guard.php (modified) (2 diffs)
-
vendor/jetpack-autoloader/class-manifest-reader.php (modified) (1 diff)
-
vendor/jetpack-autoloader/class-path-processor.php (modified) (2 diffs)
-
vendor/jetpack-autoloader/class-php-autoloader.php (modified) (3 diffs)
-
vendor/jetpack-autoloader/class-plugin-locator.php (modified) (4 diffs)
-
vendor/jetpack-autoloader/class-plugins-handler.php (modified) (1 diff)
-
vendor/jetpack-autoloader/class-shutdown-handler.php (modified) (1 diff)
-
vendor/jetpack-autoloader/class-version-loader.php (modified) (4 diffs)
-
vendor/jetpack-autoloader/class-version-selector.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
posts-on-this-day/trunk/composer.json
r2904938 r3421209 9 9 }, 10 10 "require": { 11 "automattic/jetpack-autoloader": " 2.11.19"11 "automattic/jetpack-autoloader": "5.0.1" 12 12 }, 13 13 "require-dev": { 14 "automattic/wordbless": "dev-master", 15 "automattic/jetpack-codesniffer": "2.6.1", 16 "dealerdirect/phpcodesniffer-composer-installer": "0.7.2", 17 "php-parallel-lint/php-parallel-lint": "1.3.2", 18 "yoast/phpunit-polyfills": "1.0.4" 14 "automattic/wordbless": "^0.6.0", 15 "automattic/jetpack-codesniffer": "6.0.1", 16 "dealerdirect/phpcodesniffer-composer-installer": "*", 17 "php-parallel-lint/php-parallel-lint": "1.4.0" 19 18 }, 20 19 "scripts": { -
posts-on-this-day/trunk/posts-on-this-day.php
r2909301 r3421209 5 5 * Description: Widget to display a list of posts published "on this day" in years past. A good little bit of nostalgia for your blog. 6 6 * Author: Jeremy Herve 7 * Version: 1.5. 57 * Version: 1.5.6 8 8 * Author URI: https://jeremy.hu 9 9 * License: GPL2+ -
posts-on-this-day/trunk/readme.txt
r3281574 r3421209 2 2 Contributors: jeherve 3 3 Tags: widget, on this day 4 Stable tag: 1.5. 54 Stable tag: 1.5.6 5 5 Requires at least: 5.6 6 6 Requires PHP: 7.1 7 Tested up to: 6. 87 Tested up to: 6.9 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 36 36 = I want to customize the look of my widget = 37 37 38 You have 2ways to do so.38 You have 3 ways to do so. 39 39 40 40 1. You can add custom CSS to your site, targetting the `.posts_on_this_day` container and its contents to have the widget fit your needs. 41 41 2. If you're comfortable with PHP, you can add a code snippet that hooks into the `jeherve_posts_on_this_day_post_markup` filter to customize the look of each single post in the widget. That's a good way to change the size of the images displayed for each post, for example. 42 3. You can also use the `jeherve_posts_on_this_day_widget_before_posts` and `jeherve_posts_on_this_day_widget_after_posts` filters to add extra markup around the list of posts in the widget. 42 43 43 44 == Screenshots == … … 46 47 47 48 == Changelog == 49 50 ### [1.5.6] - 2025-12-16 51 52 * Widget: add 2 new filters, `jeherve_posts_on_this_day_widget_before_posts` and `jeherve_posts_on_this_day_widget_after_posts`, allowing one to add extra markup around the list of posts in the widget. 48 53 49 54 ### [1.5.5] - 2023-05-08 -
posts-on-this-day/trunk/src/class-posts-on-this-day-widget.php
r2909301 r3421209 66 66 67 67 // Display posts. 68 $posts = ( new Query() )->get_posts( $instance ); 69 $display = new Display(); 68 $posts = ( new Query() )->get_posts( $instance ); 70 69 if ( ! empty( $posts ) ) { 71 70 /** This filter is documented in core/src/wp-includes/default-widgets.php */ … … 97 96 esc_html( $year ) 98 97 ); 99 100 foreach ( $ids as $id ) {101 echo $display->display_post( $id, $instance ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped102 }103 } else {104 foreach ( $ids as $id ) {105 echo $display->display_post( $id, $instance ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped106 }107 98 } 99 100 echo $this->display_posts( $ids, $instance ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped 108 101 } 109 102 … … 113 106 114 107 echo "\n" . $args['after_widget']; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped 108 } 109 110 /** 111 * Display the posts themselves. 112 * Filterable so one can use to display the posts as a list, a grid, etc. 113 * 114 * @since 1.5.6 115 * 116 * @param array $post_ids Array of post IDs to display. 117 * @param array $instance Saved widget options. 118 * 119 * @return string $output HTML output. 120 */ 121 public function display_posts( array $post_ids, array $instance ): string { 122 $display = new Display(); 123 124 $output = ''; 125 126 /** 127 * Allow adding extra markup around the list of posts. 128 * Can be used to display the posts as a list for example. 129 * 130 * @since 1.5.6 131 * 132 * @param string $output HTML output. 133 * @param array $post_ids Array of post IDs to display. 134 * @param array $instance Saved widget options. 135 */ 136 $output .= apply_filters( 'jeherve_posts_on_this_day_widget_before_posts', '', $post_ids, $instance ); 137 138 foreach ( $post_ids as $post_id ) { 139 $output .= $display->display_post( $post_id, $instance ); 140 } 141 142 /** 143 * Allow adding extra markup around the list of posts. 144 * Can be used to display the posts as a list for example. 145 * 146 * @since 1.5.6 147 * 148 * @param string $output HTML output. 149 * @param array $post_ids Array of post IDs to display. 150 * @param array $instance Saved widget options. 151 */ 152 $output .= apply_filters( 'jeherve_posts_on_this_day_widget_after_posts', '', $post_ids, $instance ); 153 154 return $output; 115 155 } 116 156 -
posts-on-this-day/trunk/src/class-query.php
r2904938 r3421209 89 89 $date_query[] = $this_year_query; 90 90 91 $i++;91 ++$i; 92 92 } 93 93 -
posts-on-this-day/trunk/vendor/autoload.php
r2909301 r3421209 15 15 } 16 16 } 17 trigger_error( 18 $err, 19 E_USER_ERROR 20 ); 17 throw new RuntimeException($err); 21 18 } 22 19 23 20 require_once __DIR__ . '/composer/autoload_real.php'; 24 21 25 return ComposerAutoloaderInit d93ea4de39019a1ed66b1221fd3a3f61::getLoader();22 return ComposerAutoloaderInit5bb9b0a795043d1024e30250b085ee8d::getLoader(); -
posts-on-this-day/trunk/vendor/autoload_packages.php
r2909301 r3421209 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp d93ea4de39019a1ed66b1221fd3a3f61;8 namespace Automattic\Jetpack\Autoloader\jp5bb9b0a795043d1024e30250b085ee8d\al5_0_1; 9 9 10 10 // phpcs:ignore -
posts-on-this-day/trunk/vendor/automattic/jetpack-autoloader/.phpcs.dir.xml
r2904938 r3421209 1 1 <?xml version="1.0"?> 2 2 <ruleset> 3 4 <!-- This doesn't run inside of WordPress, do we don't need to use WordPress's alternative functions. --> 5 <rule ref="WordPress.WP.AlternativeFunctions"> 6 <severity>0</severity> 7 </rule> 8 3 <rule ref="Jetpack-NoWP" /> 9 4 </ruleset> -
posts-on-this-day/trunk/vendor/automattic/jetpack-autoloader/CHANGELOG.md
r2904938 r3421209 5 5 The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) 6 6 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 7 8 ## [5.0.1] - 2025-01-20 9 ### Changed 10 - Code: Use function-style exit() and die() with a default status code of 0. [#41167] 11 12 ## [5.0.0] - 2024-11-25 13 ### Removed 14 - Drop support for Composer <2.2. [#40297] 15 - Remove support for WordPress 6.5 and earlier. [#40200] 16 17 ## [4.0.0] - 2024-11-14 18 ### Removed 19 - General: Update minimum PHP version to 7.2. [#40147] 20 21 ## [3.1.3] - 2024-11-04 22 ### Added 23 - Enable test coverage. [#39961] 24 25 ## [3.1.2] - 2024-10-15 26 ### Changed 27 - Internal updates. 28 29 ## [3.1.1] - 2024-10-10 30 ### Changed 31 - Internal updates. 32 33 ## [3.1.0] - 2024-09-06 34 ### Added 35 - Add logic for debugging issues caused by conflicting Composer autoloaders, enabled by setting the `JETPACK_AUTOLOAD_DEBUG_CONFLICTING_LOADERS` constant. [#38995] 36 - Add logic for debugging issues caused by early class loads, enabled by setting the `JETPACK_AUTOLOAD_DEBUG_EARLY_LOADS` constant. [#38995] 37 38 ## [3.0.10] - 2024-08-26 39 ### Changed 40 - Updated package dependencies. [#39004] 41 42 ## [3.0.9] - 2024-07-10 43 ### Fixed 44 - Avoid a deprecation notice in `Autoloader_Locator::find_latest_autoloader()`. [#38245] 45 46 ## [3.0.8] - 2024-05-29 47 ### Fixed 48 - `AutoloadGenerator::__construct` no longer pretends `$io` is nullable. That never worked. [#37608] 49 50 ## [3.0.7] - 2024-05-06 51 ### Fixed 52 - Avoid deprecation notices when plugin path is null. [#37174] 53 54 ## [3.0.6] - 2024-04-22 55 ### Changed 56 - Internal updates. 57 58 ## [3.0.5] - 2024-04-11 59 ### Changed 60 - Internal updates. 61 62 ## [3.0.4] - 2024-03-18 63 ### Changed 64 - Internal updates. 65 66 ## [3.0.3] - 2024-03-14 67 ### Changed 68 - Internal updates. 69 70 ## [3.0.2] - 2023-11-21 71 72 ## [3.0.1] - 2023-11-21 73 74 ## [3.0.0] - 2023-11-20 75 ### Changed 76 - Updated required PHP version to >= 7.0. [#34192] 77 78 ## [2.12.0] - 2023-09-28 79 ### Added 80 - Add an `AutoloadGenerator::VERSION` constant, and use that for the autoloader's version in preference to whatever Composer has. [#33156] 81 82 ## [2.11.23] - 2023-09-19 83 84 - Minor internal updates. 85 86 ## [2.11.22] - 2023-08-23 87 ### Changed 88 - Updated package dependencies. [#32605] 89 90 ## [2.11.21] - 2023-05-22 91 ### Added 92 - Set keywords in `composer.json`. [#30756] 93 94 ## [2.11.20] - 2023-05-11 95 96 - Updated package dependencies 7 97 8 98 ## [2.11.19] - 2023-04-25 … … 313 403 - Add Custom Autoloader 314 404 405 [5.0.1]: https://github.com/Automattic/jetpack-autoloader/compare/v5.0.0...v5.0.1 406 [5.0.0]: https://github.com/Automattic/jetpack-autoloader/compare/v4.0.0...v5.0.0 407 [4.0.0]: https://github.com/Automattic/jetpack-autoloader/compare/v3.1.3...v4.0.0 408 [3.1.3]: https://github.com/Automattic/jetpack-autoloader/compare/v3.1.2...v3.1.3 409 [3.1.2]: https://github.com/Automattic/jetpack-autoloader/compare/v3.1.1...v3.1.2 410 [3.1.1]: https://github.com/Automattic/jetpack-autoloader/compare/v3.1.0...v3.1.1 411 [3.1.0]: https://github.com/Automattic/jetpack-autoloader/compare/v3.0.10...v3.1.0 412 [3.0.10]: https://github.com/Automattic/jetpack-autoloader/compare/v3.0.9...v3.0.10 413 [3.0.9]: https://github.com/Automattic/jetpack-autoloader/compare/v3.0.8...v3.0.9 414 [3.0.8]: https://github.com/Automattic/jetpack-autoloader/compare/v3.0.7...v3.0.8 415 [3.0.7]: https://github.com/Automattic/jetpack-autoloader/compare/v3.0.6...v3.0.7 416 [3.0.6]: https://github.com/Automattic/jetpack-autoloader/compare/v3.0.5...v3.0.6 417 [3.0.5]: https://github.com/Automattic/jetpack-autoloader/compare/v3.0.4...v3.0.5 418 [3.0.4]: https://github.com/Automattic/jetpack-autoloader/compare/v3.0.3...v3.0.4 419 [3.0.3]: https://github.com/Automattic/jetpack-autoloader/compare/v3.0.2...v3.0.3 420 [3.0.2]: https://github.com/Automattic/jetpack-autoloader/compare/v3.0.1...v3.0.2 421 [3.0.1]: https://github.com/Automattic/jetpack-autoloader/compare/v3.0.0...v3.0.1 422 [3.0.0]: https://github.com/Automattic/jetpack-autoloader/compare/v2.12.0...v3.0.0 423 [2.12.0]: https://github.com/Automattic/jetpack-autoloader/compare/v2.11.23...v2.12.0 424 [2.11.23]: https://github.com/Automattic/jetpack-autoloader/compare/v2.11.22...v2.11.23 425 [2.11.22]: https://github.com/Automattic/jetpack-autoloader/compare/v2.11.21...v2.11.22 426 [2.11.21]: https://github.com/Automattic/jetpack-autoloader/compare/v2.11.20...v2.11.21 427 [2.11.20]: https://github.com/Automattic/jetpack-autoloader/compare/v2.11.19...v2.11.20 315 428 [2.11.19]: https://github.com/Automattic/jetpack-autoloader/compare/v2.11.18...v2.11.19 316 429 [2.11.18]: https://github.com/Automattic/jetpack-autoloader/compare/v2.11.17...v2.11.18 -
posts-on-this-day/trunk/vendor/automattic/jetpack-autoloader/README.md
r2904938 r3421209 21 21 ```json 22 22 { 23 "require -dev": {23 "require": { 24 24 "automattic/jetpack-autoloader": "^2" 25 25 } … … 47 47 48 48 49 Autoloader Limitations and Caveats 50 ----- 51 52 ### Plugin Updates 53 54 When moving a package class file, renaming a package class file, or changing a package class namespace, make sure that the class will not be loaded after a plugin update. 55 56 The autoloader builds the in memory classmap as soon as the autoloader is loaded. The package class file paths in the map are not updated after a plugin update. If a plugins's package class files are moved during a plugin update and a moved file is autoloaded after the update, an error will occur. 57 58 ### Moving classes to a different package 59 60 Jetpack Autoloader determines the hierarchy of class versions by package version numbers. It can cause problems if a class is moved to a newer package with a lower version number, it will get overshadowed by the old package. 61 62 For instance, if your newer version of a class comes from a new package versioned 0.1.0, and the older version comes from a different package with a greater version number 2.0.1, the newer class will not get loaded. 63 64 ### Jetpack Autoloader uses transient cache 65 66 This is a caveat to be aware of when dealing with issues. The JP Autoloader uses transients to cache a list of available plugins to speed up the lookup process. This can sometimes mask problems that arise when loading code too early. See the [Debugging](#debugging) section for more information on how to detect situations like this. 67 68 Debugging 69 ----- 70 71 A common cause of confusing errors is when a plugin autoloads classes during the plugin load, before the 'plugins_loaded' hook. If that plugin has an older version of the class, that older version may be loaded before a plugin providing the newer version of the class has a chance to register. Even more confusingly, this will likely be intermittent, only showing up when the autoloader's plugin cache is invalidated. To debug this situation, you can set the `JETPACK_AUTOLOAD_DEBUG_EARLY_LOADS` constant to true. 72 73 Another common cause of confusing errors is when a plugin registers its own autoloader at a higher priority than the Jetpack Autoloader, and that autoloader would load packages that should be handled by the Jetpack Autoloader. Setting the `JETPACK_AUTOLOAD_DEBUG_CONFLICTING_LOADERS` constant to true will check for standard Composer autoloaders with such a conflict. 74 75 49 76 Autoloading Standards 50 77 ---- … … 64 91 Supports PSR-4 autoloading. PSR-0 namespaces are converted to classmaps. 65 92 66 67 Autoloader Limitations68 -----69 70 Plugin Updates71 72 When moving a package class file, renaming a package class file, or changing a package class namespace, make sure that the class will not be loaded after a plugin update.73 74 The autoloader builds the in memory classmap as soon as the autoloader is loaded. The package class file paths in the map are not updated after a plugin update. If a plugins's package class files are moved during a plugin update and a moved file is autoloaded after the update, an error will occur.75 -
posts-on-this-day/trunk/vendor/automattic/jetpack-autoloader/SECURITY.md
r2904938 r3421209 5 5 ## Supported Versions 6 6 7 Generally, only the latest version of Jetpack has continued support. If a critical vulnerability is found in the current version of Jetpack, we may opt to backport any patches to previous versions.7 Generally, only the latest version of Jetpack and its associated plugins have continued support. If a critical vulnerability is found in the current version of a plugin, we may opt to backport any patches to previous versions. 8 8 9 9 ## Reporting a Vulnerability 10 10 11 [Jetpack](https://jetpack.com/) is an open-source plugin for WordPress. Our HackerOne program covers the plugin software, as well as a variety of related projects and infrastructure. 11 Our HackerOne program covers the below plugin software, as well as a variety of related projects and infrastructure: 12 13 * [Jetpack](https://jetpack.com/) 14 * Jetpack Backup 15 * Jetpack Boost 16 * Jetpack CRM 17 * Jetpack Protect 18 * Jetpack Search 19 * Jetpack Social 20 * Jetpack VideoPress 12 21 13 22 **For responsible disclosure of security issues and to be eligible for our bug bounty program, please submit your report via the [HackerOne](https://hackerone.com/automattic) portal.** -
posts-on-this-day/trunk/vendor/automattic/jetpack-autoloader/composer.json
r2904938 r3421209 4 4 "type": "composer-plugin", 5 5 "license": "GPL-2.0-or-later", 6 "keywords": [ 7 "autoload", 8 "autoloader", 9 "composer", 10 "plugin", 11 "jetpack", 12 "wordpress" 13 ], 6 14 "require": { 7 "composer-plugin-api": "^1.1 || ^2.0" 15 "php": ">=7.2", 16 "composer-plugin-api": "^2.2" 8 17 }, 9 18 "require-dev": { 10 "yoast/phpunit-polyfills": "1.0.4", 11 "automattic/jetpack-changelogger": "^3.3.2" 19 "composer/composer": "^2.2", 20 "yoast/phpunit-polyfills": "^1.1.1", 21 "automattic/jetpack-changelogger": "^5.1.0" 12 22 }, 13 23 "autoload": { … … 22 32 "phpunit": [ 23 33 "./vendor/phpunit/phpunit/phpunit --colors=always" 34 ], 35 "test-coverage": [ 36 "php -dpcov.directory=. ./vendor/bin/phpunit --coverage-php \"./tests/php/tmp/coverage-report.php\"", 37 "php ./tests/php/bin/test-coverage.php \"$COVERAGE_DIR/php.cov\"" 24 38 ], 25 39 "test-php": [ … … 36 50 "link-template": "https://github.com/Automattic/jetpack-autoloader/compare/v${old}...v${new}" 37 51 }, 52 "version-constants": { 53 "::VERSION": "src/AutoloadGenerator.php" 54 }, 38 55 "branch-alias": { 39 "dev-trunk": " 2.11.x-dev"56 "dev-trunk": "5.0.x-dev" 40 57 } 41 58 } -
posts-on-this-day/trunk/vendor/automattic/jetpack-autoloader/src/AutoloadFileWriter.php
r2904938 r3421209 1 <?php // phpcs:ignore WordPress.Files.FileName1 <?php 2 2 /** 3 3 * Autoloader file writer. … … 6 6 */ 7 7 8 // phpcs:disable WordPress.Files.FileName.InvalidClassFileName 9 // phpcs:disable WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid 10 // phpcs:disable WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase 11 // phpcs:disable WordPress.NamingConventions.ValidVariableName.InterpolatedVariableNotSnakeCase 12 // phpcs:disable WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase 13 // phpcs:disable WordPress.NamingConventions.ValidVariableName.PropertyNotSnakeCase 14 // phpcs:disable WordPress.PHP.DevelopmentFunctions.error_log_var_export 8 namespace Automattic\Jetpack\Autoloader; 15 9 16 namespace Automattic\Jetpack\Autoloader;10 use Composer\IO\IOInterface; 17 11 18 12 /** … … 64 58 } 65 59 66 $newFile = isset( $renameList[ $file ] ) ? $renameList[ $file ] :$file;60 $newFile = $renameList[ $file ] ?? $file; 67 61 $content = self::prepareAutoloaderFile( $file, $suffix ); 68 62 … … 89 83 $header = self::COMMENT; 90 84 $header .= PHP_EOL; 91 $header .= 'namespace Automattic\Jetpack\Autoloader\jp' . $suffix . ';'; 85 if ( $suffix === 'Current' ) { 86 // Unit testing. 87 $header .= 'namespace Automattic\Jetpack\Autoloader\jpCurrent;'; 88 } else { 89 $header .= 'namespace Automattic\Jetpack\Autoloader\jp' . $suffix . '\al' . preg_replace( '/[^0-9a-zA-Z]/', '_', AutoloadGenerator::VERSION ) . ';'; 90 } 92 91 $header .= PHP_EOL . PHP_EOL; 93 92 -
posts-on-this-day/trunk/vendor/automattic/jetpack-autoloader/src/AutoloadGenerator.php
r2904938 r3421209 1 <?php // phpcs:ignore WordPress.Files.FileName1 <?php 2 2 /** 3 3 * Autoloader Generator. … … 5 5 * @package automattic/jetpack-autoloader 6 6 */ 7 8 // phpcs:disable PHPCompatibility.Keywords.NewKeywords.t_useFound9 // phpcs:disable PHPCompatibility.LanguageConstructs.NewLanguageConstructs.t_ns_separatorFound10 // phpcs:disable PHPCompatibility.FunctionDeclarations.NewClosure.Found11 // phpcs:disable PHPCompatibility.Keywords.NewKeywords.t_namespaceFound12 // phpcs:disable PHPCompatibility.Keywords.NewKeywords.t_dirFound13 // phpcs:disable WordPress.Files.FileName.InvalidClassFileName14 // phpcs:disable WordPress.PHP.DevelopmentFunctions.error_log_var_export15 // phpcs:disable WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid16 // phpcs:disable WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase17 // phpcs:disable WordPress.NamingConventions.ValidVariableName.InterpolatedVariableNotSnakeCase18 // phpcs:disable WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase19 // phpcs:disable WordPress.NamingConventions.ValidVariableName.PropertyNotSnakeCase20 7 21 8 namespace Automattic\Jetpack\Autoloader; … … 35 22 class AutoloadGenerator { 36 23 24 const VERSION = '5.0.1'; 25 37 26 /** 38 27 * IO object. … … 54 43 * @param IOInterface $io IO object. 55 44 */ 56 public function __construct( IOInterface $io = null) {45 public function __construct( IOInterface $io ) { 57 46 $this->io = $io; 58 47 $this->filesystem = new Filesystem(); … … 213 202 } 214 203 204 // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_var_export 215 205 return $baseDir . ( ( false !== $path ) ? var_export( $path, true ) : '' ); 216 206 } … … 234 224 list($package, $installPath) = $item; 235 225 $autoload = $package->getAutoload(); 226 $version = $package->getVersion(); // Version of the class comes from the package - should we try to parse it? 227 228 // Store our own actual package version, not "dev-trunk" or whatever. 229 if ( $package->getName() === 'automattic/jetpack-autoloader' ) { 230 $version = self::VERSION; 231 } 236 232 237 233 if ( $package === $mainPackage ) { … … 250 246 $autoloads[ $namespace ][] = array( 251 247 'path' => $relativePath, 252 'version' => $ package->getVersion(), // Version of the class comes from the package - should we try to parse it?248 'version' => $version, 253 249 ); 254 250 } … … 263 259 $autoloads[] = array( 264 260 'path' => $relativePath, 265 'version' => $ package->getVersion(), // Version of the class comes from the package - should we try to parse it?261 'version' => $version, 266 262 ); 267 263 } … … 275 271 $autoloads[ $this->getFileIdentifier( $package, $path ) ] = array( 276 272 'path' => $relativePath, 277 'version' => $ package->getVersion(), // Version of the file comes from the package - should we try to parse it?273 'version' => $version, 278 274 ); 279 275 } -
posts-on-this-day/trunk/vendor/automattic/jetpack-autoloader/src/AutoloadProcessor.php
r2904938 r3421209 1 <?php // phpcs:ignore WordPress.Files.FileName1 <?php 2 2 /** 3 3 * Autoload Processor. … … 5 5 * @package automattic/jetpack-autoloader 6 6 */ 7 8 // phpcs:disable WordPress.Files.FileName.InvalidClassFileName9 // phpcs:disable WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid10 // phpcs:disable WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase11 // phpcs:disable WordPress.NamingConventions.ValidVariableName.InterpolatedVariableNotSnakeCase12 // phpcs:disable WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase13 // phpcs:disable WordPress.NamingConventions.ValidVariableName.PropertyNotSnakeCase14 7 15 8 namespace Automattic\Jetpack\Autoloader; … … 51 44 * @param bool $scanPsrPackages Whether or not PSR packages should be converted to a classmap. 52 45 * 53 * @return array $processed 46 * @return array|null $processed 47 * @phan-param array{classmap:?array{path:string,version:string}[],psr-4:?array<string,array{path:string,version:string}[]>,psr-0:?array<string,array{path:string,version:string}[]>} $autoloads 54 48 */ 55 49 public function processClassmap( $autoloads, $scanPsrPackages ) { … … 131 125 * @param bool $scanPsrPackages Whether or not PSR packages should be converted to a classmap. 132 126 * 133 * @return array $processed127 * @return array|null $processed 134 128 */ 135 129 public function processPsr4Packages( $autoloads, $scanPsrPackages ) { -
posts-on-this-day/trunk/vendor/automattic/jetpack-autoloader/src/CustomAutoloaderPlugin.php
r2904938 r3421209 1 <?php //phpcs:ignore WordPress.Files.FileName.NotHyphenatedLowercase1 <?php 2 2 /** 3 3 * Custom Autoloader Composer Plugin, hooks into composer events to generate the custom autoloader. … … 5 5 * @package automattic/jetpack-autoloader 6 6 */ 7 8 // phpcs:disable PHPCompatibility.Keywords.NewKeywords.t_useFound9 // phpcs:disable PHPCompatibility.LanguageConstructs.NewLanguageConstructs.t_ns_separatorFound10 // phpcs:disable PHPCompatibility.Keywords.NewKeywords.t_namespaceFound11 // phpcs:disable WordPress.Files.FileName.NotHyphenatedLowercase12 // phpcs:disable WordPress.Files.FileName.InvalidClassFileName13 // phpcs:disable WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase14 7 15 8 namespace Automattic\Jetpack\Autoloader; … … 112 105 $this->io->writeError( 'The project\'s composer.json or composer environment set a non-default vendor directory.', true ); 113 106 $this->io->writeError( 'The default composer vendor directory must be used.</error>', true ); 114 exit( );107 exit( 0 ); 115 108 } 116 109 … … 146 139 if ( is_readable( $vendorPath . '/autoload_packages.php' ) ) { 147 140 $content = file_get_contents( $vendorPath . '/autoload_packages.php' ); 148 if ( preg_match( '/^namespace Automattic\\\\Jetpack\\\\Autoloader\\\\jp([^;\s]+ );/m', $content, $match ) ) {141 if ( preg_match( '/^namespace Automattic\\\\Jetpack\\\\Autoloader\\\\jp([^;\s]+?)(?:\\\\al[^;\s]+)?;/m', $content, $match ) ) { 149 142 return $match[1]; 150 143 } … … 171 164 $package = $this->composer->getPackage(); 172 165 $requires = $package->getRequires(); 173 if ( ! is_array( $requires ) ) { 166 if ( ! is_array( $requires ) ) { // @phan-suppress-current-line PhanRedundantCondition -- Earlier Composer versions may not have guaranteed this. 174 167 $requires = array(); 175 168 } 176 169 $devRequires = $package->getDevRequires(); 177 if ( ! is_array( $devRequires ) ) { 170 if ( ! is_array( $devRequires ) ) { // @phan-suppress-current-line PhanRedundantCondition -- Earlier Composer versions may not have guaranteed this. 178 171 $devRequires = array(); 179 172 } … … 182 175 if ( empty( $requires ) ) { 183 176 $this->io->writeError( "\n<error>The package is not required and this should never happen?</error>", true ); 184 exit( );177 exit( 0 ); 185 178 } 186 179 -
posts-on-this-day/trunk/vendor/automattic/jetpack-autoloader/src/ManifestGenerator.php
r2499380 r3421209 1 <?php // phpcs:ignore WordPress.Files.FileName1 <?php 2 2 /** 3 3 * Manifest Generator. … … 6 6 */ 7 7 8 // phpcs:disable WordPress.Files.FileName.InvalidClassFileName9 // phpcs:disable WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid10 // phpcs:disable WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase11 // phpcs:disable WordPress.NamingConventions.ValidVariableName.InterpolatedVariableNotSnakeCase12 // phpcs:disable WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase13 // phpcs:disable WordPress.NamingConventions.ValidVariableName.PropertyNotSnakeCase14 8 // phpcs:disable WordPress.PHP.DevelopmentFunctions.error_log_var_export 15 9 -
posts-on-this-day/trunk/vendor/automattic/jetpack-autoloader/src/class-autoloader-locator.php
r2499380 r3421209 29 29 * 30 30 * @param array $plugin_paths An array of plugin paths. 31 * @param string $latest_version The latest version reference. 31 * @param string $latest_version The latest version reference. @phan-output-reference. 32 32 * 33 33 * @return string|null … … 38 38 foreach ( $plugin_paths as $plugin_path ) { 39 39 $version = $this->get_autoloader_version( $plugin_path ); 40 if ( ! $ this->version_selector->is_version_update_required( $latest_version, $version ) ) {40 if ( ! $version || ! $this->version_selector->is_version_update_required( $latest_version, $version ) ) { 41 41 continue; 42 42 } -
posts-on-this-day/trunk/vendor/automattic/jetpack-autoloader/src/class-autoloader.php
r2514138 r3421209 78 78 $hook_manager->add_action( 'shutdown', new Shutdown_Handler( $plugins_handler, $cached_plugins, $was_included_by_autoloader ) ); 79 79 80 // Register a plugins_loaded handler to check for conflicting autoloaders. 81 $hook_manager->add_action( 'plugins_loaded', array( $guard, 'check_for_conflicting_autoloaders' ), 1 ); 82 80 83 // phpcs:enable Generic.Commenting.DocComment.MissingShort 81 84 } -
posts-on-this-day/trunk/vendor/automattic/jetpack-autoloader/src/class-latest-autoloader-guard.php
r2499380 r3421209 76 76 return false; 77 77 } 78 79 /** 80 * Check for conflicting autoloaders. 81 * 82 * A common source of strange and confusing problems is when another plugin 83 * registers a Composer autoloader at a higher priority that us. If enabled, 84 * check for this problem and warn about it. 85 * 86 * Called from the plugins_loaded hook. 87 * 88 * @since 3.1.0 89 * @return void 90 */ 91 public function check_for_conflicting_autoloaders() { 92 if ( ! defined( 'JETPACK_AUTOLOAD_DEBUG_CONFLICTING_LOADERS' ) || ! JETPACK_AUTOLOAD_DEBUG_CONFLICTING_LOADERS ) { 93 return; 94 } 95 96 global $jetpack_autoloader_loader; 97 if ( ! isset( $jetpack_autoloader_loader ) ) { 98 return; 99 } 100 $prefixes = array(); 101 foreach ( ( $jetpack_autoloader_loader->get_class_map() ?? array() ) as $classname => $data ) { 102 $parts = explode( '\\', trim( $classname, '\\' ) ); 103 array_pop( $parts ); 104 while ( $parts ) { 105 $prefixes[ implode( '\\', $parts ) . '\\' ] = true; 106 array_pop( $parts ); 107 } 108 } 109 foreach ( ( $jetpack_autoloader_loader->get_psr4_map() ?? array() ) as $prefix => $data ) { 110 $parts = explode( '\\', trim( $prefix, '\\' ) ); 111 while ( $parts ) { 112 $prefixes[ implode( '\\', $parts ) . '\\' ] = true; 113 array_pop( $parts ); 114 } 115 } 116 117 $autoload_chain = spl_autoload_functions(); 118 if ( ! $autoload_chain ) { 119 return; 120 } 121 122 foreach ( $autoload_chain as $autoloader ) { 123 // No need to check anything after us. 124 if ( is_array( $autoloader ) && is_string( $autoloader[0] ) && substr( $autoloader[0], 0, strlen( __NAMESPACE__ ) + 1 ) === __NAMESPACE__ . '\\' ) { 125 break; 126 } 127 128 // We can check Composer autoloaders easily enough. 129 if ( is_array( $autoloader ) && $autoloader[0] instanceof \Composer\Autoload\ClassLoader && is_callable( array( $autoloader[0], 'getPrefixesPsr4' ) ) ) { 130 $composer_autoloader = $autoloader[0]; 131 foreach ( $composer_autoloader->getClassMap() as $classname => $path ) { 132 if ( $jetpack_autoloader_loader->find_class_file( $classname ) ) { 133 $msg = "A Composer autoloader is registered with a higher priority than the Jetpack Autoloader and would also handle some of the classes we handle (e.g. $classname => $path). This may cause strange and confusing problems."; 134 wp_trigger_error( '', $msg ); 135 continue 2; 136 } 137 } 138 foreach ( $composer_autoloader->getPrefixesPsr4() as $prefix => $paths ) { 139 if ( isset( $prefixes[ $prefix ] ) ) { 140 $path = array_pop( $paths ); 141 $msg = "A Composer autoloader is registered with a higher priority than the Jetpack Autoloader and would also handle some of the namespaces we handle (e.g. $prefix => $path). This may cause strange and confusing problems."; 142 wp_trigger_error( '', $msg ); 143 continue 2; 144 } 145 } 146 foreach ( $composer_autoloader->getPrefixes() as $prefix => $paths ) { 147 if ( isset( $prefixes[ $prefix ] ) ) { 148 $path = array_pop( $paths ); 149 $msg = "A Composer autoloader is registered with a higher priority than the Jetpack Autoloader and would also handle some of the namespaces we handle (e.g. $prefix => $path). This may cause strange and confusing problems."; 150 wp_trigger_error( '', $msg ); 151 continue 2; 152 } 153 } 154 } 155 } 156 } 78 157 } -
posts-on-this-day/trunk/vendor/automattic/jetpack-autoloader/src/class-path-processor.php
r2499380 r3421209 122 122 */ 123 123 private function is_absolute_path( $path ) { 124 if ( 0 === strlen( $path ) || '.' === $path[0] ) {124 if ( empty( $path ) || 0 === strlen( $path ) || '.' === $path[0] ) { 125 125 return false; 126 126 } -
posts-on-this-day/trunk/vendor/automattic/jetpack-autoloader/src/class-php-autoloader.php
r2904938 r3421209 72 72 global $jetpack_autoloader_loader; 73 73 if ( ! isset( $jetpack_autoloader_loader ) ) { 74 return ;74 return false; 75 75 } 76 76 … … 80 80 } 81 81 82 // A common source of strange and confusing problems is when a vendor 83 // file is autoloaded before all plugins have had a chance to register 84 // with the autoloader. Detect that, if a development constant is set. 85 if ( defined( 'JETPACK_AUTOLOAD_DEBUG_EARLY_LOADS' ) && JETPACK_AUTOLOAD_DEBUG_EARLY_LOADS && 86 ( strpos( $file, '/vendor/' ) !== false || strpos( $file, '/jetpack_vendor/' ) !== false ) && 87 is_callable( 'did_action' ) && ! did_action( 'plugins_loaded' ) 88 ) { 89 // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_wp_debug_backtrace_summary -- This is a debug log message. 90 $msg = "Jetpack Autoloader: Autoloading `$class_name` before the plugins_loaded hook may cause strange and confusing problems. " . wp_debug_backtrace_summary( '', 1 ); 91 wp_trigger_error( '', $msg ); 92 } 93 82 94 require $file; 83 95 return true; -
posts-on-this-day/trunk/vendor/automattic/jetpack-autoloader/src/class-plugin-locator.php
r2904938 r3421209 32 32 public function find_current_plugin() { 33 33 // Escape from `vendor/__DIR__` to root plugin directory. 34 $plugin_directory = dirname( dirname( __DIR__ ));34 $plugin_directory = dirname( __DIR__, 2 ); 35 35 36 36 // Use the path processor to ensure that this is an autoloader we're referencing. … … 68 68 */ 69 69 public function find_using_request_action( $allowed_actions ) { 70 // phpcs:disable WordPress.Security.NonceVerification.Recommended71 72 70 /** 73 71 * Note: we're not actually checking the nonce here because it's too early … … 110 108 } 111 109 112 // phpcs:enable WordPress.Security.NonceVerification.Recommended113 110 return $this->convert_plugins_to_paths( $plugin_slugs ); 114 111 } -
posts-on-this-day/trunk/vendor/automattic/jetpack-autoloader/src/class-version-loader.php
r2499380 r3421209 51 51 52 52 /** 53 * Fetch the classmap. 54 * 55 * @since 3.1.0 56 * @return array<string, array> 57 */ 58 public function get_class_map() { 59 return $this->classmap; 60 } 61 62 /** 63 * Fetch the psr-4 mappings. 64 * 65 * @since 3.1.0 66 * @return array<string, array> 67 */ 68 public function get_psr4_map() { 69 return $this->psr4_map; 70 } 71 72 /** 53 73 * Finds the file path for the given class. 54 74 * … … 59 79 public function find_class_file( $class_name ) { 60 80 $data = $this->select_newest_file( 61 isset( $this->classmap[ $class_name ] ) ? $this->classmap[ $class_name ] :null,81 $this->classmap[ $class_name ] ?? null, 62 82 $this->find_psr4_file( $class_name ) 63 83 ); … … 116 136 */ 117 137 private function find_psr4_file( $class_name ) { 118 if ( ! isset( $this->psr4_map ) ) {138 if ( empty( $this->psr4_map ) ) { 119 139 return null; 120 140 } -
posts-on-this-day/trunk/vendor/composer/ClassLoader.php
r2904938 r3421209 46 46 private static $includeFile; 47 47 48 /** @var ?string*/48 /** @var string|null */ 49 49 private $vendorDir; 50 50 51 51 // PSR-4 52 52 /** 53 * @var array[] 54 * @psalm-var array<string, array<string, int>> 53 * @var array<string, array<string, int>> 55 54 */ 56 55 private $prefixLengthsPsr4 = array(); 57 56 /** 58 * @var array[] 59 * @psalm-var array<string, array<int, string>> 57 * @var array<string, list<string>> 60 58 */ 61 59 private $prefixDirsPsr4 = array(); 62 60 /** 63 * @var array[] 64 * @psalm-var array<string, string> 61 * @var list<string> 65 62 */ 66 63 private $fallbackDirsPsr4 = array(); … … 68 65 // PSR-0 69 66 /** 70 * @var array[] 71 * @psalm-var array<string, array<string, string[]>> 67 * List of PSR-0 prefixes 68 * 69 * Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2'))) 70 * 71 * @var array<string, array<string, list<string>>> 72 72 */ 73 73 private $prefixesPsr0 = array(); 74 74 /** 75 * @var array[] 76 * @psalm-var array<string, string> 75 * @var list<string> 77 76 */ 78 77 private $fallbackDirsPsr0 = array(); … … 82 81 83 82 /** 84 * @var string[] 85 * @psalm-var array<string, string> 83 * @var array<string, string> 86 84 */ 87 85 private $classMap = array(); … … 91 89 92 90 /** 93 * @var bool[] 94 * @psalm-var array<string, bool> 91 * @var array<string, bool> 95 92 */ 96 93 private $missingClasses = array(); 97 94 98 /** @var ?string*/95 /** @var string|null */ 99 96 private $apcuPrefix; 100 97 101 98 /** 102 * @var self[]99 * @var array<string, self> 103 100 */ 104 101 private static $registeredLoaders = array(); 105 102 106 103 /** 107 * @param ?string$vendorDir104 * @param string|null $vendorDir 108 105 */ 109 106 public function __construct($vendorDir = null) … … 114 111 115 112 /** 116 * @return string[]113 * @return array<string, list<string>> 117 114 */ 118 115 public function getPrefixes() … … 126 123 127 124 /** 128 * @return array[] 129 * @psalm-return array<string, array<int, string>> 125 * @return array<string, list<string>> 130 126 */ 131 127 public function getPrefixesPsr4() … … 135 131 136 132 /** 137 * @return array[] 138 * @psalm-return array<string, string> 133 * @return list<string> 139 134 */ 140 135 public function getFallbackDirs() … … 144 139 145 140 /** 146 * @return array[] 147 * @psalm-return array<string, string> 141 * @return list<string> 148 142 */ 149 143 public function getFallbackDirsPsr4() … … 153 147 154 148 /** 155 * @return string[] Array of classname => path 156 * @psalm-return array<string, string> 149 * @return array<string, string> Array of classname => path 157 150 */ 158 151 public function getClassMap() … … 162 155 163 156 /** 164 * @param string[] $classMap Class to filename map 165 * @psalm-param array<string, string> $classMap 157 * @param array<string, string> $classMap Class to filename map 166 158 * 167 159 * @return void … … 180 172 * appending or prepending to the ones previously set for this prefix. 181 173 * 182 * @param string $prefix The prefix183 * @param string[]|string $paths The PSR-0 root directories184 * @param bool $prepend Whether to prepend the directories174 * @param string $prefix The prefix 175 * @param list<string>|string $paths The PSR-0 root directories 176 * @param bool $prepend Whether to prepend the directories 185 177 * 186 178 * @return void … … 188 180 public function add($prefix, $paths, $prepend = false) 189 181 { 182 $paths = (array) $paths; 190 183 if (!$prefix) { 191 184 if ($prepend) { 192 185 $this->fallbackDirsPsr0 = array_merge( 193 (array)$paths,186 $paths, 194 187 $this->fallbackDirsPsr0 195 188 ); … … 197 190 $this->fallbackDirsPsr0 = array_merge( 198 191 $this->fallbackDirsPsr0, 199 (array)$paths192 $paths 200 193 ); 201 194 } … … 206 199 $first = $prefix[0]; 207 200 if (!isset($this->prefixesPsr0[$first][$prefix])) { 208 $this->prefixesPsr0[$first][$prefix] = (array)$paths;201 $this->prefixesPsr0[$first][$prefix] = $paths; 209 202 210 203 return; … … 212 205 if ($prepend) { 213 206 $this->prefixesPsr0[$first][$prefix] = array_merge( 214 (array)$paths,207 $paths, 215 208 $this->prefixesPsr0[$first][$prefix] 216 209 ); … … 218 211 $this->prefixesPsr0[$first][$prefix] = array_merge( 219 212 $this->prefixesPsr0[$first][$prefix], 220 (array)$paths213 $paths 221 214 ); 222 215 } … … 227 220 * appending or prepending to the ones previously set for this namespace. 228 221 * 229 * @param string $prefix The prefix/namespace, with trailing '\\'230 * @param string[]|string $paths The PSR-4 base directories231 * @param bool $prepend Whether to prepend the directories222 * @param string $prefix The prefix/namespace, with trailing '\\' 223 * @param list<string>|string $paths The PSR-4 base directories 224 * @param bool $prepend Whether to prepend the directories 232 225 * 233 226 * @throws \InvalidArgumentException … … 237 230 public function addPsr4($prefix, $paths, $prepend = false) 238 231 { 232 $paths = (array) $paths; 239 233 if (!$prefix) { 240 234 // Register directories for the root namespace. 241 235 if ($prepend) { 242 236 $this->fallbackDirsPsr4 = array_merge( 243 (array)$paths,237 $paths, 244 238 $this->fallbackDirsPsr4 245 239 ); … … 247 241 $this->fallbackDirsPsr4 = array_merge( 248 242 $this->fallbackDirsPsr4, 249 (array)$paths243 $paths 250 244 ); 251 245 } … … 257 251 } 258 252 $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; 259 $this->prefixDirsPsr4[$prefix] = (array)$paths;253 $this->prefixDirsPsr4[$prefix] = $paths; 260 254 } elseif ($prepend) { 261 255 // Prepend directories for an already registered namespace. 262 256 $this->prefixDirsPsr4[$prefix] = array_merge( 263 (array)$paths,257 $paths, 264 258 $this->prefixDirsPsr4[$prefix] 265 259 ); … … 268 262 $this->prefixDirsPsr4[$prefix] = array_merge( 269 263 $this->prefixDirsPsr4[$prefix], 270 (array)$paths264 $paths 271 265 ); 272 266 } … … 277 271 * replacing any others previously set for this prefix. 278 272 * 279 * @param string $prefix The prefix280 * @param string[]|string $paths The PSR-0 base directories273 * @param string $prefix The prefix 274 * @param list<string>|string $paths The PSR-0 base directories 281 275 * 282 276 * @return void … … 295 289 * replacing any others previously set for this namespace. 296 290 * 297 * @param string $prefix The prefix/namespace, with trailing '\\'298 * @param string[]|string $paths The PSR-4 base directories291 * @param string $prefix The prefix/namespace, with trailing '\\' 292 * @param list<string>|string $paths The PSR-4 base directories 299 293 * 300 294 * @throws \InvalidArgumentException … … 482 476 483 477 /** 484 * Returns the currently registered loaders indexed by their corresponding vendor directories.485 * 486 * @return self[]478 * Returns the currently registered loaders keyed by their corresponding vendor directories. 479 * 480 * @return array<string, self> 487 481 */ 488 482 public static function getRegisteredLoaders() -
posts-on-this-day/trunk/vendor/composer/InstalledVersions.php
r2904938 r3421209 28 28 { 29 29 /** 30 * @var string|null if set (by reflection by Composer), this should be set to the path where this class is being copied to 31 * @internal 32 */ 33 private static $selfDir = null; 34 35 /** 30 36 * @var mixed[]|null 31 37 * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null 32 38 */ 33 39 private static $installed; 40 41 /** 42 * @var bool 43 */ 44 private static $installedIsLocalDir; 34 45 35 46 /** … … 310 321 self::$installed = $data; 311 322 self::$installedByVendor = array(); 323 324 // when using reload, we disable the duplicate protection to ensure that self::$installed data is 325 // always returned, but we cannot know whether it comes from the installed.php in __DIR__ or not, 326 // so we have to assume it does not, and that may result in duplicate data being returned when listing 327 // all installed packages for example 328 self::$installedIsLocalDir = false; 329 } 330 331 /** 332 * @return string 333 */ 334 private static function getSelfDir() 335 { 336 if (self::$selfDir === null) { 337 self::$selfDir = strtr(__DIR__, '\\', '/'); 338 } 339 340 return self::$selfDir; 312 341 } 313 342 … … 323 352 324 353 $installed = array(); 354 $copiedLocalDir = false; 325 355 326 356 if (self::$canGetVendors) { 357 $selfDir = self::getSelfDir(); 327 358 foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { 359 $vendorDir = strtr($vendorDir, '\\', '/'); 328 360 if (isset(self::$installedByVendor[$vendorDir])) { 329 361 $installed[] = self::$installedByVendor[$vendorDir]; … … 331 363 /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */ 332 364 $required = require $vendorDir.'/composer/installed.php'; 333 $installed[] = self::$installedByVendor[$vendorDir] = $required; 334 if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { 335 self::$installed = $installed[count($installed) - 1]; 365 self::$installedByVendor[$vendorDir] = $required; 366 $installed[] = $required; 367 if (self::$installed === null && $vendorDir.'/composer' === $selfDir) { 368 self::$installed = $required; 369 self::$installedIsLocalDir = true; 336 370 } 371 } 372 if (self::$installedIsLocalDir && $vendorDir.'/composer' === $selfDir) { 373 $copiedLocalDir = true; 337 374 } 338 375 } … … 351 388 } 352 389 353 if (self::$installed !== array() ) {390 if (self::$installed !== array() && !$copiedLocalDir) { 354 391 $installed[] = self::$installed; 355 392 } -
posts-on-this-day/trunk/vendor/composer/autoload_real.php
r2909301 r3421209 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit d93ea4de39019a1ed66b1221fd3a3f615 class ComposerAutoloaderInit5bb9b0a795043d1024e30250b085ee8d 6 6 { 7 7 private static $loader; … … 23 23 } 24 24 25 spl_autoload_register(array('ComposerAutoloaderInitd93ea4de39019a1ed66b1221fd3a3f61', 'loadClassLoader'), true, true); 25 require __DIR__ . '/platform_check.php'; 26 27 spl_autoload_register(array('ComposerAutoloaderInit5bb9b0a795043d1024e30250b085ee8d', 'loadClassLoader'), true, true); 26 28 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); 27 spl_autoload_unregister(array('ComposerAutoloaderInit d93ea4de39019a1ed66b1221fd3a3f61', 'loadClassLoader'));29 spl_autoload_unregister(array('ComposerAutoloaderInit5bb9b0a795043d1024e30250b085ee8d', 'loadClassLoader')); 28 30 29 31 require __DIR__ . '/autoload_static.php'; 30 call_user_func(\Composer\Autoload\ComposerStaticInit d93ea4de39019a1ed66b1221fd3a3f61::getInitializer($loader));32 call_user_func(\Composer\Autoload\ComposerStaticInit5bb9b0a795043d1024e30250b085ee8d::getInitializer($loader)); 31 33 32 34 $loader->register(true); -
posts-on-this-day/trunk/vendor/composer/autoload_static.php
r2909301 r3421209 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit d93ea4de39019a1ed66b1221fd3a3f617 class ComposerStaticInit5bb9b0a795043d1024e30250b085ee8d 8 8 { 9 9 public static $prefixLengthsPsr4 = array ( 10 'A' => 10 'A' => 11 11 array ( 12 12 'Automattic\\Jetpack\\Autoloader\\' => 30, … … 15 15 16 16 public static $prefixDirsPsr4 = array ( 17 'Automattic\\Jetpack\\Autoloader\\' => 17 'Automattic\\Jetpack\\Autoloader\\' => 18 18 array ( 19 19 0 => __DIR__ . '/..' . '/automattic/jetpack-autoloader/src', … … 32 32 { 33 33 return \Closure::bind(function () use ($loader) { 34 $loader->prefixLengthsPsr4 = ComposerStaticInit d93ea4de39019a1ed66b1221fd3a3f61::$prefixLengthsPsr4;35 $loader->prefixDirsPsr4 = ComposerStaticInit d93ea4de39019a1ed66b1221fd3a3f61::$prefixDirsPsr4;36 $loader->classMap = ComposerStaticInit d93ea4de39019a1ed66b1221fd3a3f61::$classMap;34 $loader->prefixLengthsPsr4 = ComposerStaticInit5bb9b0a795043d1024e30250b085ee8d::$prefixLengthsPsr4; 35 $loader->prefixDirsPsr4 = ComposerStaticInit5bb9b0a795043d1024e30250b085ee8d::$prefixDirsPsr4; 36 $loader->classMap = ComposerStaticInit5bb9b0a795043d1024e30250b085ee8d::$classMap; 37 37 38 38 }, null, ClassLoader::class); -
posts-on-this-day/trunk/vendor/composer/installed.json
r2904938 r3421209 3 3 { 4 4 "name": "automattic/jetpack-autoloader", 5 "version": "v 2.11.19",6 "version_normalized": " 2.11.19.0",5 "version": "v5.0.1", 6 "version_normalized": "5.0.1.0", 7 7 "source": { 8 8 "type": "git", 9 9 "url": "https://github.com/Automattic/jetpack-autoloader.git", 10 "reference": " d7a251cf7f1cff782508a46d13991e72fe7ebbf1"10 "reference": "ba3f5146426367c718312a0da87ebd596ed9cf33" 11 11 }, 12 12 "dist": { 13 13 "type": "zip", 14 "url": "https://api.github.com/repos/Automattic/jetpack-autoloader/zipball/ d7a251cf7f1cff782508a46d13991e72fe7ebbf1",15 "reference": " d7a251cf7f1cff782508a46d13991e72fe7ebbf1",14 "url": "https://api.github.com/repos/Automattic/jetpack-autoloader/zipball/ba3f5146426367c718312a0da87ebd596ed9cf33", 15 "reference": "ba3f5146426367c718312a0da87ebd596ed9cf33", 16 16 "shasum": "" 17 17 }, 18 18 "require": { 19 "composer-plugin-api": "^1.1 || ^2.0" 19 "composer-plugin-api": "^2.2", 20 "php": ">=7.2" 20 21 }, 21 22 "require-dev": { 22 "automattic/jetpack-changelogger": "^3.3.2", 23 "yoast/phpunit-polyfills": "1.0.4" 23 "automattic/jetpack-changelogger": "^5.1.0", 24 "composer/composer": "^2.2", 25 "yoast/phpunit-polyfills": "^1.1.1" 24 26 }, 25 "time": "202 3-04-25T15:05:38+00:00",27 "time": "2025-01-20T16:46:39+00:00", 26 28 "type": "composer-plugin", 27 29 "extra": { 30 "class": "Automattic\\Jetpack\\Autoloader\\CustomAutoloaderPlugin", 28 31 "autotagger": true, 29 "class": "Automattic\\Jetpack\\Autoloader\\CustomAutoloaderPlugin",30 32 "mirror-repo": "Automattic/jetpack-autoloader", 33 "branch-alias": { 34 "dev-trunk": "5.0.x-dev" 35 }, 31 36 "changelogger": { 32 37 "link-template": "https://github.com/Automattic/jetpack-autoloader/compare/v${old}...v${new}" 33 38 }, 34 " branch-alias": {35 " dev-trunk": "2.11.x-dev"39 "version-constants": { 40 "::VERSION": "src/AutoloadGenerator.php" 36 41 } 37 42 }, … … 50 55 ], 51 56 "description": "Creates a custom autoloader for a plugin or theme.", 57 "keywords": [ 58 "autoload", 59 "autoloader", 60 "composer", 61 "jetpack", 62 "plugin", 63 "wordpress" 64 ], 52 65 "support": { 53 "source": "https://github.com/Automattic/jetpack-autoloader/tree/v 2.11.19"66 "source": "https://github.com/Automattic/jetpack-autoloader/tree/v5.0.1" 54 67 }, 55 68 "install-path": "../automattic/jetpack-autoloader" -
posts-on-this-day/trunk/vendor/composer/installed.php
r2909301 r3421209 2 2 'root' => array( 3 3 'name' => 'jeherve/posts-on-this-day', 4 'pretty_version' => ' 1.5.5',5 'version' => ' 1.5.5.0',6 'reference' => ' 20a100a9a521f74697913fff13c81f4f2d9c6cbe',4 'pretty_version' => 'dev-trunk', 5 'version' => 'dev-trunk', 6 'reference' => '99941160c54a969e08f2aed975bcaece3efe2426', 7 7 'type' => 'wordpress-plugin', 8 8 'install_path' => __DIR__ . '/../../', … … 12 12 'versions' => array( 13 13 'automattic/jetpack-autoloader' => array( 14 'pretty_version' => 'v 2.11.19',15 'version' => ' 2.11.19.0',16 'reference' => ' d7a251cf7f1cff782508a46d13991e72fe7ebbf1',14 'pretty_version' => 'v5.0.1', 15 'version' => '5.0.1.0', 16 'reference' => 'ba3f5146426367c718312a0da87ebd596ed9cf33', 17 17 'type' => 'composer-plugin', 18 18 'install_path' => __DIR__ . '/../automattic/jetpack-autoloader', … … 21 21 ), 22 22 'jeherve/posts-on-this-day' => array( 23 'pretty_version' => ' 1.5.5',24 'version' => ' 1.5.5.0',25 'reference' => ' 20a100a9a521f74697913fff13c81f4f2d9c6cbe',23 'pretty_version' => 'dev-trunk', 24 'version' => 'dev-trunk', 25 'reference' => '99941160c54a969e08f2aed975bcaece3efe2426', 26 26 'type' => 'wordpress-plugin', 27 27 'install_path' => __DIR__ . '/../../', -
posts-on-this-day/trunk/vendor/composer/jetpack_autoload_classmap.php
r2909301 r3421209 8 8 return array( 9 9 'Automattic\\Jetpack\\Autoloader\\AutoloadGenerator' => array( 10 'version' => ' 2.11.19.0',10 'version' => '5.0.1', 11 11 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/AutoloadGenerator.php' 12 12 ), 13 13 'Jeherve\\Posts_On_This_Day\\Display' => array( 14 'version' => ' 1.5.5.0',14 'version' => 'dev-trunk', 15 15 'path' => $baseDir . '/src/class-display.php' 16 16 ), 17 17 'Jeherve\\Posts_On_This_Day\\Posts_On_This_Day_Widget' => array( 18 'version' => ' 1.5.5.0',18 'version' => 'dev-trunk', 19 19 'path' => $baseDir . '/src/class-posts-on-this-day-widget.php' 20 20 ), 21 21 'Jeherve\\Posts_On_This_Day\\Query' => array( 22 'version' => ' 1.5.5.0',22 'version' => 'dev-trunk', 23 23 'path' => $baseDir . '/src/class-query.php' 24 24 ), -
posts-on-this-day/trunk/vendor/composer/jetpack_autoload_psr4.php
r2904938 r3421209 8 8 return array( 9 9 'Automattic\\Jetpack\\Autoloader\\' => array( 10 'version' => ' 2.11.19.0',10 'version' => '5.0.1', 11 11 'path' => array( $vendorDir . '/automattic/jetpack-autoloader/src' ) 12 12 ), -
posts-on-this-day/trunk/vendor/jetpack-autoloader/class-autoloader-handler.php
r2909301 r3421209 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp d93ea4de39019a1ed66b1221fd3a3f61;8 namespace Automattic\Jetpack\Autoloader\jp5bb9b0a795043d1024e30250b085ee8d\al5_0_1; 9 9 10 10 // phpcs:ignore -
posts-on-this-day/trunk/vendor/jetpack-autoloader/class-autoloader-locator.php
r2909301 r3421209 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp d93ea4de39019a1ed66b1221fd3a3f61;8 namespace Automattic\Jetpack\Autoloader\jp5bb9b0a795043d1024e30250b085ee8d\al5_0_1; 9 9 10 10 // phpcs:ignore … … 37 37 * 38 38 * @param array $plugin_paths An array of plugin paths. 39 * @param string $latest_version The latest version reference. 39 * @param string $latest_version The latest version reference. @phan-output-reference. 40 40 * 41 41 * @return string|null … … 46 46 foreach ( $plugin_paths as $plugin_path ) { 47 47 $version = $this->get_autoloader_version( $plugin_path ); 48 if ( ! $ this->version_selector->is_version_update_required( $latest_version, $version ) ) {48 if ( ! $version || ! $this->version_selector->is_version_update_required( $latest_version, $version ) ) { 49 49 continue; 50 50 } -
posts-on-this-day/trunk/vendor/jetpack-autoloader/class-autoloader.php
r2909301 r3421209 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp d93ea4de39019a1ed66b1221fd3a3f61;8 namespace Automattic\Jetpack\Autoloader\jp5bb9b0a795043d1024e30250b085ee8d\al5_0_1; 9 9 10 10 // phpcs:ignore … … 86 86 $hook_manager->add_action( 'shutdown', new Shutdown_Handler( $plugins_handler, $cached_plugins, $was_included_by_autoloader ) ); 87 87 88 // Register a plugins_loaded handler to check for conflicting autoloaders. 89 $hook_manager->add_action( 'plugins_loaded', array( $guard, 'check_for_conflicting_autoloaders' ), 1 ); 90 88 91 // phpcs:enable Generic.Commenting.DocComment.MissingShort 89 92 } -
posts-on-this-day/trunk/vendor/jetpack-autoloader/class-container.php
r2909301 r3421209 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp d93ea4de39019a1ed66b1221fd3a3f61;8 namespace Automattic\Jetpack\Autoloader\jp5bb9b0a795043d1024e30250b085ee8d\al5_0_1; 9 9 10 10 // phpcs:ignore -
posts-on-this-day/trunk/vendor/jetpack-autoloader/class-hook-manager.php
r2909301 r3421209 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp d93ea4de39019a1ed66b1221fd3a3f61;8 namespace Automattic\Jetpack\Autoloader\jp5bb9b0a795043d1024e30250b085ee8d\al5_0_1; 9 9 10 10 // phpcs:ignore -
posts-on-this-day/trunk/vendor/jetpack-autoloader/class-latest-autoloader-guard.php
r2909301 r3421209 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp d93ea4de39019a1ed66b1221fd3a3f61;8 namespace Automattic\Jetpack\Autoloader\jp5bb9b0a795043d1024e30250b085ee8d\al5_0_1; 9 9 10 10 // phpcs:ignore … … 84 84 return false; 85 85 } 86 87 /** 88 * Check for conflicting autoloaders. 89 * 90 * A common source of strange and confusing problems is when another plugin 91 * registers a Composer autoloader at a higher priority that us. If enabled, 92 * check for this problem and warn about it. 93 * 94 * Called from the plugins_loaded hook. 95 * 96 * @since 3.1.0 97 * @return void 98 */ 99 public function check_for_conflicting_autoloaders() { 100 if ( ! defined( 'JETPACK_AUTOLOAD_DEBUG_CONFLICTING_LOADERS' ) || ! JETPACK_AUTOLOAD_DEBUG_CONFLICTING_LOADERS ) { 101 return; 102 } 103 104 global $jetpack_autoloader_loader; 105 if ( ! isset( $jetpack_autoloader_loader ) ) { 106 return; 107 } 108 $prefixes = array(); 109 foreach ( ( $jetpack_autoloader_loader->get_class_map() ?? array() ) as $classname => $data ) { 110 $parts = explode( '\\', trim( $classname, '\\' ) ); 111 array_pop( $parts ); 112 while ( $parts ) { 113 $prefixes[ implode( '\\', $parts ) . '\\' ] = true; 114 array_pop( $parts ); 115 } 116 } 117 foreach ( ( $jetpack_autoloader_loader->get_psr4_map() ?? array() ) as $prefix => $data ) { 118 $parts = explode( '\\', trim( $prefix, '\\' ) ); 119 while ( $parts ) { 120 $prefixes[ implode( '\\', $parts ) . '\\' ] = true; 121 array_pop( $parts ); 122 } 123 } 124 125 $autoload_chain = spl_autoload_functions(); 126 if ( ! $autoload_chain ) { 127 return; 128 } 129 130 foreach ( $autoload_chain as $autoloader ) { 131 // No need to check anything after us. 132 if ( is_array( $autoloader ) && is_string( $autoloader[0] ) && substr( $autoloader[0], 0, strlen( __NAMESPACE__ ) + 1 ) === __NAMESPACE__ . '\\' ) { 133 break; 134 } 135 136 // We can check Composer autoloaders easily enough. 137 if ( is_array( $autoloader ) && $autoloader[0] instanceof \Composer\Autoload\ClassLoader && is_callable( array( $autoloader[0], 'getPrefixesPsr4' ) ) ) { 138 $composer_autoloader = $autoloader[0]; 139 foreach ( $composer_autoloader->getClassMap() as $classname => $path ) { 140 if ( $jetpack_autoloader_loader->find_class_file( $classname ) ) { 141 $msg = "A Composer autoloader is registered with a higher priority than the Jetpack Autoloader and would also handle some of the classes we handle (e.g. $classname => $path). This may cause strange and confusing problems."; 142 wp_trigger_error( '', $msg ); 143 continue 2; 144 } 145 } 146 foreach ( $composer_autoloader->getPrefixesPsr4() as $prefix => $paths ) { 147 if ( isset( $prefixes[ $prefix ] ) ) { 148 $path = array_pop( $paths ); 149 $msg = "A Composer autoloader is registered with a higher priority than the Jetpack Autoloader and would also handle some of the namespaces we handle (e.g. $prefix => $path). This may cause strange and confusing problems."; 150 wp_trigger_error( '', $msg ); 151 continue 2; 152 } 153 } 154 foreach ( $composer_autoloader->getPrefixes() as $prefix => $paths ) { 155 if ( isset( $prefixes[ $prefix ] ) ) { 156 $path = array_pop( $paths ); 157 $msg = "A Composer autoloader is registered with a higher priority than the Jetpack Autoloader and would also handle some of the namespaces we handle (e.g. $prefix => $path). This may cause strange and confusing problems."; 158 wp_trigger_error( '', $msg ); 159 continue 2; 160 } 161 } 162 } 163 } 164 } 86 165 } -
posts-on-this-day/trunk/vendor/jetpack-autoloader/class-manifest-reader.php
r2909301 r3421209 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp d93ea4de39019a1ed66b1221fd3a3f61;8 namespace Automattic\Jetpack\Autoloader\jp5bb9b0a795043d1024e30250b085ee8d\al5_0_1; 9 9 10 10 // phpcs:ignore -
posts-on-this-day/trunk/vendor/jetpack-autoloader/class-path-processor.php
r2909301 r3421209 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp d93ea4de39019a1ed66b1221fd3a3f61;8 namespace Automattic\Jetpack\Autoloader\jp5bb9b0a795043d1024e30250b085ee8d\al5_0_1; 9 9 10 10 // phpcs:ignore … … 130 130 */ 131 131 private function is_absolute_path( $path ) { 132 if ( 0 === strlen( $path ) || '.' === $path[0] ) {132 if ( empty( $path ) || 0 === strlen( $path ) || '.' === $path[0] ) { 133 133 return false; 134 134 } -
posts-on-this-day/trunk/vendor/jetpack-autoloader/class-php-autoloader.php
r2909301 r3421209 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp d93ea4de39019a1ed66b1221fd3a3f61;8 namespace Automattic\Jetpack\Autoloader\jp5bb9b0a795043d1024e30250b085ee8d\al5_0_1; 9 9 10 10 // phpcs:ignore … … 80 80 global $jetpack_autoloader_loader; 81 81 if ( ! isset( $jetpack_autoloader_loader ) ) { 82 return ;82 return false; 83 83 } 84 84 … … 88 88 } 89 89 90 // A common source of strange and confusing problems is when a vendor 91 // file is autoloaded before all plugins have had a chance to register 92 // with the autoloader. Detect that, if a development constant is set. 93 if ( defined( 'JETPACK_AUTOLOAD_DEBUG_EARLY_LOADS' ) && JETPACK_AUTOLOAD_DEBUG_EARLY_LOADS && 94 ( strpos( $file, '/vendor/' ) !== false || strpos( $file, '/jetpack_vendor/' ) !== false ) && 95 is_callable( 'did_action' ) && ! did_action( 'plugins_loaded' ) 96 ) { 97 // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_wp_debug_backtrace_summary -- This is a debug log message. 98 $msg = "Jetpack Autoloader: Autoloading `$class_name` before the plugins_loaded hook may cause strange and confusing problems. " . wp_debug_backtrace_summary( '', 1 ); 99 wp_trigger_error( '', $msg ); 100 } 101 90 102 require $file; 91 103 return true; -
posts-on-this-day/trunk/vendor/jetpack-autoloader/class-plugin-locator.php
r2909301 r3421209 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp d93ea4de39019a1ed66b1221fd3a3f61;8 namespace Automattic\Jetpack\Autoloader\jp5bb9b0a795043d1024e30250b085ee8d\al5_0_1; 9 9 10 10 // phpcs:ignore … … 40 40 public function find_current_plugin() { 41 41 // Escape from `vendor/__DIR__` to root plugin directory. 42 $plugin_directory = dirname( dirname( __DIR__ ));42 $plugin_directory = dirname( __DIR__, 2 ); 43 43 44 44 // Use the path processor to ensure that this is an autoloader we're referencing. … … 76 76 */ 77 77 public function find_using_request_action( $allowed_actions ) { 78 // phpcs:disable WordPress.Security.NonceVerification.Recommended79 80 78 /** 81 79 * Note: we're not actually checking the nonce here because it's too early … … 118 116 } 119 117 120 // phpcs:enable WordPress.Security.NonceVerification.Recommended121 118 return $this->convert_plugins_to_paths( $plugin_slugs ); 122 119 } -
posts-on-this-day/trunk/vendor/jetpack-autoloader/class-plugins-handler.php
r2909301 r3421209 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp d93ea4de39019a1ed66b1221fd3a3f61;8 namespace Automattic\Jetpack\Autoloader\jp5bb9b0a795043d1024e30250b085ee8d\al5_0_1; 9 9 10 10 // phpcs:ignore -
posts-on-this-day/trunk/vendor/jetpack-autoloader/class-shutdown-handler.php
r2909301 r3421209 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp d93ea4de39019a1ed66b1221fd3a3f61;8 namespace Automattic\Jetpack\Autoloader\jp5bb9b0a795043d1024e30250b085ee8d\al5_0_1; 9 9 10 10 // phpcs:ignore -
posts-on-this-day/trunk/vendor/jetpack-autoloader/class-version-loader.php
r2909301 r3421209 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp d93ea4de39019a1ed66b1221fd3a3f61;8 namespace Automattic\Jetpack\Autoloader\jp5bb9b0a795043d1024e30250b085ee8d\al5_0_1; 9 9 10 10 // phpcs:ignore … … 59 59 60 60 /** 61 * Fetch the classmap. 62 * 63 * @since 3.1.0 64 * @return array<string, array> 65 */ 66 public function get_class_map() { 67 return $this->classmap; 68 } 69 70 /** 71 * Fetch the psr-4 mappings. 72 * 73 * @since 3.1.0 74 * @return array<string, array> 75 */ 76 public function get_psr4_map() { 77 return $this->psr4_map; 78 } 79 80 /** 61 81 * Finds the file path for the given class. 62 82 * … … 67 87 public function find_class_file( $class_name ) { 68 88 $data = $this->select_newest_file( 69 isset( $this->classmap[ $class_name ] ) ? $this->classmap[ $class_name ] :null,89 $this->classmap[ $class_name ] ?? null, 70 90 $this->find_psr4_file( $class_name ) 71 91 ); … … 124 144 */ 125 145 private function find_psr4_file( $class_name ) { 126 if ( ! isset( $this->psr4_map ) ) {146 if ( empty( $this->psr4_map ) ) { 127 147 return null; 128 148 } -
posts-on-this-day/trunk/vendor/jetpack-autoloader/class-version-selector.php
r2909301 r3421209 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp d93ea4de39019a1ed66b1221fd3a3f61;8 namespace Automattic\Jetpack\Autoloader\jp5bb9b0a795043d1024e30250b085ee8d\al5_0_1; 9 9 10 10 // phpcs:ignore
Note: See TracChangeset
for help on using the changeset viewer.