updated plugin Menu Icons version 0.13.17

This commit is contained in:
2025-04-29 21:19:59 +00:00
committed by Gitium
parent ebd40ef928
commit fd76ba0cbe
38 changed files with 1332 additions and 243 deletions

View File

@ -26,12 +26,23 @@ use Composer\Semver\VersionParser;
*/
class InstalledVersions
{
/**
* @var string|null if set (by reflection by Composer), this should be set to the path where this class is being copied to
* @internal
*/
private static $selfDir = null;
/**
* @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<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
*/
private static $installed;
/**
* @var bool
*/
private static $installedIsLocalDir;
/**
* @var bool|null
*/
@ -309,6 +320,24 @@ class InstalledVersions
{
self::$installed = $data;
self::$installedByVendor = array();
// when using reload, we disable the duplicate protection to ensure that self::$installed data is
// always returned, but we cannot know whether it comes from the installed.php in __DIR__ or not,
// so we have to assume it does not, and that may result in duplicate data being returned when listing
// all installed packages for example
self::$installedIsLocalDir = false;
}
/**
* @return string
*/
private static function getSelfDir()
{
if (self::$selfDir === null) {
self::$selfDir = strtr(__DIR__, '\\', '/');
}
return self::$selfDir;
}
/**
@ -322,19 +351,27 @@ class InstalledVersions
}
$installed = array();
$copiedLocalDir = false;
if (self::$canGetVendors) {
$selfDir = self::getSelfDir();
foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
$vendorDir = strtr($vendorDir, '\\', '/');
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<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 */
$required = require $vendorDir.'/composer/installed.php';
$installed[] = self::$installedByVendor[$vendorDir] = $required;
if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
self::$installed = $installed[count($installed) - 1];
self::$installedByVendor[$vendorDir] = $required;
$installed[] = $required;
if (self::$installed === null && $vendorDir.'/composer' === $selfDir) {
self::$installed = $required;
self::$installedIsLocalDir = true;
}
}
if (self::$installedIsLocalDir && $vendorDir.'/composer' === $selfDir) {
$copiedLocalDir = true;
}
}
}
@ -350,7 +387,7 @@ class InstalledVersions
}
}
if (self::$installed !== array()) {
if (self::$installed !== array() && !$copiedLocalDir) {
$installed[] = self::$installed;
}

View File

@ -133,23 +133,24 @@
},
{
"name": "codeinwp/themeisle-sdk",
"version": "3.3.25",
"version_normalized": "3.3.25.0",
"version": "3.3.44",
"version_normalized": "3.3.44.0",
"source": {
"type": "git",
"url": "https://github.com/Codeinwp/themeisle-sdk.git",
"reference": "29b7c81f8ccd039f49d62ef7427a4cc06369becc"
"reference": "fed444b52ebf1f689ec2434df177926bf8f238c4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/29b7c81f8ccd039f49d62ef7427a4cc06369becc",
"reference": "29b7c81f8ccd039f49d62ef7427a4cc06369becc",
"url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/fed444b52ebf1f689ec2434df177926bf8f238c4",
"reference": "fed444b52ebf1f689ec2434df177926bf8f238c4",
"shasum": ""
},
"require-dev": {
"codeinwp/phpcs-ruleset": "dev-main"
"codeinwp/phpcs-ruleset": "dev-main",
"yoast/phpunit-polyfills": "^2.0"
},
"time": "2024-07-08T13:49:14+00:00",
"time": "2025-02-18T21:31:30+00:00",
"type": "library",
"installation-source": "dist",
"notification-url": "https://packagist.org/downloads/",
@ -170,7 +171,7 @@
],
"support": {
"issues": "https://github.com/Codeinwp/themeisle-sdk/issues",
"source": "https://github.com/Codeinwp/themeisle-sdk/tree/v3.3.25"
"source": "https://github.com/Codeinwp/themeisle-sdk/tree/v3.3.44"
},
"install-path": "../codeinwp/themeisle-sdk"
},

View File

@ -1,9 +1,9 @@
<?php return array(
'root' => array(
'name' => 'codeinwp/wp-menu-icons',
'pretty_version' => 'v0.13.15',
'version' => '0.13.15.0',
'reference' => '6f28bd69233def87a6289b95d36c9b9b5500cefb',
'pretty_version' => 'v0.13.17',
'version' => '0.13.17.0',
'reference' => '7e30cf90509868e023d4c910c1f75be9b01b91a2',
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
@ -40,18 +40,18 @@
'dev_requirement' => false,
),
'codeinwp/themeisle-sdk' => array(
'pretty_version' => '3.3.25',
'version' => '3.3.25.0',
'reference' => '29b7c81f8ccd039f49d62ef7427a4cc06369becc',
'pretty_version' => '3.3.44',
'version' => '3.3.44.0',
'reference' => 'fed444b52ebf1f689ec2434df177926bf8f238c4',
'type' => 'library',
'install_path' => __DIR__ . '/../codeinwp/themeisle-sdk',
'aliases' => array(),
'dev_requirement' => false,
),
'codeinwp/wp-menu-icons' => array(
'pretty_version' => 'v0.13.15',
'version' => '0.13.15.0',
'reference' => '6f28bd69233def87a6289b95d36c9b9b5500cefb',
'pretty_version' => 'v0.13.17',
'version' => '0.13.17.0',
'reference' => '7e30cf90509868e023d4c910c1f75be9b01b91a2',
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),