Plugin Directory

Changeset 3464705


Ignore:
Timestamp:
02/19/2026 02:42:32 AM (7 weeks ago)
Author:
lionheartgroup
Message:

Update PHP version requirements and enhance plugin documentation

Location:
template-oriented-form-utilities
Files:
28 edited
10 copied

Legend:

Unmodified
Added
Removed
  • template-oriented-form-utilities/tags/0.0.2/readme.txt

    r3464549 r3464705  
    33Tags: forms, utilities, template-oriented
    44Tested up to: 6.9
    5 Requires PHP: 8.2
    6 Stable tag: 0.0.1
     5Requires PHP: 8.1
     6Stable tag: 0.0.2
    77License: GPLv3 or later
    88License URI: https://www.gnu.org/licenses/gpl-3.0.txt
    99
    10 Template-Oriented Form Utilities is a WordPress plugin that provides a set of utilities for handling forms in a template-oriented manner. It simplifies form creation, validation, and processing by leveraging templates for rendering and managing form data.
     10Template-Oriented Form Utilities is a WordPress plugin that simplifies form creation, validation, and processing through template-based rendering and data management.
    1111
    1212== Description ==
    1313
    1414Template-Oriented Form Utilities (TOFU) is designed to streamline the process of creating and managing forms within WordPress themes and plugins. By adopting a template-oriented approach, TOFU allows developers to define form structures and behaviors using reusable templates, making it easier to manage/maintain with team collaboration through version control systems.
     15
     16GitHub and documentation for this plugin can be found at:
     17
     18[https://github.com/lionheart-group/template-oriented-form-utilities](https://github.com/lionheart-group/template-oriented-form-utilities)
    1519
    1620== External services ==
     
    5862
    5963* v0.0.1 - Initial release.
     64* v0.0.2 - Arranged required PHP version to 8.1, added external services section to the readme.
    6065
    6166
  • template-oriented-form-utilities/tags/0.0.2/template-oriented-form-utilities.php

    r3464549 r3464705  
    33/**
    44 * @link https://www.lionheart.co.jp/
     5 * @since 0.0.2 - Changed required PHP version to 8.1
    56 * @since 0.0.1
    67 * @package Tofu
     
    1011 * Plugin URI: https://lionheart-group.github.io/template-oriented-form-utilities/
    1112 * Description: Template-Oriented Form Utilities is a WordPress plugin that provides a set of utilities for handling forms in a template-oriented manner.
    12  * Version: 0.0.1
     13 * Version: 0.0.2
    1314 * Author: lionheartgroup
    1415 * Author URI: https://www.lionheart.co.jp/
     
    2627 * Rename this for your plugin and update it as you release new versions.
    2728 */
    28 \define('TOFU_VERSION', '0.0.1');
     29\define('TOFU_VERSION', '0.0.2');
    2930\define('TOFU_PLUGIN_DIR', \plugin_dir_path(__FILE__));
    3031\define('TOFU_PLUGIN_FILE', __FILE__);
  • template-oriented-form-utilities/tags/0.0.2/vendor/autoload.php

    r3464549 r3464705  
    2020require_once __DIR__ . '/composer/autoload_real.php';
    2121
    22 return ComposerAutoloaderInitdaa68e1af038c1e02203ed3b72cc4ff3::getLoader();
     22return ComposerAutoloaderInit228de02e5f1ae46db6ee3cf9691e2d7a::getLoader();
  • template-oriented-form-utilities/tags/0.0.2/vendor/composer/autoload_real.php

    r3464549 r3464705  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInitdaa68e1af038c1e02203ed3b72cc4ff3
     5class ComposerAutoloaderInit228de02e5f1ae46db6ee3cf9691e2d7a
    66{
    77    private static $loader;
     
    2323        }
    2424
    25         spl_autoload_register(array('ComposerAutoloaderInitdaa68e1af038c1e02203ed3b72cc4ff3', 'loadClassLoader'), true, true);
     25        spl_autoload_register(array('ComposerAutoloaderInit228de02e5f1ae46db6ee3cf9691e2d7a', 'loadClassLoader'), true, true);
    2626        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
    27         spl_autoload_unregister(array('ComposerAutoloaderInitdaa68e1af038c1e02203ed3b72cc4ff3', 'loadClassLoader'));
     27        spl_autoload_unregister(array('ComposerAutoloaderInit228de02e5f1ae46db6ee3cf9691e2d7a', 'loadClassLoader'));
    2828
    2929        require __DIR__ . '/autoload_static.php';
    30         call_user_func(\Composer\Autoload\ComposerStaticInitdaa68e1af038c1e02203ed3b72cc4ff3::getInitializer($loader));
     30        call_user_func(\Composer\Autoload\ComposerStaticInit228de02e5f1ae46db6ee3cf9691e2d7a::getInitializer($loader));
    3131
    3232        $loader->setClassMapAuthoritative(true);
  • template-oriented-form-utilities/tags/0.0.2/vendor/composer/autoload_static.php

    r3464549 r3464705  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInitdaa68e1af038c1e02203ed3b72cc4ff3
     7class ComposerStaticInit228de02e5f1ae46db6ee3cf9691e2d7a
    88{
    99    public static $prefixLengthsPsr4 = array (
     
    206206    {
    207207        return \Closure::bind(function () use ($loader) {
    208             $loader->prefixLengthsPsr4 = ComposerStaticInitdaa68e1af038c1e02203ed3b72cc4ff3::$prefixLengthsPsr4;
    209             $loader->prefixDirsPsr4 = ComposerStaticInitdaa68e1af038c1e02203ed3b72cc4ff3::$prefixDirsPsr4;
    210             $loader->classMap = ComposerStaticInitdaa68e1af038c1e02203ed3b72cc4ff3::$classMap;
     208            $loader->prefixLengthsPsr4 = ComposerStaticInit228de02e5f1ae46db6ee3cf9691e2d7a::$prefixLengthsPsr4;
     209            $loader->prefixDirsPsr4 = ComposerStaticInit228de02e5f1ae46db6ee3cf9691e2d7a::$prefixDirsPsr4;
     210            $loader->classMap = ComposerStaticInit228de02e5f1ae46db6ee3cf9691e2d7a::$classMap;
    211211
    212212        }, null, ClassLoader::class);
  • template-oriented-form-utilities/tags/0.0.2/vendor/monolog/monolog/composer.json

    r3464549 r3464705  
    2929        "guzzlehttp\/guzzle": "^7.4",
    3030        "guzzlehttp\/psr7": "^2.2",
    31         "mongodb\/mongodb": "^1.8",
     31        "mongodb\/mongodb": "^1.8 || ^2.0",
    3232        "php-amqplib\/php-amqplib": "~2.4 || ^3",
    3333        "phpspec\/prophecy": "^1.15",
  • template-oriented-form-utilities/tags/0.0.2/vendor/monolog/monolog/src/Monolog/ErrorHandler.php

    r3464549 r3464705  
    137137    protected function defaultErrorLevelMap(): array
    138138    {
    139         return [\E_ERROR => LogLevel::CRITICAL, \E_WARNING => LogLevel::WARNING, \E_PARSE => LogLevel::ALERT, \E_NOTICE => LogLevel::NOTICE, \E_CORE_ERROR => LogLevel::CRITICAL, \E_CORE_WARNING => LogLevel::WARNING, \E_COMPILE_ERROR => LogLevel::ALERT, \E_COMPILE_WARNING => LogLevel::WARNING, \E_USER_ERROR => LogLevel::ERROR, \E_USER_WARNING => LogLevel::WARNING, \E_USER_NOTICE => LogLevel::NOTICE, \E_STRICT => LogLevel::NOTICE, \E_RECOVERABLE_ERROR => LogLevel::ERROR, \E_DEPRECATED => LogLevel::NOTICE, \E_USER_DEPRECATED => LogLevel::NOTICE];
     139        return [
     140            \E_ERROR => LogLevel::CRITICAL,
     141            \E_WARNING => LogLevel::WARNING,
     142            \E_PARSE => LogLevel::ALERT,
     143            \E_NOTICE => LogLevel::NOTICE,
     144            \E_CORE_ERROR => LogLevel::CRITICAL,
     145            \E_CORE_WARNING => LogLevel::WARNING,
     146            \E_COMPILE_ERROR => LogLevel::ALERT,
     147            \E_COMPILE_WARNING => LogLevel::WARNING,
     148            \E_USER_ERROR => LogLevel::ERROR,
     149            \E_USER_WARNING => LogLevel::WARNING,
     150            \E_USER_NOTICE => LogLevel::NOTICE,
     151            2048 => LogLevel::NOTICE,
     152            // E_STRICT
     153            \E_RECOVERABLE_ERROR => LogLevel::ERROR,
     154            \E_DEPRECATED => LogLevel::NOTICE,
     155            \E_USER_DEPRECATED => LogLevel::NOTICE,
     156        ];
    140157    }
    141158    /**
     
    236253            case \E_USER_NOTICE:
    237254                return 'E_USER_NOTICE';
    238             case \E_STRICT:
     255            case 2048:
    239256                return 'E_STRICT';
    240257            case \E_RECOVERABLE_ERROR:
  • template-oriented-form-utilities/tags/0.0.2/vendor/monolog/monolog/src/Monolog/Formatter/MongoDBFormatter.php

    r3464549 r3464705  
    2626    /** @var int */
    2727    private $maxNestingLevel;
    28     /** @var bool */
    29     private $isLegacyMongoExt;
    3028    /**
    3129     * @param int  $maxNestingLevel        0 means infinite nesting, the $record itself is level 1, $record['context'] is 2
     
    3634        $this->maxNestingLevel = max($maxNestingLevel, 0);
    3735        $this->exceptionTraceAsString = $exceptionTraceAsString;
    38         $this->isLegacyMongoExt = extension_loaded('mongodb') && version_compare((string) phpversion('mongodb'), '1.1.9', '<=');
    3936    }
    4037    /**
     
    109106    protected function formatDate(\DateTimeInterface $value, int $nestingLevel): UTCDateTime
    110107    {
    111         if ($this->isLegacyMongoExt) {
    112             return $this->legacyGetMongoDbDateTime($value);
    113         }
    114         return $this->getMongoDbDateTime($value);
    115     }
    116     private function getMongoDbDateTime(\DateTimeInterface $value): UTCDateTime
    117     {
    118108        return new UTCDateTime((int) floor((float) $value->format('U.u') * 1000));
    119109    }
    120     /**
    121      * This is needed to support MongoDB Driver v1.19 and below
    122      *
    123      * See https://github.com/mongodb/mongo-php-driver/issues/426
    124      *
    125      * It can probably be removed in 2.1 or later once MongoDB's 1.2 is released and widely adopted
    126      */
    127     private function legacyGetMongoDbDateTime(\DateTimeInterface $value): UTCDateTime
    128     {
    129         $milliseconds = floor((float) $value->format('U.u') * 1000);
    130         $milliseconds = \PHP_INT_SIZE == 8 ? (int) $milliseconds : (string) $milliseconds;
    131         // @phpstan-ignore-next-line
    132         return new UTCDateTime($milliseconds);
    133     }
    134110}
  • template-oriented-form-utilities/tags/0.0.2/vendor/monolog/monolog/src/Monolog/Handler/Curl/Util.php

    r3464549 r3464705  
    3838                if (\false === in_array($curlErrno, self::$retriableErrorCodes, \true) || !$retries) {
    3939                    $curlError = curl_error($ch);
    40                     if ($closeAfterDone) {
     40                    if (\PHP_VERSION_ID < 80000 && $closeAfterDone) {
    4141                        curl_close($ch);
    4242                    }
     
    4545                continue;
    4646            }
    47             if ($closeAfterDone) {
     47            if (\PHP_VERSION_ID < 80000 && $closeAfterDone) {
    4848                curl_close($ch);
    4949            }
  • template-oriented-form-utilities/tags/0.0.2/vendor/monolog/monolog/src/Monolog/Handler/MongoDBHandler.php

    r3464549 r3464705  
    1212namespace TofuVendor\Monolog\Handler;
    1313
     14use TofuVendor\MongoDB\Client;
     15use TofuVendor\MongoDB\Collection;
    1416use MongoDB\Driver\BulkWrite;
    1517use MongoDB\Driver\Manager;
    16 use TofuVendor\MongoDB\Client;
    17 use TofuVendor\Monolog\Logger;
    1818use TofuVendor\Monolog\Formatter\FormatterInterface;
    1919use TofuVendor\Monolog\Formatter\MongoDBFormatter;
     20use TofuVendor\Monolog\Logger;
    2021/**
    2122 * Logs to a MongoDB database.
     
    3334class MongoDBHandler extends AbstractProcessingHandler
    3435{
    35     /** @var \MongoDB\Collection */
     36    /** @var Collection */
    3637    private $collection;
    3738    /** @var Client|Manager */
    3839    private $manager;
    39     /** @var string */
    40     private $namespace;
     40    /** @var string|null */
     41    private $namespace = null;
    4142    /**
    4243     * Constructor.
     
    5253        }
    5354        if ($mongodb instanceof Client) {
    54             $this->collection = $mongodb->selectCollection($database, $collection);
     55            $this->collection = method_exists($mongodb, 'getCollection') ? $mongodb->getCollection($database, $collection) : $mongodb->selectCollection($database, $collection);
    5556        } else {
    5657            $this->manager = $mongodb;
  • template-oriented-form-utilities/tags/0.0.2/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php

    r3464549 r3464705  
    142142                // are cleaning up/rotating at the same time
    143143                set_error_handler(function (int $errno, string $errstr, string $errfile, int $errline): bool {
    144                     return \false;
     144                    return \true;
    145145                });
    146146                unlink($file);
  • template-oriented-form-utilities/tags/0.0.2/vendor/monolog/monolog/src/Monolog/Handler/TelegramBotHandler.php

    r3464549 r3464705  
    186186    protected function sendCurl(string $message): void
    187187    {
     188        if ('' === trim($message)) {
     189            return;
     190        }
    188191        $ch = curl_init();
    189192        $url = self::BOT_API . $this->apiKey . '/SendMessage';
  • template-oriented-form-utilities/tags/0.0.2/vendor/monolog/monolog/src/Monolog/Processor/GitProcessor.php

    r3464549 r3464705  
    5858            return self::$cache;
    5959        }
    60         $branches = `git branch -v --no-abbrev`;
     60        $branches = shell_exec('git branch -v --no-abbrev');
    6161        if ($branches && preg_match('{^\* (.+?)\s+([a-f0-9]{40})(?:\s|$)}m', $branches, $matches)) {
    6262            return self::$cache = ['branch' => $matches[1], 'commit' => $matches[2]];
  • template-oriented-form-utilities/tags/0.0.2/vendor/monolog/monolog/src/Monolog/Processor/MercurialProcessor.php

    r3464549 r3464705  
    5757            return self::$cache;
    5858        }
    59         $result = explode(' ', trim(`hg id -nb`));
     59        $result = explode(' ', trim((string) shell_exec('hg id -nb')));
    6060        if (count($result) >= 3) {
    6161            return self::$cache = ['branch' => $result[1], 'revision' => $result[2]];
  • template-oriented-form-utilities/tags/0.0.2/vendor/monolog/monolog/src/Monolog/SignalHandler.php

    r3464549 r3464705  
    7171    public function handleSignal(int $signo, $siginfo = null): void
    7272    {
     73        /** @var array<int, string> $signals */
    7374        static $signals = [];
    7475        if (!$signals && extension_loaded('pcntl')) {
  • template-oriented-form-utilities/trunk/readme.txt

    r3464549 r3464705  
    33Tags: forms, utilities, template-oriented
    44Tested up to: 6.9
    5 Requires PHP: 8.2
    6 Stable tag: 0.0.1
     5Requires PHP: 8.1
     6Stable tag: 0.0.2
    77License: GPLv3 or later
    88License URI: https://www.gnu.org/licenses/gpl-3.0.txt
    99
    10 Template-Oriented Form Utilities is a WordPress plugin that provides a set of utilities for handling forms in a template-oriented manner. It simplifies form creation, validation, and processing by leveraging templates for rendering and managing form data.
     10Template-Oriented Form Utilities is a WordPress plugin that simplifies form creation, validation, and processing through template-based rendering and data management.
    1111
    1212== Description ==
    1313
    1414Template-Oriented Form Utilities (TOFU) is designed to streamline the process of creating and managing forms within WordPress themes and plugins. By adopting a template-oriented approach, TOFU allows developers to define form structures and behaviors using reusable templates, making it easier to manage/maintain with team collaboration through version control systems.
     15
     16GitHub and documentation for this plugin can be found at:
     17
     18[https://github.com/lionheart-group/template-oriented-form-utilities](https://github.com/lionheart-group/template-oriented-form-utilities)
    1519
    1620== External services ==
     
    5862
    5963* v0.0.1 - Initial release.
     64* v0.0.2 - Arranged required PHP version to 8.1, added external services section to the readme.
    6065
    6166
  • template-oriented-form-utilities/trunk/template-oriented-form-utilities.php

    r3464549 r3464705  
    33/**
    44 * @link https://www.lionheart.co.jp/
     5 * @since 0.0.2 - Changed required PHP version to 8.1
    56 * @since 0.0.1
    67 * @package Tofu
     
    1011 * Plugin URI: https://lionheart-group.github.io/template-oriented-form-utilities/
    1112 * Description: Template-Oriented Form Utilities is a WordPress plugin that provides a set of utilities for handling forms in a template-oriented manner.
    12  * Version: 0.0.1
     13 * Version: 0.0.2
    1314 * Author: lionheartgroup
    1415 * Author URI: https://www.lionheart.co.jp/
     
    2627 * Rename this for your plugin and update it as you release new versions.
    2728 */
    28 \define('TOFU_VERSION', '0.0.1');
     29\define('TOFU_VERSION', '0.0.2');
    2930\define('TOFU_PLUGIN_DIR', \plugin_dir_path(__FILE__));
    3031\define('TOFU_PLUGIN_FILE', __FILE__);
  • template-oriented-form-utilities/trunk/vendor/autoload.php

    r3464549 r3464705  
    2020require_once __DIR__ . '/composer/autoload_real.php';
    2121
    22 return ComposerAutoloaderInitdaa68e1af038c1e02203ed3b72cc4ff3::getLoader();
     22return ComposerAutoloaderInit228de02e5f1ae46db6ee3cf9691e2d7a::getLoader();
  • template-oriented-form-utilities/trunk/vendor/composer/autoload_real.php

    r3464549 r3464705  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInitdaa68e1af038c1e02203ed3b72cc4ff3
     5class ComposerAutoloaderInit228de02e5f1ae46db6ee3cf9691e2d7a
    66{
    77    private static $loader;
     
    2323        }
    2424
    25         spl_autoload_register(array('ComposerAutoloaderInitdaa68e1af038c1e02203ed3b72cc4ff3', 'loadClassLoader'), true, true);
     25        spl_autoload_register(array('ComposerAutoloaderInit228de02e5f1ae46db6ee3cf9691e2d7a', 'loadClassLoader'), true, true);
    2626        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
    27         spl_autoload_unregister(array('ComposerAutoloaderInitdaa68e1af038c1e02203ed3b72cc4ff3', 'loadClassLoader'));
     27        spl_autoload_unregister(array('ComposerAutoloaderInit228de02e5f1ae46db6ee3cf9691e2d7a', 'loadClassLoader'));
    2828
    2929        require __DIR__ . '/autoload_static.php';
    30         call_user_func(\Composer\Autoload\ComposerStaticInitdaa68e1af038c1e02203ed3b72cc4ff3::getInitializer($loader));
     30        call_user_func(\Composer\Autoload\ComposerStaticInit228de02e5f1ae46db6ee3cf9691e2d7a::getInitializer($loader));
    3131
    3232        $loader->setClassMapAuthoritative(true);
  • template-oriented-form-utilities/trunk/vendor/composer/autoload_static.php

    r3464549 r3464705  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInitdaa68e1af038c1e02203ed3b72cc4ff3
     7class ComposerStaticInit228de02e5f1ae46db6ee3cf9691e2d7a
    88{
    99    public static $prefixLengthsPsr4 = array (
     
    206206    {
    207207        return \Closure::bind(function () use ($loader) {
    208             $loader->prefixLengthsPsr4 = ComposerStaticInitdaa68e1af038c1e02203ed3b72cc4ff3::$prefixLengthsPsr4;
    209             $loader->prefixDirsPsr4 = ComposerStaticInitdaa68e1af038c1e02203ed3b72cc4ff3::$prefixDirsPsr4;
    210             $loader->classMap = ComposerStaticInitdaa68e1af038c1e02203ed3b72cc4ff3::$classMap;
     208            $loader->prefixLengthsPsr4 = ComposerStaticInit228de02e5f1ae46db6ee3cf9691e2d7a::$prefixLengthsPsr4;
     209            $loader->prefixDirsPsr4 = ComposerStaticInit228de02e5f1ae46db6ee3cf9691e2d7a::$prefixDirsPsr4;
     210            $loader->classMap = ComposerStaticInit228de02e5f1ae46db6ee3cf9691e2d7a::$classMap;
    211211
    212212        }, null, ClassLoader::class);
  • template-oriented-form-utilities/trunk/vendor/monolog/monolog/composer.json

    r3464549 r3464705  
    2929        "guzzlehttp\/guzzle": "^7.4",
    3030        "guzzlehttp\/psr7": "^2.2",
    31         "mongodb\/mongodb": "^1.8",
     31        "mongodb\/mongodb": "^1.8 || ^2.0",
    3232        "php-amqplib\/php-amqplib": "~2.4 || ^3",
    3333        "phpspec\/prophecy": "^1.15",
  • template-oriented-form-utilities/trunk/vendor/monolog/monolog/src/Monolog/ErrorHandler.php

    r3464549 r3464705  
    137137    protected function defaultErrorLevelMap(): array
    138138    {
    139         return [\E_ERROR => LogLevel::CRITICAL, \E_WARNING => LogLevel::WARNING, \E_PARSE => LogLevel::ALERT, \E_NOTICE => LogLevel::NOTICE, \E_CORE_ERROR => LogLevel::CRITICAL, \E_CORE_WARNING => LogLevel::WARNING, \E_COMPILE_ERROR => LogLevel::ALERT, \E_COMPILE_WARNING => LogLevel::WARNING, \E_USER_ERROR => LogLevel::ERROR, \E_USER_WARNING => LogLevel::WARNING, \E_USER_NOTICE => LogLevel::NOTICE, \E_STRICT => LogLevel::NOTICE, \E_RECOVERABLE_ERROR => LogLevel::ERROR, \E_DEPRECATED => LogLevel::NOTICE, \E_USER_DEPRECATED => LogLevel::NOTICE];
     139        return [
     140            \E_ERROR => LogLevel::CRITICAL,
     141            \E_WARNING => LogLevel::WARNING,
     142            \E_PARSE => LogLevel::ALERT,
     143            \E_NOTICE => LogLevel::NOTICE,
     144            \E_CORE_ERROR => LogLevel::CRITICAL,
     145            \E_CORE_WARNING => LogLevel::WARNING,
     146            \E_COMPILE_ERROR => LogLevel::ALERT,
     147            \E_COMPILE_WARNING => LogLevel::WARNING,
     148            \E_USER_ERROR => LogLevel::ERROR,
     149            \E_USER_WARNING => LogLevel::WARNING,
     150            \E_USER_NOTICE => LogLevel::NOTICE,
     151            2048 => LogLevel::NOTICE,
     152            // E_STRICT
     153            \E_RECOVERABLE_ERROR => LogLevel::ERROR,
     154            \E_DEPRECATED => LogLevel::NOTICE,
     155            \E_USER_DEPRECATED => LogLevel::NOTICE,
     156        ];
    140157    }
    141158    /**
     
    236253            case \E_USER_NOTICE:
    237254                return 'E_USER_NOTICE';
    238             case \E_STRICT:
     255            case 2048:
    239256                return 'E_STRICT';
    240257            case \E_RECOVERABLE_ERROR:
  • template-oriented-form-utilities/trunk/vendor/monolog/monolog/src/Monolog/Formatter/MongoDBFormatter.php

    r3464549 r3464705  
    2626    /** @var int */
    2727    private $maxNestingLevel;
    28     /** @var bool */
    29     private $isLegacyMongoExt;
    3028    /**
    3129     * @param int  $maxNestingLevel        0 means infinite nesting, the $record itself is level 1, $record['context'] is 2
     
    3634        $this->maxNestingLevel = max($maxNestingLevel, 0);
    3735        $this->exceptionTraceAsString = $exceptionTraceAsString;
    38         $this->isLegacyMongoExt = extension_loaded('mongodb') && version_compare((string) phpversion('mongodb'), '1.1.9', '<=');
    3936    }
    4037    /**
     
    109106    protected function formatDate(\DateTimeInterface $value, int $nestingLevel): UTCDateTime
    110107    {
    111         if ($this->isLegacyMongoExt) {
    112             return $this->legacyGetMongoDbDateTime($value);
    113         }
    114         return $this->getMongoDbDateTime($value);
    115     }
    116     private function getMongoDbDateTime(\DateTimeInterface $value): UTCDateTime
    117     {
    118108        return new UTCDateTime((int) floor((float) $value->format('U.u') * 1000));
    119109    }
    120     /**
    121      * This is needed to support MongoDB Driver v1.19 and below
    122      *
    123      * See https://github.com/mongodb/mongo-php-driver/issues/426
    124      *
    125      * It can probably be removed in 2.1 or later once MongoDB's 1.2 is released and widely adopted
    126      */
    127     private function legacyGetMongoDbDateTime(\DateTimeInterface $value): UTCDateTime
    128     {
    129         $milliseconds = floor((float) $value->format('U.u') * 1000);
    130         $milliseconds = \PHP_INT_SIZE == 8 ? (int) $milliseconds : (string) $milliseconds;
    131         // @phpstan-ignore-next-line
    132         return new UTCDateTime($milliseconds);
    133     }
    134110}
  • template-oriented-form-utilities/trunk/vendor/monolog/monolog/src/Monolog/Handler/Curl/Util.php

    r3464549 r3464705  
    3838                if (\false === in_array($curlErrno, self::$retriableErrorCodes, \true) || !$retries) {
    3939                    $curlError = curl_error($ch);
    40                     if ($closeAfterDone) {
     40                    if (\PHP_VERSION_ID < 80000 && $closeAfterDone) {
    4141                        curl_close($ch);
    4242                    }
     
    4545                continue;
    4646            }
    47             if ($closeAfterDone) {
     47            if (\PHP_VERSION_ID < 80000 && $closeAfterDone) {
    4848                curl_close($ch);
    4949            }
  • template-oriented-form-utilities/trunk/vendor/monolog/monolog/src/Monolog/Handler/MongoDBHandler.php

    r3464549 r3464705  
    1212namespace TofuVendor\Monolog\Handler;
    1313
     14use TofuVendor\MongoDB\Client;
     15use TofuVendor\MongoDB\Collection;
    1416use MongoDB\Driver\BulkWrite;
    1517use MongoDB\Driver\Manager;
    16 use TofuVendor\MongoDB\Client;
    17 use TofuVendor\Monolog\Logger;
    1818use TofuVendor\Monolog\Formatter\FormatterInterface;
    1919use TofuVendor\Monolog\Formatter\MongoDBFormatter;
     20use TofuVendor\Monolog\Logger;
    2021/**
    2122 * Logs to a MongoDB database.
     
    3334class MongoDBHandler extends AbstractProcessingHandler
    3435{
    35     /** @var \MongoDB\Collection */
     36    /** @var Collection */
    3637    private $collection;
    3738    /** @var Client|Manager */
    3839    private $manager;
    39     /** @var string */
    40     private $namespace;
     40    /** @var string|null */
     41    private $namespace = null;
    4142    /**
    4243     * Constructor.
     
    5253        }
    5354        if ($mongodb instanceof Client) {
    54             $this->collection = $mongodb->selectCollection($database, $collection);
     55            $this->collection = method_exists($mongodb, 'getCollection') ? $mongodb->getCollection($database, $collection) : $mongodb->selectCollection($database, $collection);
    5556        } else {
    5657            $this->manager = $mongodb;
  • template-oriented-form-utilities/trunk/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php

    r3464549 r3464705  
    142142                // are cleaning up/rotating at the same time
    143143                set_error_handler(function (int $errno, string $errstr, string $errfile, int $errline): bool {
    144                     return \false;
     144                    return \true;
    145145                });
    146146                unlink($file);
  • template-oriented-form-utilities/trunk/vendor/monolog/monolog/src/Monolog/Handler/TelegramBotHandler.php

    r3464549 r3464705  
    186186    protected function sendCurl(string $message): void
    187187    {
     188        if ('' === trim($message)) {
     189            return;
     190        }
    188191        $ch = curl_init();
    189192        $url = self::BOT_API . $this->apiKey . '/SendMessage';
  • template-oriented-form-utilities/trunk/vendor/monolog/monolog/src/Monolog/Processor/GitProcessor.php

    r3464549 r3464705  
    5858            return self::$cache;
    5959        }
    60         $branches = `git branch -v --no-abbrev`;
     60        $branches = shell_exec('git branch -v --no-abbrev');
    6161        if ($branches && preg_match('{^\* (.+?)\s+([a-f0-9]{40})(?:\s|$)}m', $branches, $matches)) {
    6262            return self::$cache = ['branch' => $matches[1], 'commit' => $matches[2]];
  • template-oriented-form-utilities/trunk/vendor/monolog/monolog/src/Monolog/Processor/MercurialProcessor.php

    r3464549 r3464705  
    5757            return self::$cache;
    5858        }
    59         $result = explode(' ', trim(`hg id -nb`));
     59        $result = explode(' ', trim((string) shell_exec('hg id -nb')));
    6060        if (count($result) >= 3) {
    6161            return self::$cache = ['branch' => $result[1], 'revision' => $result[2]];
  • template-oriented-form-utilities/trunk/vendor/monolog/monolog/src/Monolog/SignalHandler.php

    r3464549 r3464705  
    7171    public function handleSignal(int $signo, $siginfo = null): void
    7272    {
     73        /** @var array<int, string> $signals */
    7374        static $signals = [];
    7475        if (!$signals && extension_loaded('pcntl')) {
Note: See TracChangeset for help on using the changeset viewer.