From 09ecff41af171d72abf5b5eeab7f96e8ebe50758 Mon Sep 17 00:00:00 2001 From: Anderson Martins Date: Fri, 13 Oct 2023 14:31:37 -0300 Subject: [PATCH] Fix #1488, Upgrade Reviews and Version Notices libraries - Upgrading publishpress/wordpress-reviews (v1.1.19 => v1.1.20) - Upgrading publishpress/wordpress-version-notices (2.1.2 => 2.1.3) --- lib/composer.lock | 27 ++-- lib/vendor/autoload.php | 18 --- lib/vendor/composer/ClassLoader.php | 137 +++++++++--------- lib/vendor/composer/InstalledVersions.php | 33 ++--- lib/vendor/composer/LICENSE | 2 - lib/vendor/composer/autoload_classmap.php | 2 +- lib/vendor/composer/autoload_files.php | 2 +- lib/vendor/composer/autoload_namespaces.php | 2 +- lib/vendor/composer/autoload_psr4.php | 2 +- lib/vendor/composer/autoload_real.php | 54 +++++-- lib/vendor/composer/installed.json | 29 ++-- lib/vendor/composer/installed.php | 26 ++-- .../wordpress-reviews/ReviewsController.php | 4 + .../src/Module/MenuLink/Module.php | 2 +- .../src/Module/TopNotice/Module.php | 2 +- .../src/autoload.php | 2 +- .../wordpress-version-notices/src/include.php | 14 +- 17 files changed, 177 insertions(+), 181 deletions(-) diff --git a/lib/composer.lock b/lib/composer.lock index e85795ef1..98a46e545 100644 --- a/lib/composer.lock +++ b/lib/composer.lock @@ -244,16 +244,16 @@ }, { "name": "publishpress/wordpress-reviews", - "version": "v1.1.19", + "version": "v1.1.20", "source": { "type": "git", "url": "https://github.com/publishpress/library-wordpress-reviews.git", - "reference": "028e573eb7c5da2455a7a823cabbbe5e3f89ca9c" + "reference": "6d0b687a66439721b0432ef1320fd818cd56309f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/publishpress/library-wordpress-reviews/zipball/028e573eb7c5da2455a7a823cabbbe5e3f89ca9c", - "reference": "028e573eb7c5da2455a7a823cabbbe5e3f89ca9c", + "url": "https://api.github.com/repos/publishpress/library-wordpress-reviews/zipball/6d0b687a66439721b0432ef1320fd818cd56309f", + "reference": "6d0b687a66439721b0432ef1320fd818cd56309f", "shasum": "" }, "require": { @@ -272,7 +272,6 @@ "overtrue/phplint": "^2.1", "phpmd/phpmd": "^2.8", "publishpress/publishpress-plugin-builder": "^1.2", - "sebastian/phpcpd": "^5.0", "squizlabs/php_codesniffer": "^3.5", "wp-cli/i18n-command": "^2.2", "wp-cli/wp-cli": "^2.5" @@ -306,22 +305,22 @@ ], "support": { "issues": "https://github.com/publishpress/library-wordpress-reviews/issues", - "source": "https://github.com/publishpress/library-wordpress-reviews/tree/v1.1.19" + "source": "https://github.com/publishpress/library-wordpress-reviews/tree/v1.1.20" }, - "time": "2022-06-03T13:38:53+00:00" + "time": "2023-10-06T17:22:31+00:00" }, { "name": "publishpress/wordpress-version-notices", - "version": "2.1.2", + "version": "2.1.3", "source": { "type": "git", "url": "https://github.com/publishpress/library-wordpress-version-notices.git", - "reference": "b0efcf04ab9d37304e38673bee471116e44cdb0e" + "reference": "8e54558d2427a0f93174ccbc1d02c1ba7e2abc8d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/publishpress/library-wordpress-version-notices/zipball/b0efcf04ab9d37304e38673bee471116e44cdb0e", - "reference": "b0efcf04ab9d37304e38673bee471116e44cdb0e", + "url": "https://api.github.com/repos/publishpress/library-wordpress-version-notices/zipball/8e54558d2427a0f93174ccbc1d02c1ba7e2abc8d", + "reference": "8e54558d2427a0f93174ccbc1d02c1ba7e2abc8d", "shasum": "" }, "require": { @@ -372,9 +371,9 @@ "description": "Library for displaying version notices for Pro plugins in WordPress.", "support": { "issues": "https://github.com/publishpress/library-wordpress-version-notices/issues", - "source": "https://github.com/publishpress/library-wordpress-version-notices/tree/2.1.2" + "source": "https://github.com/publishpress/library-wordpress-version-notices/tree/2.1.3" }, - "time": "2023-05-30T19:00:42+00:00" + "time": "2023-10-11T15:04:44+00:00" }, { "name": "sabre/vobject", @@ -458,5 +457,5 @@ "php": ">=7.2.5" }, "platform-dev": [], - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.2.0" } diff --git a/lib/vendor/autoload.php b/lib/vendor/autoload.php index eee0ef9e8..5c19b399f 100644 --- a/lib/vendor/autoload.php +++ b/lib/vendor/autoload.php @@ -2,24 +2,6 @@ // autoload.php @generated by Composer -if (PHP_VERSION_ID < 50600) { - if (!headers_sent()) { - header('HTTP/1.1 500 Internal Server Error'); - } - $err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL; - if (!ini_get('display_errors')) { - if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { - fwrite(STDERR, $err); - } elseif (!headers_sent()) { - echo $err; - } - } - trigger_error( - $err, - E_USER_ERROR - ); -} - require_once __DIR__ . '/composer/autoload_real.php'; return ComposerAutoloaderInitPublishPressPlanner::getLoader(); diff --git a/lib/vendor/composer/ClassLoader.php b/lib/vendor/composer/ClassLoader.php index 7824d8f7e..afef3fa2a 100644 --- a/lib/vendor/composer/ClassLoader.php +++ b/lib/vendor/composer/ClassLoader.php @@ -42,37 +42,35 @@ */ class ClassLoader { - /** @var \Closure(string):void */ - private static $includeFile; - - /** @var string|null */ + /** @var ?string */ private $vendorDir; // PSR-4 /** - * @var array> + * @var array[] + * @psalm-var array> */ private $prefixLengthsPsr4 = array(); /** - * @var array> + * @var array[] + * @psalm-var array> */ private $prefixDirsPsr4 = array(); /** - * @var list + * @var array[] + * @psalm-var array */ private $fallbackDirsPsr4 = array(); // PSR-0 /** - * List of PSR-0 prefixes - * - * Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2'))) - * - * @var array>> + * @var array[] + * @psalm-var array> */ private $prefixesPsr0 = array(); /** - * @var list + * @var array[] + * @psalm-var array */ private $fallbackDirsPsr0 = array(); @@ -80,7 +78,8 @@ class ClassLoader private $useIncludePath = false; /** - * @var array + * @var string[] + * @psalm-var array */ private $classMap = array(); @@ -88,29 +87,29 @@ class ClassLoader private $classMapAuthoritative = false; /** - * @var array + * @var bool[] + * @psalm-var array */ private $missingClasses = array(); - /** @var string|null */ + /** @var ?string */ private $apcuPrefix; /** - * @var array + * @var self[] */ private static $registeredLoaders = array(); /** - * @param string|null $vendorDir + * @param ?string $vendorDir */ public function __construct($vendorDir = null) { $this->vendorDir = $vendorDir; - self::initializeIncludeClosure(); } /** - * @return array> + * @return string[] */ public function getPrefixes() { @@ -122,7 +121,8 @@ public function getPrefixes() } /** - * @return array> + * @return array[] + * @psalm-return array> */ public function getPrefixesPsr4() { @@ -130,7 +130,8 @@ public function getPrefixesPsr4() } /** - * @return list + * @return array[] + * @psalm-return array */ public function getFallbackDirs() { @@ -138,7 +139,8 @@ public function getFallbackDirs() } /** - * @return list + * @return array[] + * @psalm-return array */ public function getFallbackDirsPsr4() { @@ -146,7 +148,8 @@ public function getFallbackDirsPsr4() } /** - * @return array Array of classname => path + * @return string[] Array of classname => path + * @psalm-return array */ public function getClassMap() { @@ -154,7 +157,8 @@ public function getClassMap() } /** - * @param array $classMap Class to filename map + * @param string[] $classMap Class to filename map + * @psalm-param array $classMap * * @return void */ @@ -171,25 +175,24 @@ public function addClassMap(array $classMap) * Registers a set of PSR-0 directories for a given prefix, either * appending or prepending to the ones previously set for this prefix. * - * @param string $prefix The prefix - * @param list|string $paths The PSR-0 root directories - * @param bool $prepend Whether to prepend the directories + * @param string $prefix The prefix + * @param string[]|string $paths The PSR-0 root directories + * @param bool $prepend Whether to prepend the directories * * @return void */ public function add($prefix, $paths, $prepend = false) { - $paths = (array) $paths; if (!$prefix) { if ($prepend) { $this->fallbackDirsPsr0 = array_merge( - $paths, + (array) $paths, $this->fallbackDirsPsr0 ); } else { $this->fallbackDirsPsr0 = array_merge( $this->fallbackDirsPsr0, - $paths + (array) $paths ); } @@ -198,19 +201,19 @@ public function add($prefix, $paths, $prepend = false) $first = $prefix[0]; if (!isset($this->prefixesPsr0[$first][$prefix])) { - $this->prefixesPsr0[$first][$prefix] = $paths; + $this->prefixesPsr0[$first][$prefix] = (array) $paths; return; } if ($prepend) { $this->prefixesPsr0[$first][$prefix] = array_merge( - $paths, + (array) $paths, $this->prefixesPsr0[$first][$prefix] ); } else { $this->prefixesPsr0[$first][$prefix] = array_merge( $this->prefixesPsr0[$first][$prefix], - $paths + (array) $paths ); } } @@ -219,9 +222,9 @@ public function add($prefix, $paths, $prepend = false) * Registers a set of PSR-4 directories for a given namespace, either * appending or prepending to the ones previously set for this namespace. * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param list|string $paths The PSR-4 base directories - * @param bool $prepend Whether to prepend the directories + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param string[]|string $paths The PSR-4 base directories + * @param bool $prepend Whether to prepend the directories * * @throws \InvalidArgumentException * @@ -229,18 +232,17 @@ public function add($prefix, $paths, $prepend = false) */ public function addPsr4($prefix, $paths, $prepend = false) { - $paths = (array) $paths; if (!$prefix) { // Register directories for the root namespace. if ($prepend) { $this->fallbackDirsPsr4 = array_merge( - $paths, + (array) $paths, $this->fallbackDirsPsr4 ); } else { $this->fallbackDirsPsr4 = array_merge( $this->fallbackDirsPsr4, - $paths + (array) $paths ); } } elseif (!isset($this->prefixDirsPsr4[$prefix])) { @@ -250,18 +252,18 @@ public function addPsr4($prefix, $paths, $prepend = false) throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); } $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; - $this->prefixDirsPsr4[$prefix] = $paths; + $this->prefixDirsPsr4[$prefix] = (array) $paths; } elseif ($prepend) { // Prepend directories for an already registered namespace. $this->prefixDirsPsr4[$prefix] = array_merge( - $paths, + (array) $paths, $this->prefixDirsPsr4[$prefix] ); } else { // Append directories for an already registered namespace. $this->prefixDirsPsr4[$prefix] = array_merge( $this->prefixDirsPsr4[$prefix], - $paths + (array) $paths ); } } @@ -270,8 +272,8 @@ public function addPsr4($prefix, $paths, $prepend = false) * Registers a set of PSR-0 directories for a given prefix, * replacing any others previously set for this prefix. * - * @param string $prefix The prefix - * @param list|string $paths The PSR-0 base directories + * @param string $prefix The prefix + * @param string[]|string $paths The PSR-0 base directories * * @return void */ @@ -288,8 +290,8 @@ public function set($prefix, $paths) * Registers a set of PSR-4 directories for a given namespace, * replacing any others previously set for this namespace. * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param list|string $paths The PSR-4 base directories + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param string[]|string $paths The PSR-4 base directories * * @throws \InvalidArgumentException * @@ -423,8 +425,7 @@ public function unregister() public function loadClass($class) { if ($file = $this->findFile($class)) { - $includeFile = self::$includeFile; - $includeFile($file); + includeFile($file); return true; } @@ -475,9 +476,9 @@ public function findFile($class) } /** - * Returns the currently registered loaders keyed by their corresponding vendor directories. + * Returns the currently registered loaders indexed by their corresponding vendor directories. * - * @return array + * @return self[] */ public static function getRegisteredLoaders() { @@ -554,26 +555,18 @@ private function findFileWithExtension($class, $ext) return false; } +} - /** - * @return void - */ - private static function initializeIncludeClosure() - { - if (self::$includeFile !== null) { - return; - } - - /** - * Scope isolated include. - * - * Prevents access to $this/self from included files. - * - * @param string $file - * @return void - */ - self::$includeFile = \Closure::bind(static function($file) { - include $file; - }, null, null); - } +/** + * Scope isolated include. + * + * Prevents access to $this/self from included files. + * + * @param string $file + * @return void + * @private + */ +function includeFile($file) +{ + include $file; } diff --git a/lib/vendor/composer/InstalledVersions.php b/lib/vendor/composer/InstalledVersions.php index 51e734a77..d50e0c9fc 100644 --- a/lib/vendor/composer/InstalledVersions.php +++ b/lib/vendor/composer/InstalledVersions.php @@ -21,14 +21,12 @@ * See also https://getcomposer.org/doc/07-runtime.md#installed-versions * * To require its presence, you can require `composer-runtime-api ^2.0` - * - * @final */ class InstalledVersions { /** * @var mixed[]|null - * @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}|array{}|null + * @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array}|array{}|null */ private static $installed; @@ -39,7 +37,7 @@ class InstalledVersions /** * @var array[] - * @psalm-var array}> + * @psalm-var array}> */ private static $installedByVendor = array(); @@ -98,7 +96,7 @@ public static function isInstalled($packageName, $includeDevRequirements = true) { foreach (self::getInstalled() as $installed) { if (isset($installed['versions'][$packageName])) { - return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false; + return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']); } } @@ -119,7 +117,7 @@ public static function isInstalled($packageName, $includeDevRequirements = true) */ public static function satisfies(VersionParser $parser, $packageName, $constraint) { - $constraint = $parser->parseConstraints((string) $constraint); + $constraint = $parser->parseConstraints($constraint); $provided = $parser->parseConstraints(self::getVersionRanges($packageName)); return $provided->matches($constraint); @@ -243,7 +241,7 @@ public static function getInstallPath($packageName) /** * @return array - * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool} + * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string} */ public static function getRootPackage() { @@ -257,7 +255,7 @@ public static function getRootPackage() * * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect. * @return array[] - * @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} + * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array} */ public static function getRawData() { @@ -280,7 +278,7 @@ public static function getRawData() * Returns the raw data of all installed.php which are currently loaded for custom implementations * * @return array[] - * @psalm-return list}> + * @psalm-return list}> */ public static function getAllRawData() { @@ -303,7 +301,7 @@ public static function getAllRawData() * @param array[] $data A vendor/composer/installed.php data set * @return void * - * @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $data + * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array} $data */ public static function reload($data) { @@ -313,7 +311,7 @@ public static function reload($data) /** * @return array[] - * @psalm-return list}> + * @psalm-return list}> */ private static function getInstalled() { @@ -328,9 +326,7 @@ private static function getInstalled() if (isset(self::$installedByVendor[$vendorDir])) { $installed[] = self::$installedByVendor[$vendorDir]; } elseif (is_file($vendorDir.'/composer/installed.php')) { - /** @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} $required */ - $required = require $vendorDir.'/composer/installed.php'; - $installed[] = self::$installedByVendor[$vendorDir] = $required; + $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php'; if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { self::$installed = $installed[count($installed) - 1]; } @@ -342,17 +338,12 @@ private static function getInstalled() // only require the installed.php file if this file is loaded from its dumped location, // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 if (substr(__DIR__, -8, 1) !== 'C') { - /** @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} $required */ - $required = require __DIR__ . '/installed.php'; - self::$installed = $required; + self::$installed = require __DIR__ . '/installed.php'; } else { self::$installed = array(); } } - - if (self::$installed !== array()) { - $installed[] = self::$installed; - } + $installed[] = self::$installed; return $installed; } diff --git a/lib/vendor/composer/LICENSE b/lib/vendor/composer/LICENSE index f27399a04..62ecfd8d0 100644 --- a/lib/vendor/composer/LICENSE +++ b/lib/vendor/composer/LICENSE @@ -1,4 +1,3 @@ - Copyright (c) Nils Adermann, Jordi Boggiano Permission is hereby granted, free of charge, to any person obtaining a copy @@ -18,4 +17,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/lib/vendor/composer/autoload_classmap.php b/lib/vendor/composer/autoload_classmap.php index 0fb0a2c19..b26f1b13b 100644 --- a/lib/vendor/composer/autoload_classmap.php +++ b/lib/vendor/composer/autoload_classmap.php @@ -2,7 +2,7 @@ // autoload_classmap.php @generated by Composer -$vendorDir = dirname(__DIR__); +$vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname($vendorDir); return array( diff --git a/lib/vendor/composer/autoload_files.php b/lib/vendor/composer/autoload_files.php index 2fd444363..84462ead4 100644 --- a/lib/vendor/composer/autoload_files.php +++ b/lib/vendor/composer/autoload_files.php @@ -2,7 +2,7 @@ // autoload_files.php @generated by Composer -$vendorDir = dirname(__DIR__); +$vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname($vendorDir); return array( diff --git a/lib/vendor/composer/autoload_namespaces.php b/lib/vendor/composer/autoload_namespaces.php index 15a2ff3ad..b7fc0125d 100644 --- a/lib/vendor/composer/autoload_namespaces.php +++ b/lib/vendor/composer/autoload_namespaces.php @@ -2,7 +2,7 @@ // autoload_namespaces.php @generated by Composer -$vendorDir = dirname(__DIR__); +$vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname($vendorDir); return array( diff --git a/lib/vendor/composer/autoload_psr4.php b/lib/vendor/composer/autoload_psr4.php index 9dde0db04..cfe379c75 100644 --- a/lib/vendor/composer/autoload_psr4.php +++ b/lib/vendor/composer/autoload_psr4.php @@ -2,7 +2,7 @@ // autoload_psr4.php @generated by Composer -$vendorDir = dirname(__DIR__); +$vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname($vendorDir); return array( diff --git a/lib/vendor/composer/autoload_real.php b/lib/vendor/composer/autoload_real.php index d220f05e5..acb4e1bc3 100644 --- a/lib/vendor/composer/autoload_real.php +++ b/lib/vendor/composer/autoload_real.php @@ -23,26 +23,56 @@ public static function getLoader() } spl_autoload_register(array('ComposerAutoloaderInitPublishPressPlanner', 'loadClassLoader'), true, true); - self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); + self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__))); spl_autoload_unregister(array('ComposerAutoloaderInitPublishPressPlanner', 'loadClassLoader')); - require __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInitPublishPressPlanner::getInitializer($loader)); + $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); + if ($useStaticLoader) { + require __DIR__ . '/autoload_static.php'; - $loader->register(true); + call_user_func(\Composer\Autoload\ComposerStaticInitPublishPressPlanner::getInitializer($loader)); + } else { + $map = require __DIR__ . '/autoload_namespaces.php'; + foreach ($map as $namespace => $path) { + $loader->set($namespace, $path); + } - $filesToLoad = \Composer\Autoload\ComposerStaticInitPublishPressPlanner::$files; - $requireFile = \Closure::bind(static function ($fileIdentifier, $file) { - if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { - $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; + $map = require __DIR__ . '/autoload_psr4.php'; + foreach ($map as $namespace => $path) { + $loader->setPsr4($namespace, $path); + } - require $file; + $classMap = require __DIR__ . '/autoload_classmap.php'; + if ($classMap) { + $loader->addClassMap($classMap); } - }, null, null); - foreach ($filesToLoad as $fileIdentifier => $file) { - $requireFile($fileIdentifier, $file); + } + + $loader->register(true); + + if ($useStaticLoader) { + $includeFiles = Composer\Autoload\ComposerStaticInitPublishPressPlanner::$files; + } else { + $includeFiles = require __DIR__ . '/autoload_files.php'; + } + foreach ($includeFiles as $fileIdentifier => $file) { + composerRequirePublishPressPlanner($fileIdentifier, $file); } return $loader; } } + +/** + * @param string $fileIdentifier + * @param string $file + * @return void + */ +function composerRequirePublishPressPlanner($fileIdentifier, $file) +{ + if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { + $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; + + require $file; + } +} diff --git a/lib/vendor/composer/installed.json b/lib/vendor/composer/installed.json index 51ee81a11..ca7e5238b 100644 --- a/lib/vendor/composer/installed.json +++ b/lib/vendor/composer/installed.json @@ -247,17 +247,17 @@ }, { "name": "publishpress/wordpress-reviews", - "version": "v1.1.19", - "version_normalized": "1.1.19.0", + "version": "v1.1.20", + "version_normalized": "1.1.20.0", "source": { "type": "git", "url": "https://github.com/publishpress/library-wordpress-reviews.git", - "reference": "028e573eb7c5da2455a7a823cabbbe5e3f89ca9c" + "reference": "6d0b687a66439721b0432ef1320fd818cd56309f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/publishpress/library-wordpress-reviews/zipball/028e573eb7c5da2455a7a823cabbbe5e3f89ca9c", - "reference": "028e573eb7c5da2455a7a823cabbbe5e3f89ca9c", + "url": "https://api.github.com/repos/publishpress/library-wordpress-reviews/zipball/6d0b687a66439721b0432ef1320fd818cd56309f", + "reference": "6d0b687a66439721b0432ef1320fd818cd56309f", "shasum": "" }, "require": { @@ -276,12 +276,11 @@ "overtrue/phplint": "^2.1", "phpmd/phpmd": "^2.8", "publishpress/publishpress-plugin-builder": "^1.2", - "sebastian/phpcpd": "^5.0", "squizlabs/php_codesniffer": "^3.5", "wp-cli/i18n-command": "^2.2", "wp-cli/wp-cli": "^2.5" }, - "time": "2022-06-03T13:38:53+00:00", + "time": "2023-10-06T17:22:31+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -312,23 +311,23 @@ ], "support": { "issues": "https://github.com/publishpress/library-wordpress-reviews/issues", - "source": "https://github.com/publishpress/library-wordpress-reviews/tree/v1.1.19" + "source": "https://github.com/publishpress/library-wordpress-reviews/tree/v1.1.20" }, "install-path": "../publishpress/wordpress-reviews" }, { "name": "publishpress/wordpress-version-notices", - "version": "2.1.2", - "version_normalized": "2.1.2.0", + "version": "2.1.3", + "version_normalized": "2.1.3.0", "source": { "type": "git", "url": "https://github.com/publishpress/library-wordpress-version-notices.git", - "reference": "b0efcf04ab9d37304e38673bee471116e44cdb0e" + "reference": "8e54558d2427a0f93174ccbc1d02c1ba7e2abc8d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/publishpress/library-wordpress-version-notices/zipball/b0efcf04ab9d37304e38673bee471116e44cdb0e", - "reference": "b0efcf04ab9d37304e38673bee471116e44cdb0e", + "url": "https://api.github.com/repos/publishpress/library-wordpress-version-notices/zipball/8e54558d2427a0f93174ccbc1d02c1ba7e2abc8d", + "reference": "8e54558d2427a0f93174ccbc1d02c1ba7e2abc8d", "shasum": "" }, "require": { @@ -350,7 +349,7 @@ "overtrue/phplint": "^2.1", "publishpress/version-loader-generator": "^1.0" }, - "time": "2023-05-30T19:00:42+00:00", + "time": "2023-10-11T15:04:44+00:00", "type": "library", "extra": { "generator": { @@ -381,7 +380,7 @@ "description": "Library for displaying version notices for Pro plugins in WordPress.", "support": { "issues": "https://github.com/publishpress/library-wordpress-version-notices/issues", - "source": "https://github.com/publishpress/library-wordpress-version-notices/tree/2.1.2" + "source": "https://github.com/publishpress/library-wordpress-version-notices/tree/2.1.3" }, "install-path": "../publishpress/wordpress-version-notices" }, diff --git a/lib/vendor/composer/installed.php b/lib/vendor/composer/installed.php index 1c9888fd2..63c33525c 100644 --- a/lib/vendor/composer/installed.php +++ b/lib/vendor/composer/installed.php @@ -1,76 +1,76 @@ array( - 'name' => '__root__', 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => '7571f9bf2f82d44c76f8d99a7c67728501941141', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), + 'reference' => '5f8e85a30abc4b68be2deea50be41b29b1b01eb5', + 'name' => '__root__', 'dev' => true, ), 'versions' => array( '__root__' => array( 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => '7571f9bf2f82d44c76f8d99a7c67728501941141', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), + 'reference' => '5f8e85a30abc4b68be2deea50be41b29b1b01eb5', 'dev_requirement' => false, ), 'publishpress/instance-protection' => array( 'pretty_version' => '2.0.1', 'version' => '2.0.1.0', - 'reference' => '4193f84a8a680bf4c0d40cc64976ddcadd92158a', 'type' => 'library', 'install_path' => __DIR__ . '/../publishpress/instance-protection', 'aliases' => array(), + 'reference' => '4193f84a8a680bf4c0d40cc64976ddcadd92158a', 'dev_requirement' => false, ), 'publishpress/pimple-pimple' => array( 'pretty_version' => '3.5.0.10', 'version' => '3.5.0.10', - 'reference' => 'f2784f4b1ccaf195b373a46a74cf3742e7c9f826', 'type' => 'library', 'install_path' => __DIR__ . '/../publishpress/pimple-pimple', 'aliases' => array(), + 'reference' => 'f2784f4b1ccaf195b373a46a74cf3742e7c9f826', 'dev_requirement' => false, ), 'publishpress/psr-container' => array( 'pretty_version' => '2.0.1.10', 'version' => '2.0.1.10', - 'reference' => '4ccd2cb058e7b93e96186791ca25870a02e35c5d', 'type' => 'library', 'install_path' => __DIR__ . '/../publishpress/psr-container', 'aliases' => array(), + 'reference' => '4ccd2cb058e7b93e96186791ca25870a02e35c5d', 'dev_requirement' => false, ), 'publishpress/wordpress-reviews' => array( - 'pretty_version' => 'v1.1.19', - 'version' => '1.1.19.0', - 'reference' => '028e573eb7c5da2455a7a823cabbbe5e3f89ca9c', + 'pretty_version' => 'v1.1.20', + 'version' => '1.1.20.0', 'type' => 'library', 'install_path' => __DIR__ . '/../publishpress/wordpress-reviews', 'aliases' => array(), + 'reference' => '6d0b687a66439721b0432ef1320fd818cd56309f', 'dev_requirement' => false, ), 'publishpress/wordpress-version-notices' => array( - 'pretty_version' => '2.1.2', - 'version' => '2.1.2.0', - 'reference' => 'b0efcf04ab9d37304e38673bee471116e44cdb0e', + 'pretty_version' => '2.1.3', + 'version' => '2.1.3.0', 'type' => 'library', 'install_path' => __DIR__ . '/../publishpress/wordpress-version-notices', 'aliases' => array(), + 'reference' => '8e54558d2427a0f93174ccbc1d02c1ba7e2abc8d', 'dev_requirement' => false, ), 'sabre/vobject' => array( 'pretty_version' => '3.5.3', 'version' => '3.5.3.0', - 'reference' => '129d80533a9ec0d9cacfb50b51180c34edb6874c', 'type' => 'library', 'install_path' => __DIR__ . '/../sabre/vobject', 'aliases' => array(), + 'reference' => '129d80533a9ec0d9cacfb50b51180c34edb6874c', 'dev_requirement' => false, ), ), diff --git a/lib/vendor/publishpress/wordpress-reviews/ReviewsController.php b/lib/vendor/publishpress/wordpress-reviews/ReviewsController.php index 1d4445a37..fcff08f8d 100644 --- a/lib/vendor/publishpress/wordpress-reviews/ReviewsController.php +++ b/lib/vendor/publishpress/wordpress-reviews/ReviewsController.php @@ -39,6 +39,10 @@ use Exception; +if (class_exists('PublishPress\\WordPressReviews\\ReviewsController')) { + return; +} + /** * Class ReviewsController * diff --git a/lib/vendor/publishpress/wordpress-version-notices/src/Module/MenuLink/Module.php b/lib/vendor/publishpress/wordpress-version-notices/src/Module/MenuLink/Module.php index a4a3d8727..b1e969bb6 100644 --- a/lib/vendor/publishpress/wordpress-version-notices/src/Module/MenuLink/Module.php +++ b/lib/vendor/publishpress/wordpress-version-notices/src/Module/MenuLink/Module.php @@ -63,7 +63,7 @@ public function __construct(TemplateLoaderInterface $templateLoader) public function init() { add_action('admin_head', [$this, 'adminHeadAddStyle']); - add_action('init', [$this, 'collectTheSettings'], 5); + add_action('init', [$this, 'collectTheSettings'], 50); add_action('admin_menu', [$this, 'addMenuLink'], 20); add_action('admin_print_scripts', [$this, 'setUpgradeMenuLink'], 9999); } diff --git a/lib/vendor/publishpress/wordpress-version-notices/src/Module/TopNotice/Module.php b/lib/vendor/publishpress/wordpress-version-notices/src/Module/TopNotice/Module.php index d103be86c..e8106752a 100644 --- a/lib/vendor/publishpress/wordpress-version-notices/src/Module/TopNotice/Module.php +++ b/lib/vendor/publishpress/wordpress-version-notices/src/Module/TopNotice/Module.php @@ -64,7 +64,7 @@ public function init() { add_action(self::DISPLAY_ACTION, [$this, 'display'], 10, 2); add_action('in_admin_header', [$this, 'displayTopNotice']); - add_action('admin_init', [$this, 'collectTheSettings'], 5); + add_action('admin_init', [$this, 'collectTheSettings'], 50); add_action('admin_head', [$this, 'adminHeadAddStyle']); } diff --git a/lib/vendor/publishpress/wordpress-version-notices/src/autoload.php b/lib/vendor/publishpress/wordpress-version-notices/src/autoload.php index a0d2e1d5e..2d1a2ef8e 100644 --- a/lib/vendor/publishpress/wordpress-version-notices/src/autoload.php +++ b/lib/vendor/publishpress/wordpress-version-notices/src/autoload.php @@ -10,7 +10,7 @@ add_action('plugins_loaded', function () { if (! defined('PP_VERSION_NOTICES_LOADED')) { - define('PP_VERSION_NOTICES_VERSION', '2.1.1'); + define('PP_VERSION_NOTICES_VERSION', '2.1.3'); define('PP_VERSION_NOTICES_BASE_PATH', __DIR__ . '/../'); define('PP_VERSION_NOTICES_SRC_PATH', __DIR__); diff --git a/lib/vendor/publishpress/wordpress-version-notices/src/include.php b/lib/vendor/publishpress/wordpress-version-notices/src/include.php index 21234f713..0ab7e0725 100644 --- a/lib/vendor/publishpress/wordpress-version-notices/src/include.php +++ b/lib/vendor/publishpress/wordpress-version-notices/src/include.php @@ -16,7 +16,7 @@ return; } -if (! function_exists(__NAMESPACE__ . '\register2Dot1Dot2')) { +if (! function_exists(__NAMESPACE__ . '\register2Dot1Dot3')) { if (! defined('PUBLISHPRESS_WORDPRESS_VERSION_NOTICES_INCLUDED')) { define('PUBLISHPRESS_WORDPRESS_VERSION_NOTICES_INCLUDED', __DIR__); } @@ -27,24 +27,24 @@ add_action('plugins_loaded', [Versions::class, 'initializeLatestVersion'], -150, 0); } - add_action('plugins_loaded', __NAMESPACE__ . '\register2Dot1Dot2', -190, 0); + add_action('plugins_loaded', __NAMESPACE__ . '\register2Dot1Dot3', -190, 0); - function register2Dot1Dot2() + function register2Dot1Dot3() { if (! class_exists('PublishPress\WordpressVersionNotices\ServicesProvider')) { $versions = Versions::getInstance(); - $versions->register('2.1.2', __NAMESPACE__ . '\initialize2Dot1Dot2'); + $versions->register('2.1.3', __NAMESPACE__ . '\initialize2Dot1Dot3'); } } - function initialize2Dot1Dot2() + function initialize2Dot1Dot3() { require_once __DIR__ . '/autoload.php'; if (! defined('PUBLISHPRESS_WORDPRESS_VERSION_NOTICES_VERSION')) { - define('PUBLISHPRESS_WORDPRESS_VERSION_NOTICES_VERSION', '2.1.2'); + define('PUBLISHPRESS_WORDPRESS_VERSION_NOTICES_VERSION', '2.1.3'); } - do_action('publishpress_wordpress_version_notices_2Dot1Dot2_initialized'); + do_action('publishpress_wordpress_version_notices_2Dot1Dot3_initialized'); } }