Plugin Directory

Changeset 3266739


Ignore:
Timestamp:
04/04/2025 06:22:56 AM (12 months ago)
Author:
davexpression
Message:

Update to version 0.1.7 from GitHub

Location:
bookslots-simple-booking-form
Files:
16 edited
1 copied

Legend:

Unmodified
Added
Removed
  • bookslots-simple-booking-form/tags/0.1.7/README.txt

    r2831518 r3266739  
    55Requires at least: 5.0
    66Tested up to: 6.1
    7 Stable tag: 0.1.6
     7Stable tag: 0.1.7
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    131131== Changelog ==
    132132
     133= 0.1.7 =
     134Added more code comments
     135
    133136= 0.1.0 =
    134137Initial release.
  • bookslots-simple-booking-form/tags/0.1.7/app/Employee.php

    r2746526 r3266739  
    425425    }
    426426
     427    /**
     428     * Returns the user object
     429     *
     430     * @return \WP_User
     431     */
    427432    public function user() {
    428433        return new \WP_User( $this->user_id );
  • bookslots-simple-booking-form/tags/0.1.7/bookslots.php

    r2831518 r3266739  
    1111 * Plugin URI:        https://pluginette.com/product/bookslots/
    1212 * Description:       A simple yet powerful stand-alone booking form for bookings, appointments and reservations.
    13  * Version:           0.1.6
     13 * Version:           0.1.7
    1414 * Author:            David Towoju
    1515 * Author URI:        https://github.com/davidtowoju
     
    3030 * Rename this for your plugin and update it as you release new versions.
    3131 */
    32 define( 'BOOKSLOTS_VERSION', '0.1.6' );
     32define( 'BOOKSLOTS_VERSION', '0.1.7' );
    3333define( 'BOOKSLOTS_DIR_PATH', plugin_dir_path( __FILE__ ) );
    3434define( 'BOOKSLOTS_DIR_URL', plugin_dir_url( __FILE__ ) );
  • bookslots-simple-booking-form/tags/0.1.7/vendor/bin/carbon

    r2746526 r3266739  
    113113        || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper'))
    114114    ) {
    115         include("phpvfscomposer://" . __DIR__ . '/..'.'/nesbot/carbon/bin/carbon');
    116         exit(0);
     115        return include("phpvfscomposer://" . __DIR__ . '/..'.'/nesbot/carbon/bin/carbon');
    117116    }
    118117}
    119118
    120 include __DIR__ . '/..'.'/nesbot/carbon/bin/carbon';
     119return include __DIR__ . '/..'.'/nesbot/carbon/bin/carbon';
  • bookslots-simple-booking-form/tags/0.1.7/vendor/composer/ClassLoader.php

    r2746526 r3266739  
    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 }
  • bookslots-simple-booking-form/tags/0.1.7/vendor/composer/InstalledVersions.php

    r2746526 r3266739  
    3434
    3535    /**
     36     * @var bool
     37     */
     38    private static $installedIsLocalDir;
     39
     40    /**
    3641     * @var bool|null
    3742     */
     
    99104        foreach (self::getInstalled() as $installed) {
    100105            if (isset($installed['versions'][$packageName])) {
    101                 return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
     106                return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false;
    102107            }
    103108        }
     
    120125    public static function satisfies(VersionParser $parser, $packageName, $constraint)
    121126    {
    122         $constraint = $parser->parseConstraints($constraint);
     127        $constraint = $parser->parseConstraints((string) $constraint);
    123128        $provided = $parser->parseConstraints(self::getVersionRanges($packageName));
    124129
     
    310315        self::$installed = $data;
    311316        self::$installedByVendor = array();
     317
     318        // when using reload, we disable the duplicate protection to ensure that self::$installed data is
     319        // always returned, but we cannot know whether it comes from the installed.php in __DIR__ or not,
     320        // so we have to assume it does not, and that may result in duplicate data being returned when listing
     321        // all installed packages for example
     322        self::$installedIsLocalDir = false;
    312323    }
    313324
     
    323334
    324335        $installed = array();
     336        $copiedLocalDir = false;
    325337
    326338        if (self::$canGetVendors) {
     339            $selfDir = strtr(__DIR__, '\\', '/');
    327340            foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
     341                $vendorDir = strtr($vendorDir, '\\', '/');
    328342                if (isset(self::$installedByVendor[$vendorDir])) {
    329343                    $installed[] = self::$installedByVendor[$vendorDir];
    330344                } elseif (is_file($vendorDir.'/composer/installed.php')) {
    331                     $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
    332                     if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
    333                         self::$installed = $installed[count($installed) - 1];
     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 $vendorDir.'/composer/installed.php';
     347                    self::$installedByVendor[$vendorDir] = $required;
     348                    $installed[] = $required;
     349                    if (self::$installed === null && $vendorDir.'/composer' === $selfDir) {
     350                        self::$installed = $required;
     351                        self::$installedIsLocalDir = true;
    334352                    }
     353                }
     354                if (self::$installedIsLocalDir && $vendorDir.'/composer' === $selfDir) {
     355                    $copiedLocalDir = true;
    335356                }
    336357            }
     
    341362            // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
    342363            if (substr(__DIR__, -8, 1) !== 'C') {
    343                 self::$installed = require __DIR__ . '/installed.php';
     364                /** @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 */
     365                $required = require __DIR__ . '/installed.php';
     366                self::$installed = $required;
    344367            } else {
    345368                self::$installed = array();
    346369            }
    347370        }
    348         $installed[] = self::$installed;
     371
     372        if (self::$installed !== array() && !$copiedLocalDir) {
     373            $installed[] = self::$installed;
     374        }
    349375
    350376        return $installed;
  • bookslots-simple-booking-form/tags/0.1.7/vendor/composer/autoload_real.php

    r2746583 r3266739  
    3434        $loader->register(true);
    3535
    36         $includeFiles = \Composer\Autoload\ComposerStaticInit55e53fb44bd5bfb932d8da65cec955e4::$files;
    37         foreach ($includeFiles as $fileIdentifier => $file) {
    38             composerRequire55e53fb44bd5bfb932d8da65cec955e4($fileIdentifier, $file);
     36        $filesToLoad = \Composer\Autoload\ComposerStaticInit55e53fb44bd5bfb932d8da65cec955e4::$files;
     37        $requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
     38            if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
     39                $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
     40
     41                require $file;
     42            }
     43        }, null, null);
     44        foreach ($filesToLoad as $fileIdentifier => $file) {
     45            $requireFile($fileIdentifier, $file);
    3946        }
    4047
     
    4249    }
    4350}
    44 
    45 /**
    46  * @param string $fileIdentifier
    47  * @param string $file
    48  * @return void
    49  */
    50 function composerRequire55e53fb44bd5bfb932d8da65cec955e4($fileIdentifier, $file)
    51 {
    52     if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
    53         $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
    54 
    55         require $file;
    56     }
    57 }
  • bookslots-simple-booking-form/tags/0.1.7/vendor/composer/installed.php

    r2831518 r3266739  
    22    'root' => array(
    33        'name' => 'figarts/bookslot',
    4         'pretty_version' => '0.1.6',
    5         'version' => '0.1.6.0',
    6         'reference' => '6ee097ec8134941451f64cc0e13c8d4efee031fd',
     4        'pretty_version' => '0.1.7',
     5        'version' => '0.1.7.0',
     6        'reference' => '7bd3b82b3cac619aea33282d230d063ef18101e7',
    77        'type' => 'wordpress-plugins',
    88        'install_path' => __DIR__ . '/../../',
     
    2121        ),
    2222        'figarts/bookslot' => array(
    23             'pretty_version' => '0.1.6',
    24             'version' => '0.1.6.0',
    25             'reference' => '6ee097ec8134941451f64cc0e13c8d4efee031fd',
     23            'pretty_version' => '0.1.7',
     24            'version' => '0.1.7.0',
     25            'reference' => '7bd3b82b3cac619aea33282d230d063ef18101e7',
    2626            'type' => 'wordpress-plugins',
    2727            'install_path' => __DIR__ . '/../../',
  • bookslots-simple-booking-form/trunk/README.txt

    r2831518 r3266739  
    55Requires at least: 5.0
    66Tested up to: 6.1
    7 Stable tag: 0.1.6
     7Stable tag: 0.1.7
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    131131== Changelog ==
    132132
     133= 0.1.7 =
     134Added more code comments
     135
    133136= 0.1.0 =
    134137Initial release.
  • bookslots-simple-booking-form/trunk/app/Employee.php

    r2746526 r3266739  
    425425    }
    426426
     427    /**
     428     * Returns the user object
     429     *
     430     * @return \WP_User
     431     */
    427432    public function user() {
    428433        return new \WP_User( $this->user_id );
  • bookslots-simple-booking-form/trunk/bookslots.php

    r2831518 r3266739  
    1111 * Plugin URI:        https://pluginette.com/product/bookslots/
    1212 * Description:       A simple yet powerful stand-alone booking form for bookings, appointments and reservations.
    13  * Version:           0.1.6
     13 * Version:           0.1.7
    1414 * Author:            David Towoju
    1515 * Author URI:        https://github.com/davidtowoju
     
    3030 * Rename this for your plugin and update it as you release new versions.
    3131 */
    32 define( 'BOOKSLOTS_VERSION', '0.1.6' );
     32define( 'BOOKSLOTS_VERSION', '0.1.7' );
    3333define( 'BOOKSLOTS_DIR_PATH', plugin_dir_path( __FILE__ ) );
    3434define( 'BOOKSLOTS_DIR_URL', plugin_dir_url( __FILE__ ) );
  • bookslots-simple-booking-form/trunk/vendor/bin/carbon

    r2746526 r3266739  
    113113        || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper'))
    114114    ) {
    115         include("phpvfscomposer://" . __DIR__ . '/..'.'/nesbot/carbon/bin/carbon');
    116         exit(0);
     115        return include("phpvfscomposer://" . __DIR__ . '/..'.'/nesbot/carbon/bin/carbon');
    117116    }
    118117}
    119118
    120 include __DIR__ . '/..'.'/nesbot/carbon/bin/carbon';
     119return include __DIR__ . '/..'.'/nesbot/carbon/bin/carbon';
  • bookslots-simple-booking-form/trunk/vendor/composer/ClassLoader.php

    r2746526 r3266739  
    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 }
  • bookslots-simple-booking-form/trunk/vendor/composer/InstalledVersions.php

    r2746526 r3266739  
    3434
    3535    /**
     36     * @var bool
     37     */
     38    private static $installedIsLocalDir;
     39
     40    /**
    3641     * @var bool|null
    3742     */
     
    99104        foreach (self::getInstalled() as $installed) {
    100105            if (isset($installed['versions'][$packageName])) {
    101                 return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
     106                return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false;
    102107            }
    103108        }
     
    120125    public static function satisfies(VersionParser $parser, $packageName, $constraint)
    121126    {
    122         $constraint = $parser->parseConstraints($constraint);
     127        $constraint = $parser->parseConstraints((string) $constraint);
    123128        $provided = $parser->parseConstraints(self::getVersionRanges($packageName));
    124129
     
    310315        self::$installed = $data;
    311316        self::$installedByVendor = array();
     317
     318        // when using reload, we disable the duplicate protection to ensure that self::$installed data is
     319        // always returned, but we cannot know whether it comes from the installed.php in __DIR__ or not,
     320        // so we have to assume it does not, and that may result in duplicate data being returned when listing
     321        // all installed packages for example
     322        self::$installedIsLocalDir = false;
    312323    }
    313324
     
    323334
    324335        $installed = array();
     336        $copiedLocalDir = false;
    325337
    326338        if (self::$canGetVendors) {
     339            $selfDir = strtr(__DIR__, '\\', '/');
    327340            foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
     341                $vendorDir = strtr($vendorDir, '\\', '/');
    328342                if (isset(self::$installedByVendor[$vendorDir])) {
    329343                    $installed[] = self::$installedByVendor[$vendorDir];
    330344                } elseif (is_file($vendorDir.'/composer/installed.php')) {
    331                     $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
    332                     if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
    333                         self::$installed = $installed[count($installed) - 1];
     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 $vendorDir.'/composer/installed.php';
     347                    self::$installedByVendor[$vendorDir] = $required;
     348                    $installed[] = $required;
     349                    if (self::$installed === null && $vendorDir.'/composer' === $selfDir) {
     350                        self::$installed = $required;
     351                        self::$installedIsLocalDir = true;
    334352                    }
     353                }
     354                if (self::$installedIsLocalDir && $vendorDir.'/composer' === $selfDir) {
     355                    $copiedLocalDir = true;
    335356                }
    336357            }
     
    341362            // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
    342363            if (substr(__DIR__, -8, 1) !== 'C') {
    343                 self::$installed = require __DIR__ . '/installed.php';
     364                /** @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 */
     365                $required = require __DIR__ . '/installed.php';
     366                self::$installed = $required;
    344367            } else {
    345368                self::$installed = array();
    346369            }
    347370        }
    348         $installed[] = self::$installed;
     371
     372        if (self::$installed !== array() && !$copiedLocalDir) {
     373            $installed[] = self::$installed;
     374        }
    349375
    350376        return $installed;
  • bookslots-simple-booking-form/trunk/vendor/composer/autoload_real.php

    r2746583 r3266739  
    3434        $loader->register(true);
    3535
    36         $includeFiles = \Composer\Autoload\ComposerStaticInit55e53fb44bd5bfb932d8da65cec955e4::$files;
    37         foreach ($includeFiles as $fileIdentifier => $file) {
    38             composerRequire55e53fb44bd5bfb932d8da65cec955e4($fileIdentifier, $file);
     36        $filesToLoad = \Composer\Autoload\ComposerStaticInit55e53fb44bd5bfb932d8da65cec955e4::$files;
     37        $requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
     38            if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
     39                $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
     40
     41                require $file;
     42            }
     43        }, null, null);
     44        foreach ($filesToLoad as $fileIdentifier => $file) {
     45            $requireFile($fileIdentifier, $file);
    3946        }
    4047
     
    4249    }
    4350}
    44 
    45 /**
    46  * @param string $fileIdentifier
    47  * @param string $file
    48  * @return void
    49  */
    50 function composerRequire55e53fb44bd5bfb932d8da65cec955e4($fileIdentifier, $file)
    51 {
    52     if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
    53         $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
    54 
    55         require $file;
    56     }
    57 }
  • bookslots-simple-booking-form/trunk/vendor/composer/installed.php

    r2831518 r3266739  
    22    'root' => array(
    33        'name' => 'figarts/bookslot',
    4         'pretty_version' => '0.1.6',
    5         'version' => '0.1.6.0',
    6         'reference' => '6ee097ec8134941451f64cc0e13c8d4efee031fd',
     4        'pretty_version' => '0.1.7',
     5        'version' => '0.1.7.0',
     6        'reference' => '7bd3b82b3cac619aea33282d230d063ef18101e7',
    77        'type' => 'wordpress-plugins',
    88        'install_path' => __DIR__ . '/../../',
     
    2121        ),
    2222        'figarts/bookslot' => array(
    23             'pretty_version' => '0.1.6',
    24             'version' => '0.1.6.0',
    25             'reference' => '6ee097ec8134941451f64cc0e13c8d4efee031fd',
     23            'pretty_version' => '0.1.7',
     24            'version' => '0.1.7.0',
     25            'reference' => '7bd3b82b3cac619aea33282d230d063ef18101e7',
    2626            'type' => 'wordpress-plugins',
    2727            'install_path' => __DIR__ . '/../../',
Note: See TracChangeset for help on using the changeset viewer.