Plugin Directory

Changeset 2457910


Ignore:
Timestamp:
01/17/2021 07:16:14 PM (5 years ago)
Author:
andrei.igna
Message:

v0.16.2 - Fix error for REST API endpoint permission, updated version for PHP, WP tested

Location:
if-menu/trunk
Files:
8 added
21 edited

Legend:

Unmodified
Added
Removed
  • if-menu/trunk/composer.json

    r2116372 r2457910  
    1818            "Layered\\IfMenu\\": "src/"
    1919        }
     20    },
     21    "config": {
     22        "platform": {
     23            "php": "7.0"
     24        }
    2025    }
    2126}
  • if-menu/trunk/composer.lock

    r2116372 r2457910  
    55        "This file is @generated automatically"
    66    ],
    7     "content-hash": "1b70a56ba73f6f5b3986683fc3eedb17",
     7    "content-hash": "392bd516fe44feb5628842720721f49c",
    88    "packages": [
    99        {
    1010            "name": "composer/installers",
    11             "version": "v1.6.0",
     11            "version": "v1.10.0",
    1212            "source": {
    1313                "type": "git",
    1414                "url": "https://github.com/composer/installers.git",
    15                 "reference": "cfcca6b1b60bc4974324efb5783c13dca6932b5b"
     15                "reference": "1a0357fccad9d1cc1ea0c9a05b8847fbccccb78d"
    1616            },
    1717            "dist": {
    1818                "type": "zip",
    19                 "url": "https://api.github.com/repos/composer/installers/zipball/cfcca6b1b60bc4974324efb5783c13dca6932b5b",
    20                 "reference": "cfcca6b1b60bc4974324efb5783c13dca6932b5b",
     19                "url": "https://api.github.com/repos/composer/installers/zipball/1a0357fccad9d1cc1ea0c9a05b8847fbccccb78d",
     20                "reference": "1a0357fccad9d1cc1ea0c9a05b8847fbccccb78d",
    2121                "shasum": ""
    2222            },
    2323            "require": {
    24                 "composer-plugin-api": "^1.0"
     24                "composer-plugin-api": "^1.0 || ^2.0"
    2525            },
    2626            "replace": {
     
    2929            },
    3030            "require-dev": {
    31                 "composer/composer": "1.0.*@dev",
    32                 "phpunit/phpunit": "^4.8.36"
     31                "composer/composer": "1.6.* || ^2.0",
     32                "composer/semver": "^1 || ^3",
     33                "phpstan/phpstan": "^0.12.55",
     34                "phpstan/phpstan-phpunit": "^0.12.16",
     35                "symfony/phpunit-bridge": "^4.2 || ^5",
     36                "symfony/process": "^2.3"
    3337            },
    3438            "type": "composer-plugin",
     
    3640                "class": "Composer\\Installers\\Plugin",
    3741                "branch-alias": {
    38                     "dev-master": "1.0-dev"
     42                    "dev-main": "1.x-dev"
    3943                }
    4044            },
     
    6670                "Lan Management System",
    6771                "MODX Evo",
     72                "MantisBT",
    6873                "Mautic",
    6974                "Maya",
     
    7378                "RadPHP",
    7479                "SMF",
     80                "Starbug",
    7581                "Thelia",
     82                "Whmcs",
    7683                "WolfCMS",
    7784                "agl",
     
    96103                "itop",
    97104                "joomla",
     105                "known",
    98106                "kohana",
    99107                "laravel",
     
    111119                "piwik",
    112120                "ppi",
     121                "processwire",
    113122                "puppet",
    114123                "pxcms",
     
    118127                "silverstripe",
    119128                "sydes",
     129                "sylius",
    120130                "symfony",
    121131                "typo3",
     
    125135                "zikula"
    126136            ],
    127             "time": "2018-08-27T06:10:37+00:00"
     137            "funding": [
     138                {
     139                    "url": "https://packagist.com",
     140                    "type": "custom"
     141                },
     142                {
     143                    "url": "https://github.com/composer",
     144                    "type": "github"
     145                },
     146                {
     147                    "url": "https://tidelift.com/funding/github/packagist/composer/composer",
     148                    "type": "tidelift"
     149                }
     150            ],
     151            "time": "2021-01-14T11:07:16+00:00"
    128152        },
    129153        {
     
    174198    "prefer-lowest": false,
    175199    "platform": [],
    176     "platform-dev": []
     200    "platform-dev": [],
     201    "platform-overrides": {
     202        "php": "7.0"
     203    },
     204    "plugin-api-version": "1.1.0"
    177205}
  • if-menu/trunk/if-menu.php

    r2281417 r2457910  
    44Plugin URI: https://layered.market/plugins/if-menu
    55Description: Display tailored menu items to each visitor with visibility rules
    6 Version: 0.16.1
     6Version: 0.16.2
    77Text Domain: if-menu
    88Author: Layered
     
    353353                $nonce = isset($_REQUEST['nonce']) ? sanitize_key($_REQUEST['nonce']) : false;
    354354                return array('valid' => $action && $nonce && $nonce === get_transient('if-menu-nonce-' . $action));
    355             }
     355            },
     356            'permission_callback' => '__return_true',
    356357        ));
    357358    }
  • if-menu/trunk/readme.txt

    r2281417 r2457910  
    22Contributors: andreiigna
    33Tags: menu, visibility, rules, roles, hide, if, nav menu, show, display
    4 Requires at least: 4
    5 Tested up to: 5.4
    6 Requires PHP: 5.4
     4Requires at least: 5
     5Tested up to: 5.6
     6Requires PHP: 7.0
    77Stable tag: trunk
    88License: GPL-3.0-or-later
     
    106106== Changelog ==
    107107
     108= 0.16.2 - 17 January 2020 =
     109* Fixed - Error shown about the registered REST Api endpoint
     110* Updated - Ensure compatibility with WordPress 5.6
     111* Updated - Mark PHP as min v7.0 required. Plugin still works with PHP 5.x, but is encouranged to upgrade for better security and the upcoming features the plugin will get
     112
    108113= 0.16.1 - 11 April 2020 =
    109114* Fixed - Improved compatibility with other plugins that extend menu items
  • if-menu/trunk/vendor/composer/ClassLoader.php

    r2116372 r2457910  
    6161    {
    6262        if (!empty($this->prefixesPsr0)) {
    63             return call_user_func_array('array_merge', $this->prefixesPsr0);
     63            return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
    6464        }
    6565
  • if-menu/trunk/vendor/composer/autoload_classmap.php

    r2079014 r2457910  
    2525    'Composer\\Installers\\CroogoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CroogoInstaller.php',
    2626    'Composer\\Installers\\DecibelInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/DecibelInstaller.php',
     27    'Composer\\Installers\\DframeInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/DframeInstaller.php',
    2728    'Composer\\Installers\\DokuWikiInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/DokuWikiInstaller.php',
    2829    'Composer\\Installers\\DolibarrInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/DolibarrInstaller.php',
     
    4243    'Composer\\Installers\\KanboardInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KanboardInstaller.php',
    4344    'Composer\\Installers\\KirbyInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KirbyInstaller.php',
     45    'Composer\\Installers\\KnownInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KnownInstaller.php',
    4446    'Composer\\Installers\\KodiCMSInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KodiCMSInstaller.php',
    4547    'Composer\\Installers\\KohanaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KohanaInstaller.php',
     
    5355    'Composer\\Installers\\MajimaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MajimaInstaller.php',
    5456    'Composer\\Installers\\MakoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MakoInstaller.php',
     57    'Composer\\Installers\\MantisBTInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MantisBTInstaller.php',
    5558    'Composer\\Installers\\MauticInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MauticInstaller.php',
    5659    'Composer\\Installers\\MayaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MayaInstaller.php',
     
    7275    'Composer\\Installers\\PortoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PortoInstaller.php',
    7376    'Composer\\Installers\\PrestashopInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PrestashopInstaller.php',
     77    'Composer\\Installers\\ProcessWireInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ProcessWireInstaller.php',
    7478    'Composer\\Installers\\PuppetInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PuppetInstaller.php',
    7579    'Composer\\Installers\\PxcmsInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PxcmsInstaller.php',
    7680    'Composer\\Installers\\RadPHPInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/RadPHPInstaller.php',
    7781    'Composer\\Installers\\ReIndexInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ReIndexInstaller.php',
     82    'Composer\\Installers\\Redaxo5Installer' => $vendorDir . '/composer/installers/src/Composer/Installers/Redaxo5Installer.php',
    7883    'Composer\\Installers\\RedaxoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/RedaxoInstaller.php',
    7984    'Composer\\Installers\\RoundcubeInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/RoundcubeInstaller.php',
     
    8287    'Composer\\Installers\\SilverStripeInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/SilverStripeInstaller.php',
    8388    'Composer\\Installers\\SiteDirectInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/SiteDirectInstaller.php',
     89    'Composer\\Installers\\StarbugInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/StarbugInstaller.php',
    8490    'Composer\\Installers\\SyDESInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/SyDESInstaller.php',
     91    'Composer\\Installers\\SyliusInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/SyliusInstaller.php',
    8592    'Composer\\Installers\\Symfony1Installer' => $vendorDir . '/composer/installers/src/Composer/Installers/Symfony1Installer.php',
    8693    'Composer\\Installers\\TYPO3CmsInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php',
    8794    'Composer\\Installers\\TYPO3FlowInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TYPO3FlowInstaller.php',
     95    'Composer\\Installers\\TaoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TaoInstaller.php',
    8896    'Composer\\Installers\\TheliaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TheliaInstaller.php',
    8997    'Composer\\Installers\\TuskInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TuskInstaller.php',
  • if-menu/trunk/vendor/composer/autoload_real.php

    r2079014 r2457910  
    1414    }
    1515
     16    /**
     17     * @return \Composer\Autoload\ClassLoader
     18     */
    1619    public static function getLoader()
    1720    {
  • if-menu/trunk/vendor/composer/autoload_static.php

    r2079014 r2457910  
    5353        'Composer\\Installers\\CroogoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/CroogoInstaller.php',
    5454        'Composer\\Installers\\DecibelInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/DecibelInstaller.php',
     55        'Composer\\Installers\\DframeInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/DframeInstaller.php',
    5556        'Composer\\Installers\\DokuWikiInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/DokuWikiInstaller.php',
    5657        'Composer\\Installers\\DolibarrInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/DolibarrInstaller.php',
     
    7071        'Composer\\Installers\\KanboardInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/KanboardInstaller.php',
    7172        'Composer\\Installers\\KirbyInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/KirbyInstaller.php',
     73        'Composer\\Installers\\KnownInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/KnownInstaller.php',
    7274        'Composer\\Installers\\KodiCMSInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/KodiCMSInstaller.php',
    7375        'Composer\\Installers\\KohanaInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/KohanaInstaller.php',
     
    8183        'Composer\\Installers\\MajimaInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MajimaInstaller.php',
    8284        'Composer\\Installers\\MakoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MakoInstaller.php',
     85        'Composer\\Installers\\MantisBTInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MantisBTInstaller.php',
    8386        'Composer\\Installers\\MauticInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MauticInstaller.php',
    8487        'Composer\\Installers\\MayaInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MayaInstaller.php',
     
    100103        'Composer\\Installers\\PortoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PortoInstaller.php',
    101104        'Composer\\Installers\\PrestashopInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PrestashopInstaller.php',
     105        'Composer\\Installers\\ProcessWireInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ProcessWireInstaller.php',
    102106        'Composer\\Installers\\PuppetInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PuppetInstaller.php',
    103107        'Composer\\Installers\\PxcmsInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PxcmsInstaller.php',
    104108        'Composer\\Installers\\RadPHPInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/RadPHPInstaller.php',
    105109        'Composer\\Installers\\ReIndexInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ReIndexInstaller.php',
     110        'Composer\\Installers\\Redaxo5Installer' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/Redaxo5Installer.php',
    106111        'Composer\\Installers\\RedaxoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/RedaxoInstaller.php',
    107112        'Composer\\Installers\\RoundcubeInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/RoundcubeInstaller.php',
     
    110115        'Composer\\Installers\\SilverStripeInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/SilverStripeInstaller.php',
    111116        'Composer\\Installers\\SiteDirectInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/SiteDirectInstaller.php',
     117        'Composer\\Installers\\StarbugInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/StarbugInstaller.php',
    112118        'Composer\\Installers\\SyDESInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/SyDESInstaller.php',
     119        'Composer\\Installers\\SyliusInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/SyliusInstaller.php',
    113120        'Composer\\Installers\\Symfony1Installer' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/Symfony1Installer.php',
    114121        'Composer\\Installers\\TYPO3CmsInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php',
    115122        'Composer\\Installers\\TYPO3FlowInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/TYPO3FlowInstaller.php',
     123        'Composer\\Installers\\TaoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/TaoInstaller.php',
    116124        'Composer\\Installers\\TheliaInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/TheliaInstaller.php',
    117125        'Composer\\Installers\\TuskInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/TuskInstaller.php',
  • if-menu/trunk/vendor/composer/installed.json

    r2116372 r2457910  
    22    {
    33        "name": "composer/installers",
    4         "version": "v1.6.0",
    5         "version_normalized": "1.6.0.0",
     4        "version": "v1.10.0",
     5        "version_normalized": "1.10.0.0",
    66        "source": {
    77            "type": "git",
    88            "url": "https://github.com/composer/installers.git",
    9             "reference": "cfcca6b1b60bc4974324efb5783c13dca6932b5b"
     9            "reference": "1a0357fccad9d1cc1ea0c9a05b8847fbccccb78d"
    1010        },
    1111        "dist": {
    1212            "type": "zip",
    13             "url": "https://api.github.com/repos/composer/installers/zipball/cfcca6b1b60bc4974324efb5783c13dca6932b5b",
    14             "reference": "cfcca6b1b60bc4974324efb5783c13dca6932b5b",
     13            "url": "https://api.github.com/repos/composer/installers/zipball/1a0357fccad9d1cc1ea0c9a05b8847fbccccb78d",
     14            "reference": "1a0357fccad9d1cc1ea0c9a05b8847fbccccb78d",
    1515            "shasum": ""
    1616        },
    1717        "require": {
    18             "composer-plugin-api": "^1.0"
     18            "composer-plugin-api": "^1.0 || ^2.0"
    1919        },
    2020        "replace": {
     
    2323        },
    2424        "require-dev": {
    25             "composer/composer": "1.0.*@dev",
    26             "phpunit/phpunit": "^4.8.36"
     25            "composer/composer": "1.6.* || ^2.0",
     26            "composer/semver": "^1 || ^3",
     27            "phpstan/phpstan": "^0.12.55",
     28            "phpstan/phpstan-phpunit": "^0.12.16",
     29            "symfony/phpunit-bridge": "^4.2 || ^5",
     30            "symfony/process": "^2.3"
    2731        },
    28         "time": "2018-08-27T06:10:37+00:00",
     32        "time": "2021-01-14T11:07:16+00:00",
    2933        "type": "composer-plugin",
    3034        "extra": {
    3135            "class": "Composer\\Installers\\Plugin",
    3236            "branch-alias": {
    33                 "dev-master": "1.0-dev"
     37                "dev-main": "1.x-dev"
    3438            }
    3539        },
     
    6266            "Lan Management System",
    6367            "MODX Evo",
     68            "MantisBT",
    6469            "Mautic",
    6570            "Maya",
     
    6974            "RadPHP",
    7075            "SMF",
     76            "Starbug",
    7177            "Thelia",
     78            "Whmcs",
    7279            "WolfCMS",
    7380            "agl",
     
    9299            "itop",
    93100            "joomla",
     101            "known",
    94102            "kohana",
    95103            "laravel",
     
    107115            "piwik",
    108116            "ppi",
     117            "processwire",
    109118            "puppet",
    110119            "pxcms",
     
    114123            "silverstripe",
    115124            "sydes",
     125            "sylius",
    116126            "symfony",
    117127            "typo3",
     
    120130            "zend",
    121131            "zikula"
     132        ],
     133        "funding": [
     134            {
     135                "url": "https://packagist.com",
     136                "type": "custom"
     137            },
     138            {
     139                "url": "https://github.com/composer",
     140                "type": "github"
     141            },
     142            {
     143                "url": "https://tidelift.com/funding/github/packagist/composer/composer",
     144                "type": "tidelift"
     145            }
    122146        ]
    123147    },
  • if-menu/trunk/vendor/composer/installers/composer.json

    r1862232 r2457910  
    3232        "Joomla",
    3333        "Kanboard",
     34        "Known",
    3435        "Kohana",
    3536        "Lan Management System",
     
    4041        "majima",
    4142        "Mako",
     43        "MantisBT",
    4244        "Mautic",
    4345        "Maya",
     
    5658        "Puppet",
    5759        "Porto",
     60        "ProcessWire",
    5861        "RadPHP",
    5962        "ReIndex",
     
    6265        "SilverStripe",
    6366        "SMF",
     67        "Starbug",
    6468        "SyDES",
     69        "Sylius",
    6570        "symfony",
    6671        "Thelia",
    6772        "TYPO3",
     73        "WHMCS",
    6874        "WolfCMS",
    6975        "WordPress",
     
    8389        "psr-4": { "Composer\\Installers\\": "src/Composer/Installers" }
    8490    },
     91    "autoload-dev": {
     92        "psr-4": { "Composer\\Installers\\Test\\": "tests/Composer/Installers/Test" }
     93    },
    8594    "extra": {
    8695        "class": "Composer\\Installers\\Plugin",
    8796        "branch-alias": {
    88             "dev-master": "1.0-dev"
     97            "dev-main": "1.x-dev"
    8998        }
    9099    },
     
    94103    },
    95104    "require": {
    96         "composer-plugin-api": "^1.0"
     105        "composer-plugin-api": "^1.0 || ^2.0"
    97106    },
    98107    "require-dev": {
    99         "composer/composer": "1.0.*@dev",
    100         "phpunit/phpunit": "^4.8.36"
     108        "composer/composer": "1.6.* || ^2.0",
     109        "composer/semver": "^1 || ^3",
     110        "symfony/phpunit-bridge": "^4.2 || ^5",
     111        "phpstan/phpstan": "^0.12.55",
     112        "symfony/process": "^2.3",
     113        "phpstan/phpstan-phpunit": "^0.12.16"
    101114    },
    102115    "scripts": {
    103         "test": "phpunit"
     116        "test": "SYMFONY_PHPUNIT_REMOVE_RETURN_TYPEHINT=1 vendor/bin/simple-phpunit",
     117        "phpstan": "vendor/bin/phpstan analyse"
    104118    }
    105119}
  • if-menu/trunk/vendor/composer/installers/src/Composer/Installers/BaseInstaller.php

    r1862232 r2457910  
    7575     * For an installer to override to modify the vars per installer.
    7676     *
    77      * @param  array $vars
    78      * @return array
     77     * @param  array<string, string> $vars This will normally receive array{name: string, vendor: string, type: string}
     78     * @return array<string, string>
    7979     */
    8080    public function inflectPackageVars($vars)
     
    8686     * Gets the installer's locations
    8787     *
    88      * @return array
     88     * @return array<string, string> map of package types => install path
    8989     */
    9090    public function getLocations()
     
    9696     * Replace vars in a path
    9797     *
    98      * @param  string $path
    99      * @param  array  $vars
     98     * @param  string                $path
     99     * @param  array<string, string> $vars
    100100     * @return string
    101101     */
     
    122122     * @param  string $type
    123123     * @param  string $vendor = NULL
    124      * @return string
     124     * @return string|false
    125125     */
    126126    protected function mapCustomInstallPaths(array $paths, $name, $type, $vendor = NULL)
    127127    {
    128128        foreach ($paths as $path => $names) {
     129            $names = (array) $names;
    129130            if (in_array($name, $names) || in_array('type:' . $type, $names) || in_array('vendor:' . $vendor, $names)) {
    130131                return $path;
  • if-menu/trunk/vendor/composer/installers/src/Composer/Installers/CakePHPInstaller.php

    r1862232 r2457910  
    33
    44use Composer\DependencyResolver\Pool;
     5use Composer\Semver\Constraint\Constraint;
    56
    67class CakePHPInstaller extends BaseInstaller
     
    5051    protected function matchesCakeVersion($matcher, $version)
    5152    {
    52         if (class_exists('Composer\Semver\Constraint\MultiConstraint')) {
    53             $multiClass = 'Composer\Semver\Constraint\MultiConstraint';
    54             $constraintClass = 'Composer\Semver\Constraint\Constraint';
    55         } else {
    56             $multiClass = 'Composer\Package\LinkConstraint\MultiConstraint';
    57             $constraintClass = 'Composer\Package\LinkConstraint\VersionConstraint';
     53        $repositoryManager = $this->composer->getRepositoryManager();
     54        if (! $repositoryManager) {
     55            return false;
    5856        }
    5957
    60         $repositoryManager = $this->composer->getRepositoryManager();
    61         if ($repositoryManager) {
    62             $repos = $repositoryManager->getLocalRepository();
    63             if (!$repos) {
    64                 return false;
    65             }
    66             $cake3 = new $multiClass(array(
    67                 new $constraintClass($matcher, $version),
    68                 new $constraintClass('!=', '9999999-dev'),
    69             ));
    70             $pool = new Pool('dev');
    71             $pool->addRepository($repos);
    72             $packages = $pool->whatProvides('cakephp/cakephp');
    73             foreach ($packages as $package) {
    74                 $installed = new $constraintClass('=', $package->getVersion());
    75                 if ($cake3->matches($installed)) {
    76                     return true;
    77                 }
    78             }
     58        $repos = $repositoryManager->getLocalRepository();
     59        if (!$repos) {
     60            return false;
    7961        }
    80         return false;
     62
     63        return $repos->findPackage('cakephp/cakephp', new Constraint($matcher, $version)) !== null;
    8164    }
    8265}
  • if-menu/trunk/vendor/composer/installers/src/Composer/Installers/CockpitInstaller.php

    r1862232 r2457910  
    1313     * Strip `module-` prefix from package name.
    1414     *
    15      * @param array @vars
    16      *
    17      * @return array
     15     * {@inheritDoc}
    1816     */
    1917    public function inflectPackageVars($vars)
  • if-menu/trunk/vendor/composer/installers/src/Composer/Installers/DrupalInstaller.php

    r2079014 r2457910  
    55{
    66    protected $locations = array(
    7         'core'      => 'core/',
    8         'module'    => 'modules/{$name}/',
    9         'theme'     => 'themes/{$name}/',
    10         'library'   => 'libraries/{$name}/',
    11         'profile'   => 'profiles/{$name}/',
    12         'drush'     => 'drush/{$name}/',
    13         'custom-theme' => 'themes/custom/{$name}/',
    14         'custom-module' => 'modules/custom/{$name}/',
     7        'core'             => 'core/',
     8        'module'           => 'modules/{$name}/',
     9        'theme'            => 'themes/{$name}/',
     10        'library'          => 'libraries/{$name}/',
     11        'profile'          => 'profiles/{$name}/',
     12        'database-driver'  => 'drivers/lib/Drupal/Driver/Database/{$name}/',
     13        'drush'            => 'drush/{$name}/',
     14        'custom-theme'     => 'themes/custom/{$name}/',
     15        'custom-module'    => 'modules/custom/{$name}/',
     16        'custom-profile'   => 'profiles/custom/{$name}/',
     17        'drupal-multisite' => 'sites/{$name}/',
     18        'console'          => 'console/{$name}/',
     19        'console-language' => 'console/language/{$name}/',
     20        'config'           => 'config/sync/',
    1521    );
    1622}
  • if-menu/trunk/vendor/composer/installers/src/Composer/Installers/Installer.php

    r2079014 r2457910  
    1010use Composer\Repository\InstalledRepositoryInterface;
    1111use Composer\Util\Filesystem;
     12use React\Promise\PromiseInterface;
    1213
    1314class Installer extends LibraryInstaller
     
    3637        'craft'        => 'CraftInstaller',
    3738        'croogo'       => 'CroogoInstaller',
     39        'dframe'       => 'DframeInstaller',
    3840        'dokuwiki'     => 'DokuWikiInstaller',
    3941        'dolibarr'     => 'DolibarrInstaller',
     
    5456        'kanboard'     => 'KanboardInstaller',
    5557        'kirby'        => 'KirbyInstaller',
     58        'known'        => 'KnownInstaller',
    5659        'kodicms'      => 'KodiCMSInstaller',
    5760        'kohana'       => 'KohanaInstaller',
     
    6265        'magento'      => 'MagentoInstaller',
    6366        'majima'       => 'MajimaInstaller',
     67        'mantisbt'     => 'MantisBTInstaller',
    6468        'mako'         => 'MakoInstaller',
    6569        'maya'         => 'MayaInstaller',
     
    8589        'phifty'       => 'PhiftyInstaller',
    8690        'porto'        => 'PortoInstaller',
     91        'processwire'  => 'ProcessWireInstaller',
    8792        'redaxo'       => 'RedaxoInstaller',
     93        'redaxo5'      => 'Redaxo5Installer',
    8894        'reindex'      => 'ReIndexInstaller',
    8995        'roundcube'    => 'RoundcubeInstaller',
     
    9298        'silverstripe' => 'SilverStripeInstaller',
    9399        'smf'          => 'SMFInstaller',
     100        'starbug'      => 'StarbugInstaller',
    94101        'sydes'        => 'SyDESInstaller',
     102        'sylius'       => 'SyliusInstaller',
    95103        'symfony1'     => 'Symfony1Installer',
     104        'tao'          => 'TaoInstaller',
    96105        'thelia'       => 'TheliaInstaller',
    97106        'tusk'         => 'TuskInstaller',
     
    155164    public function uninstall(InstalledRepositoryInterface $repo, PackageInterface $package)
    156165    {
    157         parent::uninstall($repo, $package);
    158166        $installPath = $this->getPackageBasePath($package);
    159         $this->io->write(sprintf('Deleting %s - %s', $installPath, !file_exists($installPath) ? '<comment>deleted</comment>' : '<error>not deleted</error>'));
     167        $io = $this->io;
     168        $outputStatus = function () use ($io, $installPath) {
     169            $io->write(sprintf('Deleting %s - %s', $installPath, !file_exists($installPath) ? '<comment>deleted</comment>' : '<error>not deleted</error>'));
     170        };
     171
     172        $promise = parent::uninstall($repo, $package);
     173
     174        // Composer v2 might return a promise here
     175        if ($promise instanceof PromiseInterface) {
     176            return $promise->then($outputStatus);
     177        }
     178
     179        // If not, execute the code right away as parent::uninstall executed synchronously (composer v1, or v2 without async)
     180        $outputStatus();
     181
     182        return null;
    160183    }
    161184
     
    179202     * Finds a supported framework type if it exists and returns it
    180203     *
    181      * @param  string $type
    182      * @return string
     204     * @param  string       $type
     205     * @return string|false
    183206     */
    184207    protected function findFrameworkType($type)
    185208    {
    186         $frameworkType = false;
    187 
    188209        krsort($this->supportedTypes);
    189210
    190211        foreach ($this->supportedTypes as $key => $val) {
    191212            if ($key === substr($type, 0, strlen($key))) {
    192                 $frameworkType = substr($type, 0, strlen($key));
    193                 break;
     213                return substr($type, 0, strlen($key));
    194214            }
    195215        }
    196216
    197         return $frameworkType;
     217        return false;
    198218    }
    199219
  • if-menu/trunk/vendor/composer/installers/src/Composer/Installers/MicroweberInstaller.php

    r1862232 r2457910  
    55{
    66    protected $locations = array(
    7         'module'      => 'userfiles/modules/{$name}/',
    8         'module-skin' => 'userfiles/modules/{$name}/templates/',
    9         'template'    => 'userfiles/templates/{$name}/',
    10         'element'     => 'userfiles/elements/{$name}/',
    11         'vendor'      => 'vendor/{$name}/',
    12         'components'  => 'components/{$name}/'
     7        'module' => 'userfiles/modules/{$install_item_dir}/',
     8        'module-skin' => 'userfiles/modules/{$install_item_dir}/templates/',
     9        'template' => 'userfiles/templates/{$install_item_dir}/',
     10        'element' => 'userfiles/elements/{$install_item_dir}/',
     11        'vendor' => 'vendor/{$install_item_dir}/',
     12        'components' => 'components/{$install_item_dir}/'
    1313    );
    1414
     
    2323    public function inflectPackageVars($vars)
    2424    {
    25         if ($vars['type'] === 'microweber-template') {
    26             return $this->inflectTemplateVars($vars);
     25
     26
     27        if ($this->package->getTargetDir()) {
     28            $vars['install_item_dir'] = $this->package->getTargetDir();
     29        } else {
     30            $vars['install_item_dir'] = $vars['name'];
     31            if ($vars['type'] === 'microweber-template') {
     32                return $this->inflectTemplateVars($vars);
     33            }
     34            if ($vars['type'] === 'microweber-templates') {
     35                return $this->inflectTemplatesVars($vars);
     36            }
     37            if ($vars['type'] === 'microweber-core') {
     38                return $this->inflectCoreVars($vars);
     39            }
     40            if ($vars['type'] === 'microweber-adapter') {
     41                return $this->inflectCoreVars($vars);
     42            }
     43            if ($vars['type'] === 'microweber-module') {
     44                return $this->inflectModuleVars($vars);
     45            }
     46            if ($vars['type'] === 'microweber-modules') {
     47                return $this->inflectModulesVars($vars);
     48            }
     49            if ($vars['type'] === 'microweber-skin') {
     50                return $this->inflectSkinVars($vars);
     51            }
     52            if ($vars['type'] === 'microweber-element' or $vars['type'] === 'microweber-elements') {
     53                return $this->inflectElementVars($vars);
     54            }
    2755        }
    28         if ($vars['type'] === 'microweber-templates') {
    29             return $this->inflectTemplatesVars($vars);
    30         }
    31         if ($vars['type'] === 'microweber-core') {
    32             return $this->inflectCoreVars($vars);
    33         }
    34         if ($vars['type'] === 'microweber-adapter') {
    35             return $this->inflectCoreVars($vars);
    36         }
    37         if ($vars['type'] === 'microweber-module') {
    38             return $this->inflectModuleVars($vars);
    39         }
    40         if ($vars['type'] === 'microweber-modules') {
    41             return $this->inflectModulesVars($vars);
    42         }
    43         if ($vars['type'] === 'microweber-skin') {
    44             return $this->inflectSkinVars($vars);
    45         }
    46         if ($vars['type'] === 'microweber-element' or $vars['type'] === 'microweber-elements') {
    47             return $this->inflectElementVars($vars);
    48         }
     56
    4957
    5058        return $vars;
     
    5361    protected function inflectTemplateVars($vars)
    5462    {
    55         $vars['name'] = preg_replace('/-template$/', '', $vars['name']);
    56         $vars['name'] = preg_replace('/template-$/', '', $vars['name']);
     63        $vars['install_item_dir'] = preg_replace('/-template$/', '', $vars['install_item_dir']);
     64        $vars['install_item_dir'] = preg_replace('/template-$/', '', $vars['install_item_dir']);
    5765
    5866        return $vars;
     
    6169    protected function inflectTemplatesVars($vars)
    6270    {
    63         $vars['name'] = preg_replace('/-templates$/', '', $vars['name']);
    64         $vars['name'] = preg_replace('/templates-$/', '', $vars['name']);
     71        $vars['install_item_dir'] = preg_replace('/-templates$/', '', $vars['install_item_dir']);
     72        $vars['install_item_dir'] = preg_replace('/templates-$/', '', $vars['install_item_dir']);
    6573
    6674        return $vars;
     
    6977    protected function inflectCoreVars($vars)
    7078    {
    71         $vars['name'] = preg_replace('/-providers$/', '', $vars['name']);
    72         $vars['name'] = preg_replace('/-provider$/', '', $vars['name']);
    73         $vars['name'] = preg_replace('/-adapter$/', '', $vars['name']);
     79        $vars['install_item_dir'] = preg_replace('/-providers$/', '', $vars['install_item_dir']);
     80        $vars['install_item_dir'] = preg_replace('/-provider$/', '', $vars['install_item_dir']);
     81        $vars['install_item_dir'] = preg_replace('/-adapter$/', '', $vars['install_item_dir']);
    7482
    7583        return $vars;
     
    7886    protected function inflectModuleVars($vars)
    7987    {
    80         $vars['name'] = preg_replace('/-module$/', '', $vars['name']);
    81         $vars['name'] = preg_replace('/module-$/', '', $vars['name']);
     88        $vars['install_item_dir'] = preg_replace('/-module$/', '', $vars['install_item_dir']);
     89        $vars['install_item_dir'] = preg_replace('/module-$/', '', $vars['install_item_dir']);
    8290
    8391        return $vars;
     
    8694    protected function inflectModulesVars($vars)
    8795    {
    88         $vars['name'] = preg_replace('/-modules$/', '', $vars['name']);
    89         $vars['name'] = preg_replace('/modules-$/', '', $vars['name']);
     96        $vars['install_item_dir'] = preg_replace('/-modules$/', '', $vars['install_item_dir']);
     97        $vars['install_item_dir'] = preg_replace('/modules-$/', '', $vars['install_item_dir']);
    9098
    9199        return $vars;
     
    94102    protected function inflectSkinVars($vars)
    95103    {
    96         $vars['name'] = preg_replace('/-skin$/', '', $vars['name']);
    97         $vars['name'] = preg_replace('/skin-$/', '', $vars['name']);
     104        $vars['install_item_dir'] = preg_replace('/-skin$/', '', $vars['install_item_dir']);
     105        $vars['install_item_dir'] = preg_replace('/skin-$/', '', $vars['install_item_dir']);
    98106
    99107        return $vars;
     
    102110    protected function inflectElementVars($vars)
    103111    {
    104         $vars['name'] = preg_replace('/-elements$/', '', $vars['name']);
    105         $vars['name'] = preg_replace('/elements-$/', '', $vars['name']);
    106         $vars['name'] = preg_replace('/-element$/', '', $vars['name']);
    107         $vars['name'] = preg_replace('/element-$/', '', $vars['name']);
     112        $vars['install_item_dir'] = preg_replace('/-elements$/', '', $vars['install_item_dir']);
     113        $vars['install_item_dir'] = preg_replace('/elements-$/', '', $vars['install_item_dir']);
     114        $vars['install_item_dir'] = preg_replace('/-element$/', '', $vars['install_item_dir']);
     115        $vars['install_item_dir'] = preg_replace('/element-$/', '', $vars['install_item_dir']);
    108116
    109117        return $vars;
  • if-menu/trunk/vendor/composer/installers/src/Composer/Installers/MoodleInstaller.php

    r1862232 r2457910  
    1919        'cachelock'          => 'cache/locks/{$name}/',
    2020        'calendartype'       => 'calendar/type/{$name}/',
     21        'fileconverter'      => 'files/converter/{$name}/',
    2122        'format'             => 'course/format/{$name}/',
    2223        'coursereport'       => 'course/report/{$name}/',
     24        'customcertelement'  => 'mod/customcert/element/{$name}/',
    2325        'datafield'          => 'mod/data/field/{$name}/',
    2426        'datapreset'         => 'mod/data/preset/{$name}/',
  • if-menu/trunk/vendor/composer/installers/src/Composer/Installers/OxidInstaller.php

    r1862232 r2457910  
    1919     * @param PackageInterface $package
    2020     * @param string $frameworkType
    21      * @return void
     21     * @return string
    2222     */
    2323    public function getInstallPath(PackageInterface $package, $frameworkType = '')
  • if-menu/trunk/vendor/composer/installers/src/Composer/Installers/Plugin.php

    r1862232 r2457910  
    99class Plugin implements PluginInterface
    1010{
     11    private $installer;
    1112
    1213    public function activate(Composer $composer, IOInterface $io)
    1314    {
    14         $installer = new Installer($io, $composer);
    15         $composer->getInstallationManager()->addInstaller($installer);
     15        $this->installer = new Installer($io, $composer);
     16        $composer->getInstallationManager()->addInstaller($this->installer);
     17    }
     18
     19    public function deactivate(Composer $composer, IOInterface $io)
     20    {
     21        $composer->getInstallationManager()->removeInstaller($this->installer);
     22    }
     23
     24    public function uninstall(Composer $composer, IOInterface $io)
     25    {
    1626    }
    1727}
  • if-menu/trunk/vendor/composer/installers/src/Composer/Installers/SyDESInstaller.php

    r1862232 r2457910  
    1414     * Strip `sydes-` prefix and a trailing '-theme' or '-module' from package name if present.
    1515     *
    16      * @param array @vars
    17      *
    18      * @return array
     16     * {@inerhitDoc}
    1917     */
    2018    public function inflectPackageVars($vars)
  • if-menu/trunk/vendor/composer/installers/src/Composer/Installers/WHMCSInstaller.php

    r1862232 r2457910  
    66{
    77    protected $locations = array(
    8         'gateway' => 'modules/gateways/{$name}/',
     8        'addons' => 'modules/addons/{$vendor}_{$name}/',
     9        'fraud' => 'modules/fraud/{$vendor}_{$name}/',
     10        'gateways' => 'modules/gateways/{$vendor}_{$name}/',
     11        'notifications' => 'modules/notifications/{$vendor}_{$name}/',
     12        'registrars' => 'modules/registrars/{$vendor}_{$name}/',
     13        'reports' => 'modules/reports/{$vendor}_{$name}/',
     14        'security' => 'modules/security/{$vendor}_{$name}/',
     15        'servers' => 'modules/servers/{$vendor}_{$name}/',
     16        'social' => 'modules/social/{$vendor}_{$name}/',
     17        'support' => 'modules/support/{$vendor}_{$name}/',
     18        'templates' => 'templates/{$vendor}_{$name}/',
     19        'includes' => 'includes/{$vendor}_{$name}/'
    920    );
    1021}
Note: See TracChangeset for help on using the changeset viewer.