Plugin Directory

Changeset 2997541


Ignore:
Timestamp:
11/17/2023 10:29:28 AM (2 years ago)
Author:
marcbelletre
Message:

v1.3.4

Location:
acf-rrule-field
Files:
18 edited
1 copied

Legend:

Unmodified
Added
Removed
  • acf-rrule-field/tags/1.3.4/acf-rrule.php

    r2990646 r2997541  
    55Plugin URI: https://github.com/marcbelletre/acf-rrule
    66Description: Create recurring rules with a single ACF field
    7 Version: 1.3.3
     7Version: 1.3.4
    88Author: Marc Bellêtre
    99Author URI: https://pixelparfait.fr
     
    4545            // - these will be passed into the field class.
    4646            $this->settings = [
    47                 'version'   => '1.3.3',
     47                'version'   => '1.3.4',
    4848                'url'       => plugin_dir_url(__FILE__),
    4949                'path'      => plugin_dir_path(__FILE__),
  • acf-rrule-field/tags/1.3.4/fields/class-acf-field-rrule.php

    r2990646 r2997541  
    706706                    $rule->setTimezone($timezoneString);
    707707
     708                    /**
     709                     * Ensure DTEND is reset if UNTIL exists.
     710                     *
     711                     * @see https://github.com/marcbelletre/acf-rrule/issues/23
     712                     */
     713                    if ($rule->getEndDate() == $rule->getUntil()) {
     714                        $rule->setEndDate(null);
     715                    }
     716
    708717                    $start_date = $rule->getStartDate();
    709718
    710                     $new_value['rrule'] = $value;
     719                    $new_value['rrule'] = $rule->getString();
    711720                    $new_value['start_date'] = $start_date ? $start_date->format('Ymd') : null;
    712721                    $new_value['start_time'] = $start_date ? $start_date->format('H:i:s') : null;
     
    741750                    }
    742751
    743                     if ($rule->getUntil()) {
    744                         $end_date = $rule->getEndDate() ?: $rule->getUntil();
     752                    if ($rule->getUntil() || $rule->getEndDate()) {
     753                        $end_date = $rule->getUntil() ?: $rule->getEndDate();
    745754
    746755                        $new_value['end_type'] = 'date';
     
    866875
    867876                            $rule->setUntil($end_date);
    868                             $rule->setEndDate($end_date);
    869877                        }
    870878
  • acf-rrule-field/tags/1.3.4/readme.txt

    r2990646 r2997541  
    55Tested up to: 6.3
    66Requires PHP: 7.2
    7 Stable tag: 1.3.3
     7Stable tag: 1.3.4
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3131
    3232== Changelog ==
     33
     34= 1.3.4 =
     35* Remove DTEND attribute from RRULE string. This fixes a compatibility issue with rrule.js package.
    3336
    3437= 1.3.3 =
  • acf-rrule-field/tags/1.3.4/vendor/autoload.php

    r2990646 r2997541  
    2323require_once __DIR__ . '/composer/autoload_real.php';
    2424
    25 return ComposerAutoloaderInitc35fcbe54628f3a3a961b0147fa06c59::getLoader();
     25return ComposerAutoloaderInitd9457430dc7c2728674532aead9f08e1::getLoader();
  • acf-rrule-field/tags/1.3.4/vendor/composer/ClassLoader.php

    r2990646 r2997541  
    4343class ClassLoader
    4444{
    45     /** @var ?string */
     45    /** @var \Closure(string):void */
     46    private static $includeFile;
     47
     48    /** @var string|null */
    4649    private $vendorDir;
    4750
    4851    // PSR-4
    4952    /**
    50      * @var array[]
    51      * @psalm-var array<string, array<string, int>>
     53     * @var array<string, array<string, int>>
    5254     */
    5355    private $prefixLengthsPsr4 = array();
    5456    /**
    55      * @var array[]
    56      * @psalm-var array<string, array<int, string>>
     57     * @var array<string, list<string>>
    5758     */
    5859    private $prefixDirsPsr4 = array();
    5960    /**
    60      * @var array[]
    61      * @psalm-var array<string, string>
     61     * @var list<string>
    6262     */
    6363    private $fallbackDirsPsr4 = array();
     
    6565    // PSR-0
    6666    /**
    67      * @var array[]
    68      * @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>>>
    6972     */
    7073    private $prefixesPsr0 = array();
    7174    /**
    72      * @var array[]
    73      * @psalm-var array<string, string>
     75     * @var list<string>
    7476     */
    7577    private $fallbackDirsPsr0 = array();
     
    7981
    8082    /**
    81      * @var string[]
    82      * @psalm-var array<string, string>
     83     * @var array<string, string>
    8384     */
    8485    private $classMap = array();
     
    8889
    8990    /**
    90      * @var bool[]
    91      * @psalm-var array<string, bool>
     91     * @var array<string, bool>
    9292     */
    9393    private $missingClasses = array();
    9494
    95     /** @var ?string */
     95    /** @var string|null */
    9696    private $apcuPrefix;
    9797
    9898    /**
    99      * @var self[]
     99     * @var array<string, self>
    100100     */
    101101    private static $registeredLoaders = array();
    102102
    103103    /**
    104      * @param ?string $vendorDir
     104     * @param string|null $vendorDir
    105105     */
    106106    public function __construct($vendorDir = null)
    107107    {
    108108        $this->vendorDir = $vendorDir;
    109     }
    110 
    111     /**
    112      * @return string[]
     109        self::initializeIncludeClosure();
     110    }
     111
     112    /**
     113     * @return array<string, list<string>>
    113114     */
    114115    public function getPrefixes()
     
    122123
    123124    /**
    124      * @return array[]
    125      * @psalm-return array<string, array<int, string>>
     125     * @return array<string, list<string>>
    126126     */
    127127    public function getPrefixesPsr4()
     
    131131
    132132    /**
    133      * @return array[]
    134      * @psalm-return array<string, string>
     133     * @return list<string>
    135134     */
    136135    public function getFallbackDirs()
     
    140139
    141140    /**
    142      * @return array[]
    143      * @psalm-return array<string, string>
     141     * @return list<string>
    144142     */
    145143    public function getFallbackDirsPsr4()
     
    149147
    150148    /**
    151      * @return string[] Array of classname => path
    152      * @psalm-return array<string, string>
     149     * @return array<string, string> Array of classname => path
    153150     */
    154151    public function getClassMap()
     
    158155
    159156    /**
    160      * @param string[] $classMap Class to filename map
    161      * @psalm-param array<string, string> $classMap
     157     * @param array<string, string> $classMap Class to filename map
    162158     *
    163159     * @return void
     
    176172     * appending or prepending to the ones previously set for this prefix.
    177173     *
    178      * @param string          $prefix  The prefix
    179      * @param string[]|string $paths   The PSR-0 root directories
    180      * @param bool            $prepend Whether to prepend the directories
     174     * @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
    181177     *
    182178     * @return void
     
    184180    public function add($prefix, $paths, $prepend = false)
    185181    {
     182        $paths = (array) $paths;
    186183        if (!$prefix) {
    187184            if ($prepend) {
    188185                $this->fallbackDirsPsr0 = array_merge(
    189                     (array) $paths,
     186                    $paths,
    190187                    $this->fallbackDirsPsr0
    191188                );
     
    193190                $this->fallbackDirsPsr0 = array_merge(
    194191                    $this->fallbackDirsPsr0,
    195                     (array) $paths
     192                    $paths
    196193                );
    197194            }
     
    202199        $first = $prefix[0];
    203200        if (!isset($this->prefixesPsr0[$first][$prefix])) {
    204             $this->prefixesPsr0[$first][$prefix] = (array) $paths;
     201            $this->prefixesPsr0[$first][$prefix] = $paths;
    205202
    206203            return;
     
    208205        if ($prepend) {
    209206            $this->prefixesPsr0[$first][$prefix] = array_merge(
    210                 (array) $paths,
     207                $paths,
    211208                $this->prefixesPsr0[$first][$prefix]
    212209            );
     
    214211            $this->prefixesPsr0[$first][$prefix] = array_merge(
    215212                $this->prefixesPsr0[$first][$prefix],
    216                 (array) $paths
     213                $paths
    217214            );
    218215        }
     
    223220     * appending or prepending to the ones previously set for this namespace.
    224221     *
    225      * @param string          $prefix  The prefix/namespace, with trailing '\\'
    226      * @param string[]|string $paths   The PSR-4 base directories
    227      * @param bool            $prepend Whether to prepend the directories
     222     * @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
    228225     *
    229226     * @throws \InvalidArgumentException
     
    233230    public function addPsr4($prefix, $paths, $prepend = false)
    234231    {
     232        $paths = (array) $paths;
    235233        if (!$prefix) {
    236234            // Register directories for the root namespace.
    237235            if ($prepend) {
    238236                $this->fallbackDirsPsr4 = array_merge(
    239                     (array) $paths,
     237                    $paths,
    240238                    $this->fallbackDirsPsr4
    241239                );
     
    243241                $this->fallbackDirsPsr4 = array_merge(
    244242                    $this->fallbackDirsPsr4,
    245                     (array) $paths
     243                    $paths
    246244                );
    247245            }
     
    253251            }
    254252            $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
    255             $this->prefixDirsPsr4[$prefix] = (array) $paths;
     253            $this->prefixDirsPsr4[$prefix] = $paths;
    256254        } elseif ($prepend) {
    257255            // Prepend directories for an already registered namespace.
    258256            $this->prefixDirsPsr4[$prefix] = array_merge(
    259                 (array) $paths,
     257                $paths,
    260258                $this->prefixDirsPsr4[$prefix]
    261259            );
     
    264262            $this->prefixDirsPsr4[$prefix] = array_merge(
    265263                $this->prefixDirsPsr4[$prefix],
    266                 (array) $paths
     264                $paths
    267265            );
    268266        }
     
    273271     * replacing any others previously set for this prefix.
    274272     *
    275      * @param string          $prefix The prefix
    276      * @param string[]|string $paths  The PSR-0 base directories
     273     * @param string              $prefix The prefix
     274     * @param list<string>|string $paths  The PSR-0 base directories
    277275     *
    278276     * @return void
     
    291289     * replacing any others previously set for this namespace.
    292290     *
    293      * @param string          $prefix The prefix/namespace, with trailing '\\'
    294      * @param string[]|string $paths  The PSR-4 base directories
     291     * @param string              $prefix The prefix/namespace, with trailing '\\'
     292     * @param list<string>|string $paths  The PSR-4 base directories
    295293     *
    296294     * @throws \InvalidArgumentException
     
    426424    {
    427425        if ($file = $this->findFile($class)) {
    428             includeFile($file);
     426            $includeFile = self::$includeFile;
     427            $includeFile($file);
    429428
    430429            return true;
     
    477476
    478477    /**
    479      * Returns the currently registered loaders indexed by their corresponding vendor directories.
    480      *
    481      * @return self[]
     478     * Returns the currently registered loaders keyed by their corresponding vendor directories.
     479     *
     480     * @return array<string, self>
    482481     */
    483482    public static function getRegisteredLoaders()
     
    556555        return false;
    557556    }
     557
     558    /**
     559     * @return void
     560     */
     561    private static function initializeIncludeClosure()
     562    {
     563        if (self::$includeFile !== null) {
     564            return;
     565        }
     566
     567        /**
     568         * Scope isolated include.
     569         *
     570         * Prevents access to $this/self from included files.
     571         *
     572         * @param  string $file
     573         * @return void
     574         */
     575        self::$includeFile = \Closure::bind(static function($file) {
     576            include $file;
     577        }, null, null);
     578    }
    558579}
    559 
    560 /**
    561  * Scope isolated include.
    562  *
    563  * Prevents access to $this/self from included files.
    564  *
    565  * @param  string $file
    566  * @return void
    567  * @private
    568  */
    569 function includeFile($file)
    570 {
    571     include $file;
    572 }
  • acf-rrule-field/tags/1.3.4/vendor/composer/InstalledVersions.php

    r2990646 r2997541  
    9999        foreach (self::getInstalled() as $installed) {
    100100            if (isset($installed['versions'][$packageName])) {
    101                 return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
     101                return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false;
    102102            }
    103103        }
     
    120120    public static function satisfies(VersionParser $parser, $packageName, $constraint)
    121121    {
    122         $constraint = $parser->parseConstraints($constraint);
     122        $constraint = $parser->parseConstraints((string) $constraint);
    123123        $provided = $parser->parseConstraints(self::getVersionRanges($packageName));
    124124
     
    329329                    $installed[] = self::$installedByVendor[$vendorDir];
    330330                } elseif (is_file($vendorDir.'/composer/installed.php')) {
    331                     $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
     331                    /** @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                    $required = require $vendorDir.'/composer/installed.php';
     333                    $installed[] = self::$installedByVendor[$vendorDir] = $required;
    332334                    if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
    333335                        self::$installed = $installed[count($installed) - 1];
     
    341343            // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
    342344            if (substr(__DIR__, -8, 1) !== 'C') {
    343                 self::$installed = require __DIR__ . '/installed.php';
     345                /** @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 */
     346                $required = require __DIR__ . '/installed.php';
     347                self::$installed = $required;
    344348            } else {
    345349                self::$installed = array();
    346350            }
    347351        }
    348         $installed[] = self::$installed;
     352
     353        if (self::$installed !== array()) {
     354            $installed[] = self::$installed;
     355        }
    349356
    350357        return $installed;
  • acf-rrule-field/tags/1.3.4/vendor/composer/autoload_real.php

    r2990646 r2997541  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInitc35fcbe54628f3a3a961b0147fa06c59
     5class ComposerAutoloaderInitd9457430dc7c2728674532aead9f08e1
    66{
    77    private static $loader;
     
    2525        require __DIR__ . '/platform_check.php';
    2626
    27         spl_autoload_register(array('ComposerAutoloaderInitc35fcbe54628f3a3a961b0147fa06c59', 'loadClassLoader'), true, true);
     27        spl_autoload_register(array('ComposerAutoloaderInitd9457430dc7c2728674532aead9f08e1', 'loadClassLoader'), true, true);
    2828        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
    29         spl_autoload_unregister(array('ComposerAutoloaderInitc35fcbe54628f3a3a961b0147fa06c59', 'loadClassLoader'));
     29        spl_autoload_unregister(array('ComposerAutoloaderInitd9457430dc7c2728674532aead9f08e1', 'loadClassLoader'));
    3030
    3131        require __DIR__ . '/autoload_static.php';
    32         call_user_func(\Composer\Autoload\ComposerStaticInitc35fcbe54628f3a3a961b0147fa06c59::getInitializer($loader));
     32        call_user_func(\Composer\Autoload\ComposerStaticInitd9457430dc7c2728674532aead9f08e1::getInitializer($loader));
    3333
    3434        $loader->register(true);
  • acf-rrule-field/tags/1.3.4/vendor/composer/autoload_static.php

    r2990646 r2997541  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInitc35fcbe54628f3a3a961b0147fa06c59
     7class ComposerStaticInitd9457430dc7c2728674532aead9f08e1
    88{
    99    public static $prefixLengthsPsr4 = array (
     
    4949    {
    5050        return \Closure::bind(function () use ($loader) {
    51             $loader->prefixLengthsPsr4 = ComposerStaticInitc35fcbe54628f3a3a961b0147fa06c59::$prefixLengthsPsr4;
    52             $loader->prefixDirsPsr4 = ComposerStaticInitc35fcbe54628f3a3a961b0147fa06c59::$prefixDirsPsr4;
    53             $loader->classMap = ComposerStaticInitc35fcbe54628f3a3a961b0147fa06c59::$classMap;
     51            $loader->prefixLengthsPsr4 = ComposerStaticInitd9457430dc7c2728674532aead9f08e1::$prefixLengthsPsr4;
     52            $loader->prefixDirsPsr4 = ComposerStaticInitd9457430dc7c2728674532aead9f08e1::$prefixDirsPsr4;
     53            $loader->classMap = ComposerStaticInitd9457430dc7c2728674532aead9f08e1::$classMap;
    5454
    5555        }, null, ClassLoader::class);
  • acf-rrule-field/tags/1.3.4/vendor/composer/installed.php

    r2990646 r2997541  
    22    'root' => array(
    33        'name' => 'marcbelletre/acf-rrule',
    4         'pretty_version' => '1.0.0+no-version-set',
    5         'version' => '1.0.0.0',
    6         'reference' => NULL,
     4        'pretty_version' => 'dev-master',
     5        'version' => 'dev-master',
     6        'reference' => '4105705fd6a696b6d908ecea7bc802db7f1f0ca6',
    77        'type' => 'wordpress-plugin',
    88        'install_path' => __DIR__ . '/../../',
     
    3939        ),
    4040        'marcbelletre/acf-rrule' => array(
    41             'pretty_version' => '1.0.0+no-version-set',
    42             'version' => '1.0.0.0',
    43             'reference' => NULL,
     41            'pretty_version' => 'dev-master',
     42            'version' => 'dev-master',
     43            'reference' => '4105705fd6a696b6d908ecea7bc802db7f1f0ca6',
    4444            'type' => 'wordpress-plugin',
    4545            'install_path' => __DIR__ . '/../../',
  • acf-rrule-field/trunk/acf-rrule.php

    r2990646 r2997541  
    55Plugin URI: https://github.com/marcbelletre/acf-rrule
    66Description: Create recurring rules with a single ACF field
    7 Version: 1.3.3
     7Version: 1.3.4
    88Author: Marc Bellêtre
    99Author URI: https://pixelparfait.fr
     
    4545            // - these will be passed into the field class.
    4646            $this->settings = [
    47                 'version'   => '1.3.3',
     47                'version'   => '1.3.4',
    4848                'url'       => plugin_dir_url(__FILE__),
    4949                'path'      => plugin_dir_path(__FILE__),
  • acf-rrule-field/trunk/fields/class-acf-field-rrule.php

    r2990646 r2997541  
    706706                    $rule->setTimezone($timezoneString);
    707707
     708                    /**
     709                     * Ensure DTEND is reset if UNTIL exists.
     710                     *
     711                     * @see https://github.com/marcbelletre/acf-rrule/issues/23
     712                     */
     713                    if ($rule->getEndDate() == $rule->getUntil()) {
     714                        $rule->setEndDate(null);
     715                    }
     716
    708717                    $start_date = $rule->getStartDate();
    709718
    710                     $new_value['rrule'] = $value;
     719                    $new_value['rrule'] = $rule->getString();
    711720                    $new_value['start_date'] = $start_date ? $start_date->format('Ymd') : null;
    712721                    $new_value['start_time'] = $start_date ? $start_date->format('H:i:s') : null;
     
    741750                    }
    742751
    743                     if ($rule->getUntil()) {
    744                         $end_date = $rule->getEndDate() ?: $rule->getUntil();
     752                    if ($rule->getUntil() || $rule->getEndDate()) {
     753                        $end_date = $rule->getUntil() ?: $rule->getEndDate();
    745754
    746755                        $new_value['end_type'] = 'date';
     
    866875
    867876                            $rule->setUntil($end_date);
    868                             $rule->setEndDate($end_date);
    869877                        }
    870878
  • acf-rrule-field/trunk/readme.txt

    r2990646 r2997541  
    55Tested up to: 6.3
    66Requires PHP: 7.2
    7 Stable tag: 1.3.3
     7Stable tag: 1.3.4
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3131
    3232== Changelog ==
     33
     34= 1.3.4 =
     35* Remove DTEND attribute from RRULE string. This fixes a compatibility issue with rrule.js package.
    3336
    3437= 1.3.3 =
  • acf-rrule-field/trunk/vendor/autoload.php

    r2990646 r2997541  
    2323require_once __DIR__ . '/composer/autoload_real.php';
    2424
    25 return ComposerAutoloaderInitc35fcbe54628f3a3a961b0147fa06c59::getLoader();
     25return ComposerAutoloaderInitd9457430dc7c2728674532aead9f08e1::getLoader();
  • acf-rrule-field/trunk/vendor/composer/ClassLoader.php

    r2990646 r2997541  
    4343class ClassLoader
    4444{
    45     /** @var ?string */
     45    /** @var \Closure(string):void */
     46    private static $includeFile;
     47
     48    /** @var string|null */
    4649    private $vendorDir;
    4750
    4851    // PSR-4
    4952    /**
    50      * @var array[]
    51      * @psalm-var array<string, array<string, int>>
     53     * @var array<string, array<string, int>>
    5254     */
    5355    private $prefixLengthsPsr4 = array();
    5456    /**
    55      * @var array[]
    56      * @psalm-var array<string, array<int, string>>
     57     * @var array<string, list<string>>
    5758     */
    5859    private $prefixDirsPsr4 = array();
    5960    /**
    60      * @var array[]
    61      * @psalm-var array<string, string>
     61     * @var list<string>
    6262     */
    6363    private $fallbackDirsPsr4 = array();
     
    6565    // PSR-0
    6666    /**
    67      * @var array[]
    68      * @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>>>
    6972     */
    7073    private $prefixesPsr0 = array();
    7174    /**
    72      * @var array[]
    73      * @psalm-var array<string, string>
     75     * @var list<string>
    7476     */
    7577    private $fallbackDirsPsr0 = array();
     
    7981
    8082    /**
    81      * @var string[]
    82      * @psalm-var array<string, string>
     83     * @var array<string, string>
    8384     */
    8485    private $classMap = array();
     
    8889
    8990    /**
    90      * @var bool[]
    91      * @psalm-var array<string, bool>
     91     * @var array<string, bool>
    9292     */
    9393    private $missingClasses = array();
    9494
    95     /** @var ?string */
     95    /** @var string|null */
    9696    private $apcuPrefix;
    9797
    9898    /**
    99      * @var self[]
     99     * @var array<string, self>
    100100     */
    101101    private static $registeredLoaders = array();
    102102
    103103    /**
    104      * @param ?string $vendorDir
     104     * @param string|null $vendorDir
    105105     */
    106106    public function __construct($vendorDir = null)
    107107    {
    108108        $this->vendorDir = $vendorDir;
    109     }
    110 
    111     /**
    112      * @return string[]
     109        self::initializeIncludeClosure();
     110    }
     111
     112    /**
     113     * @return array<string, list<string>>
    113114     */
    114115    public function getPrefixes()
     
    122123
    123124    /**
    124      * @return array[]
    125      * @psalm-return array<string, array<int, string>>
     125     * @return array<string, list<string>>
    126126     */
    127127    public function getPrefixesPsr4()
     
    131131
    132132    /**
    133      * @return array[]
    134      * @psalm-return array<string, string>
     133     * @return list<string>
    135134     */
    136135    public function getFallbackDirs()
     
    140139
    141140    /**
    142      * @return array[]
    143      * @psalm-return array<string, string>
     141     * @return list<string>
    144142     */
    145143    public function getFallbackDirsPsr4()
     
    149147
    150148    /**
    151      * @return string[] Array of classname => path
    152      * @psalm-return array<string, string>
     149     * @return array<string, string> Array of classname => path
    153150     */
    154151    public function getClassMap()
     
    158155
    159156    /**
    160      * @param string[] $classMap Class to filename map
    161      * @psalm-param array<string, string> $classMap
     157     * @param array<string, string> $classMap Class to filename map
    162158     *
    163159     * @return void
     
    176172     * appending or prepending to the ones previously set for this prefix.
    177173     *
    178      * @param string          $prefix  The prefix
    179      * @param string[]|string $paths   The PSR-0 root directories
    180      * @param bool            $prepend Whether to prepend the directories
     174     * @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
    181177     *
    182178     * @return void
     
    184180    public function add($prefix, $paths, $prepend = false)
    185181    {
     182        $paths = (array) $paths;
    186183        if (!$prefix) {
    187184            if ($prepend) {
    188185                $this->fallbackDirsPsr0 = array_merge(
    189                     (array) $paths,
     186                    $paths,
    190187                    $this->fallbackDirsPsr0
    191188                );
     
    193190                $this->fallbackDirsPsr0 = array_merge(
    194191                    $this->fallbackDirsPsr0,
    195                     (array) $paths
     192                    $paths
    196193                );
    197194            }
     
    202199        $first = $prefix[0];
    203200        if (!isset($this->prefixesPsr0[$first][$prefix])) {
    204             $this->prefixesPsr0[$first][$prefix] = (array) $paths;
     201            $this->prefixesPsr0[$first][$prefix] = $paths;
    205202
    206203            return;
     
    208205        if ($prepend) {
    209206            $this->prefixesPsr0[$first][$prefix] = array_merge(
    210                 (array) $paths,
     207                $paths,
    211208                $this->prefixesPsr0[$first][$prefix]
    212209            );
     
    214211            $this->prefixesPsr0[$first][$prefix] = array_merge(
    215212                $this->prefixesPsr0[$first][$prefix],
    216                 (array) $paths
     213                $paths
    217214            );
    218215        }
     
    223220     * appending or prepending to the ones previously set for this namespace.
    224221     *
    225      * @param string          $prefix  The prefix/namespace, with trailing '\\'
    226      * @param string[]|string $paths   The PSR-4 base directories
    227      * @param bool            $prepend Whether to prepend the directories
     222     * @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
    228225     *
    229226     * @throws \InvalidArgumentException
     
    233230    public function addPsr4($prefix, $paths, $prepend = false)
    234231    {
     232        $paths = (array) $paths;
    235233        if (!$prefix) {
    236234            // Register directories for the root namespace.
    237235            if ($prepend) {
    238236                $this->fallbackDirsPsr4 = array_merge(
    239                     (array) $paths,
     237                    $paths,
    240238                    $this->fallbackDirsPsr4
    241239                );
     
    243241                $this->fallbackDirsPsr4 = array_merge(
    244242                    $this->fallbackDirsPsr4,
    245                     (array) $paths
     243                    $paths
    246244                );
    247245            }
     
    253251            }
    254252            $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
    255             $this->prefixDirsPsr4[$prefix] = (array) $paths;
     253            $this->prefixDirsPsr4[$prefix] = $paths;
    256254        } elseif ($prepend) {
    257255            // Prepend directories for an already registered namespace.
    258256            $this->prefixDirsPsr4[$prefix] = array_merge(
    259                 (array) $paths,
     257                $paths,
    260258                $this->prefixDirsPsr4[$prefix]
    261259            );
     
    264262            $this->prefixDirsPsr4[$prefix] = array_merge(
    265263                $this->prefixDirsPsr4[$prefix],
    266                 (array) $paths
     264                $paths
    267265            );
    268266        }
     
    273271     * replacing any others previously set for this prefix.
    274272     *
    275      * @param string          $prefix The prefix
    276      * @param string[]|string $paths  The PSR-0 base directories
     273     * @param string              $prefix The prefix
     274     * @param list<string>|string $paths  The PSR-0 base directories
    277275     *
    278276     * @return void
     
    291289     * replacing any others previously set for this namespace.
    292290     *
    293      * @param string          $prefix The prefix/namespace, with trailing '\\'
    294      * @param string[]|string $paths  The PSR-4 base directories
     291     * @param string              $prefix The prefix/namespace, with trailing '\\'
     292     * @param list<string>|string $paths  The PSR-4 base directories
    295293     *
    296294     * @throws \InvalidArgumentException
     
    426424    {
    427425        if ($file = $this->findFile($class)) {
    428             includeFile($file);
     426            $includeFile = self::$includeFile;
     427            $includeFile($file);
    429428
    430429            return true;
     
    477476
    478477    /**
    479      * Returns the currently registered loaders indexed by their corresponding vendor directories.
    480      *
    481      * @return self[]
     478     * Returns the currently registered loaders keyed by their corresponding vendor directories.
     479     *
     480     * @return array<string, self>
    482481     */
    483482    public static function getRegisteredLoaders()
     
    556555        return false;
    557556    }
     557
     558    /**
     559     * @return void
     560     */
     561    private static function initializeIncludeClosure()
     562    {
     563        if (self::$includeFile !== null) {
     564            return;
     565        }
     566
     567        /**
     568         * Scope isolated include.
     569         *
     570         * Prevents access to $this/self from included files.
     571         *
     572         * @param  string $file
     573         * @return void
     574         */
     575        self::$includeFile = \Closure::bind(static function($file) {
     576            include $file;
     577        }, null, null);
     578    }
    558579}
    559 
    560 /**
    561  * Scope isolated include.
    562  *
    563  * Prevents access to $this/self from included files.
    564  *
    565  * @param  string $file
    566  * @return void
    567  * @private
    568  */
    569 function includeFile($file)
    570 {
    571     include $file;
    572 }
  • acf-rrule-field/trunk/vendor/composer/InstalledVersions.php

    r2990646 r2997541  
    9999        foreach (self::getInstalled() as $installed) {
    100100            if (isset($installed['versions'][$packageName])) {
    101                 return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
     101                return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false;
    102102            }
    103103        }
     
    120120    public static function satisfies(VersionParser $parser, $packageName, $constraint)
    121121    {
    122         $constraint = $parser->parseConstraints($constraint);
     122        $constraint = $parser->parseConstraints((string) $constraint);
    123123        $provided = $parser->parseConstraints(self::getVersionRanges($packageName));
    124124
     
    329329                    $installed[] = self::$installedByVendor[$vendorDir];
    330330                } elseif (is_file($vendorDir.'/composer/installed.php')) {
    331                     $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
     331                    /** @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                    $required = require $vendorDir.'/composer/installed.php';
     333                    $installed[] = self::$installedByVendor[$vendorDir] = $required;
    332334                    if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
    333335                        self::$installed = $installed[count($installed) - 1];
     
    341343            // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
    342344            if (substr(__DIR__, -8, 1) !== 'C') {
    343                 self::$installed = require __DIR__ . '/installed.php';
     345                /** @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 */
     346                $required = require __DIR__ . '/installed.php';
     347                self::$installed = $required;
    344348            } else {
    345349                self::$installed = array();
    346350            }
    347351        }
    348         $installed[] = self::$installed;
     352
     353        if (self::$installed !== array()) {
     354            $installed[] = self::$installed;
     355        }
    349356
    350357        return $installed;
  • acf-rrule-field/trunk/vendor/composer/autoload_real.php

    r2990646 r2997541  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInitc35fcbe54628f3a3a961b0147fa06c59
     5class ComposerAutoloaderInitd9457430dc7c2728674532aead9f08e1
    66{
    77    private static $loader;
     
    2525        require __DIR__ . '/platform_check.php';
    2626
    27         spl_autoload_register(array('ComposerAutoloaderInitc35fcbe54628f3a3a961b0147fa06c59', 'loadClassLoader'), true, true);
     27        spl_autoload_register(array('ComposerAutoloaderInitd9457430dc7c2728674532aead9f08e1', 'loadClassLoader'), true, true);
    2828        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
    29         spl_autoload_unregister(array('ComposerAutoloaderInitc35fcbe54628f3a3a961b0147fa06c59', 'loadClassLoader'));
     29        spl_autoload_unregister(array('ComposerAutoloaderInitd9457430dc7c2728674532aead9f08e1', 'loadClassLoader'));
    3030
    3131        require __DIR__ . '/autoload_static.php';
    32         call_user_func(\Composer\Autoload\ComposerStaticInitc35fcbe54628f3a3a961b0147fa06c59::getInitializer($loader));
     32        call_user_func(\Composer\Autoload\ComposerStaticInitd9457430dc7c2728674532aead9f08e1::getInitializer($loader));
    3333
    3434        $loader->register(true);
  • acf-rrule-field/trunk/vendor/composer/autoload_static.php

    r2990646 r2997541  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInitc35fcbe54628f3a3a961b0147fa06c59
     7class ComposerStaticInitd9457430dc7c2728674532aead9f08e1
    88{
    99    public static $prefixLengthsPsr4 = array (
     
    4949    {
    5050        return \Closure::bind(function () use ($loader) {
    51             $loader->prefixLengthsPsr4 = ComposerStaticInitc35fcbe54628f3a3a961b0147fa06c59::$prefixLengthsPsr4;
    52             $loader->prefixDirsPsr4 = ComposerStaticInitc35fcbe54628f3a3a961b0147fa06c59::$prefixDirsPsr4;
    53             $loader->classMap = ComposerStaticInitc35fcbe54628f3a3a961b0147fa06c59::$classMap;
     51            $loader->prefixLengthsPsr4 = ComposerStaticInitd9457430dc7c2728674532aead9f08e1::$prefixLengthsPsr4;
     52            $loader->prefixDirsPsr4 = ComposerStaticInitd9457430dc7c2728674532aead9f08e1::$prefixDirsPsr4;
     53            $loader->classMap = ComposerStaticInitd9457430dc7c2728674532aead9f08e1::$classMap;
    5454
    5555        }, null, ClassLoader::class);
  • acf-rrule-field/trunk/vendor/composer/installed.php

    r2990646 r2997541  
    22    'root' => array(
    33        'name' => 'marcbelletre/acf-rrule',
    4         'pretty_version' => '1.0.0+no-version-set',
    5         'version' => '1.0.0.0',
    6         'reference' => NULL,
     4        'pretty_version' => 'dev-master',
     5        'version' => 'dev-master',
     6        'reference' => '4105705fd6a696b6d908ecea7bc802db7f1f0ca6',
    77        'type' => 'wordpress-plugin',
    88        'install_path' => __DIR__ . '/../../',
     
    3939        ),
    4040        'marcbelletre/acf-rrule' => array(
    41             'pretty_version' => '1.0.0+no-version-set',
    42             'version' => '1.0.0.0',
    43             'reference' => NULL,
     41            'pretty_version' => 'dev-master',
     42            'version' => 'dev-master',
     43            'reference' => '4105705fd6a696b6d908ecea7bc802db7f1f0ca6',
    4444            'type' => 'wordpress-plugin',
    4545            'install_path' => __DIR__ . '/../../',
Note: See TracChangeset for help on using the changeset viewer.