diff options
| author | Christian Cleberg <[email protected]> | 2026-03-01 19:32:52 -0600 |
|---|---|---|
| committer | Christian Cleberg <[email protected]> | 2026-03-01 19:32:52 -0600 |
| commit | a98c2a4542e19ce4fb632bc32fc47c18273161cc (patch) | |
| tree | 99d016c1c9f12d98d57cfec34262e7c228a1d920 /vendor/symfony/polyfill-php70 | |
| parent | cd8c38db601355003510e92a0936cde6b71cf849 (diff) | |
| download | michelangelo-a98c2a4542e19ce4fb632bc32fc47c18273161cc.tar.gz michelangelo-a98c2a4542e19ce4fb632bc32fc47c18273161cc.tar.bz2 michelangelo-a98c2a4542e19ce4fb632bc32fc47c18273161cc.zip | |
convert from PHP to Go
Diffstat (limited to 'vendor/symfony/polyfill-php70')
12 files changed, 0 insertions, 241 deletions
diff --git a/vendor/symfony/polyfill-php70/LICENSE b/vendor/symfony/polyfill-php70/LICENSE deleted file mode 100644 index 4cd8bdd..0000000 --- a/vendor/symfony/polyfill-php70/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2015-2019 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/polyfill-php70/Php70.php b/vendor/symfony/polyfill-php70/Php70.php deleted file mode 100644 index 7f1ad08..0000000 --- a/vendor/symfony/polyfill-php70/Php70.php +++ /dev/null @@ -1,74 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <[email protected]> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Php70; - -/** - * @author Nicolas Grekas <[email protected]> - * - * @internal - */ -final class Php70 -{ - public static function intdiv($dividend, $divisor) - { - $dividend = self::intArg($dividend, __FUNCTION__, 1); - $divisor = self::intArg($divisor, __FUNCTION__, 2); - - if (0 === $divisor) { - throw new \DivisionByZeroError('Division by zero'); - } - if (-1 === $divisor && ~PHP_INT_MAX === $dividend) { - throw new \ArithmeticError('Division of PHP_INT_MIN by -1 is not an integer'); - } - - return ($dividend - ($dividend % $divisor)) / $divisor; - } - - public static function preg_replace_callback_array(array $patterns, $subject, $limit = -1, &$count = 0) - { - $count = 0; - $result = (string) $subject; - if (0 === $limit = self::intArg($limit, __FUNCTION__, 3)) { - return $result; - } - - foreach ($patterns as $pattern => $callback) { - $result = preg_replace_callback($pattern, $callback, $result, $limit, $c); - $count += $c; - } - - return $result; - } - - public static function error_clear_last() - { - static $handler; - if (!$handler) { - $handler = function () { return false; }; - } - set_error_handler($handler); - @trigger_error(''); - restore_error_handler(); - } - - private static function intArg($value, $caller, $pos) - { - if (\is_int($value)) { - return $value; - } - if (!\is_numeric($value) || PHP_INT_MAX <= ($value += 0) || ~PHP_INT_MAX >= $value) { - throw new \TypeError(sprintf('%s() expects parameter %d to be integer, %s given', $caller, $pos, \gettype($value))); - } - - return (int) $value; - } -} diff --git a/vendor/symfony/polyfill-php70/README.md b/vendor/symfony/polyfill-php70/README.md deleted file mode 100644 index abd5488..0000000 --- a/vendor/symfony/polyfill-php70/README.md +++ /dev/null @@ -1,28 +0,0 @@ -Symfony Polyfill / Php70 -======================== - -This component provides features unavailable in releases prior to PHP 7.0: - -- [`intdiv`](https://php.net/intdiv) -- [`preg_replace_callback_array`](https://php.net/preg_replace_callback_array) -- [`error_clear_last`](https://php.net/error_clear_last) -- `random_bytes` and `random_int` (from [paragonie/random_compat](https://github.com/paragonie/random_compat)) -- [`*Error` throwable classes](https://php.net/Error) -- [`PHP_INT_MIN`](https://php.net/reserved.constants#constant.php-int-min) -- `SessionUpdateTimestampHandlerInterface` - -More information can be found in the -[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md). - -Compatibility notes -=================== - -To write portable code between PHP5 and PHP7, some care must be taken: -- `\*Error` exceptions must be caught before `\Exception`; -- after calling `error_clear_last()`, the result of `$e = error_get_last()` must be - verified using `isset($e['message'][0])` instead of `null !== $e`. - -License -======= - -This library is released under the [MIT license](LICENSE). diff --git a/vendor/symfony/polyfill-php70/Resources/stubs/ArithmeticError.php b/vendor/symfony/polyfill-php70/Resources/stubs/ArithmeticError.php deleted file mode 100644 index 6819124..0000000 --- a/vendor/symfony/polyfill-php70/Resources/stubs/ArithmeticError.php +++ /dev/null @@ -1,5 +0,0 @@ -<?php - -class ArithmeticError extends Error -{ -} diff --git a/vendor/symfony/polyfill-php70/Resources/stubs/AssertionError.php b/vendor/symfony/polyfill-php70/Resources/stubs/AssertionError.php deleted file mode 100644 index acb1250..0000000 --- a/vendor/symfony/polyfill-php70/Resources/stubs/AssertionError.php +++ /dev/null @@ -1,5 +0,0 @@ -<?php - -class AssertionError extends Error -{ -} diff --git a/vendor/symfony/polyfill-php70/Resources/stubs/DivisionByZeroError.php b/vendor/symfony/polyfill-php70/Resources/stubs/DivisionByZeroError.php deleted file mode 100644 index c99278b..0000000 --- a/vendor/symfony/polyfill-php70/Resources/stubs/DivisionByZeroError.php +++ /dev/null @@ -1,5 +0,0 @@ -<?php - -class DivisionByZeroError extends Error -{ -} diff --git a/vendor/symfony/polyfill-php70/Resources/stubs/Error.php b/vendor/symfony/polyfill-php70/Resources/stubs/Error.php deleted file mode 100644 index 405847f..0000000 --- a/vendor/symfony/polyfill-php70/Resources/stubs/Error.php +++ /dev/null @@ -1,5 +0,0 @@ -<?php - -class Error extends Exception -{ -} diff --git a/vendor/symfony/polyfill-php70/Resources/stubs/ParseError.php b/vendor/symfony/polyfill-php70/Resources/stubs/ParseError.php deleted file mode 100644 index 2dd447d..0000000 --- a/vendor/symfony/polyfill-php70/Resources/stubs/ParseError.php +++ /dev/null @@ -1,5 +0,0 @@ -<?php - -class ParseError extends Error -{ -} diff --git a/vendor/symfony/polyfill-php70/Resources/stubs/SessionUpdateTimestampHandlerInterface.php b/vendor/symfony/polyfill-php70/Resources/stubs/SessionUpdateTimestampHandlerInterface.php deleted file mode 100644 index 0cc02c8..0000000 --- a/vendor/symfony/polyfill-php70/Resources/stubs/SessionUpdateTimestampHandlerInterface.php +++ /dev/null @@ -1,23 +0,0 @@ -<?php - -interface SessionUpdateTimestampHandlerInterface -{ - /** - * Checks if a session identifier already exists or not. - * - * @param string $key - * - * @return bool - */ - public function validateId($key); - - /** - * Updates the timestamp of a session when its data didn't change. - * - * @param string $key - * @param string $val - * - * @return bool - */ - public function updateTimestamp($key, $val); -} diff --git a/vendor/symfony/polyfill-php70/Resources/stubs/TypeError.php b/vendor/symfony/polyfill-php70/Resources/stubs/TypeError.php deleted file mode 100644 index 2bed1b4..0000000 --- a/vendor/symfony/polyfill-php70/Resources/stubs/TypeError.php +++ /dev/null @@ -1,5 +0,0 @@ -<?php - -class TypeError extends Error -{ -} diff --git a/vendor/symfony/polyfill-php70/bootstrap.php b/vendor/symfony/polyfill-php70/bootstrap.php deleted file mode 100644 index a11f80d..0000000 --- a/vendor/symfony/polyfill-php70/bootstrap.php +++ /dev/null @@ -1,30 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <[email protected]> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Symfony\Polyfill\Php70 as p; - -if (PHP_VERSION_ID >= 70000) { - return; -} - -if (!defined('PHP_INT_MIN')) { - define('PHP_INT_MIN', ~PHP_INT_MAX); -} - -if (!function_exists('intdiv')) { - function intdiv($dividend, $divisor) { return p\Php70::intdiv($dividend, $divisor); } -} -if (!function_exists('preg_replace_callback_array')) { - function preg_replace_callback_array(array $patterns, $subject, $limit = -1, &$count = 0) { return p\Php70::preg_replace_callback_array($patterns, $subject, $limit, $count); } -} -if (!function_exists('error_clear_last')) { - function error_clear_last() { return p\Php70::error_clear_last(); } -} diff --git a/vendor/symfony/polyfill-php70/composer.json b/vendor/symfony/polyfill-php70/composer.json deleted file mode 100644 index 771a6f6..0000000 --- a/vendor/symfony/polyfill-php70/composer.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "symfony/polyfill-php70", - "type": "library", - "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions", - "keywords": ["polyfill", "shim", "compatibility", "portable"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Nicolas Grekas", - "email": "[email protected]" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=5.3.3", - "paragonie/random_compat": "~1.0|~2.0|~9.99" - }, - "autoload": { - "psr-4": { "Symfony\\Polyfill\\Php70\\": "" }, - "files": [ "bootstrap.php" ], - "classmap": [ "Resources/stubs" ] - }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "1.18-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - } -} |
