Skip to content

Commit

Permalink
Dev: Update phpseclib to latest versions
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Jun 7, 2022
1 parent 7d98b92 commit 0364b32
Show file tree
Hide file tree
Showing 279 changed files with 3,009 additions and 6,636 deletions.
3 changes: 2 additions & 1 deletion composer.json
Expand Up @@ -38,7 +38,8 @@
"require": {
"paragonie/sodium_compat": "^1.14",
"twig/twig": "1.44.2",
"phpseclib/bcmath_compat": "1.0.4",
"phpseclib/bcmath_compat": "^2.0",
"phpseclib/phpseclib": "^3.0",
"tiamo/spss": "^2.2",
"yiiext/twig-renderer":"dev-master"
},
Expand Down
45 changes: 18 additions & 27 deletions third_party/composer/InstalledVersions.php
Expand Up @@ -25,24 +25,24 @@ class InstalledVersions
private static $installed = array (
'root' =>
array (
'pretty_version' => 'dev-develop',
'version' => 'dev-develop',
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'aliases' =>
array (
),
'reference' => '0417917dc15116766d0143117d9176cf5aa60bc4',
'reference' => 'b4fe7fd6941c4b3c97eda73dafa786fa02ecd23a',
'name' => 'limesurvey/limesurvey',
),
'versions' =>
array (
'limesurvey/limesurvey' =>
array (
'pretty_version' => 'dev-develop',
'version' => 'dev-develop',
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'aliases' =>
array (
),
'reference' => '0417917dc15116766d0143117d9176cf5aa60bc4',
'reference' => 'b4fe7fd6941c4b3c97eda73dafa786fa02ecd23a',
),
'paragonie/constant_time_encoding' =>
array (
Expand All @@ -64,48 +64,39 @@ class InstalledVersions
),
'paragonie/sodium_compat' =>
array (
'pretty_version' => 'v1.17.0',
'version' => '1.17.0.0',
'pretty_version' => 'v1.17.1',
'version' => '1.17.1.0',
'aliases' =>
array (
),
'reference' => 'c59cac21abbcc0df06a3dd18076450ea4797b321',
'reference' => 'ac994053faac18d386328c91c7900f930acadf1e',
),
'phpseclib/bcmath_compat' =>
array (
'pretty_version' => '1.0.4',
'version' => '1.0.4.0',
'pretty_version' => '2.0.1',
'version' => '2.0.1.0',
'aliases' =>
array (
),
'reference' => 'f805922db4b3d8c1e174dafb74ac7374264e8880',
'reference' => '2ffea8bfe1702b4535a7b3c2649c4301968e9a3c',
),
'phpseclib/phpseclib' =>
array (
'pretty_version' => '3.0.12',
'version' => '3.0.12.0',
'pretty_version' => '3.0.14',
'version' => '3.0.14.0',
'aliases' =>
array (
),
'reference' => '89bfb45bd8b1abc3b37e910d57f5dbd3174f40fb',
'reference' => '2f0b7af658cbea265cbb4a791d6c29a6613f98ef',
),
'symfony/polyfill-ctype' =>
array (
'pretty_version' => 'v1.24.0',
'version' => '1.24.0.0',
'aliases' =>
array (
),
'reference' => '30885182c981ab175d4d034db0f6f469898070ab',
),
'symfony/polyfill-mbstring' =>
array (
'pretty_version' => 'v1.24.0',
'version' => '1.24.0.0',
'pretty_version' => 'v1.26.0',
'version' => '1.26.0.0',
'aliases' =>
array (
),
'reference' => '0abb51d2f102e00a4eefcf46ba7fec406d245825',
'reference' => '6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4',
),
'tiamo/spss' =>
array (
Expand Down
1 change: 0 additions & 1 deletion third_party/composer/autoload_files.php
Expand Up @@ -10,5 +10,4 @@
'decc78cc4436b1292c6c0d151b19445c' => $vendorDir . '/phpseclib/phpseclib/phpseclib/bootstrap.php',
'3109cb1a231dcd04bee1f9f620d46975' => $vendorDir . '/paragonie/sodium_compat/autoload.php',
'56823cacd97af379eceaf82ad00b928f' => $vendorDir . '/phpseclib/bcmath_compat/lib/bcmath.php',
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
);
1 change: 0 additions & 1 deletion third_party/composer/autoload_psr4.php
Expand Up @@ -9,7 +9,6 @@
'phpseclib3\\' => array($vendorDir . '/phpseclib/phpseclib/phpseclib'),
'bcmath_compat\\' => array($vendorDir . '/phpseclib/bcmath_compat/src'),
'Twig\\' => array($vendorDir . '/twig/twig/src'),
'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'),
'Symfony\\Polyfill\\Ctype\\' => array($vendorDir . '/symfony/polyfill-ctype'),
'SPSS\\' => array($vendorDir . '/tiamo/spss/src'),
'ParagonIE\\ConstantTime\\' => array($vendorDir . '/paragonie/constant_time_encoding/src'),
Expand Down
6 changes: 0 additions & 6 deletions third_party/composer/autoload_static.php
Expand Up @@ -11,7 +11,6 @@ class ComposerStaticInitddb1a145e450f862353420acc5153e40
'decc78cc4436b1292c6c0d151b19445c' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/bootstrap.php',
'3109cb1a231dcd04bee1f9f620d46975' => __DIR__ . '/..' . '/paragonie/sodium_compat/autoload.php',
'56823cacd97af379eceaf82ad00b928f' => __DIR__ . '/..' . '/phpseclib/bcmath_compat/lib/bcmath.php',
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
);

public static $prefixLengthsPsr4 = array (
Expand All @@ -29,7 +28,6 @@ class ComposerStaticInitddb1a145e450f862353420acc5153e40
),
'S' =>
array (
'Symfony\\Polyfill\\Mbstring\\' => 26,
'Symfony\\Polyfill\\Ctype\\' => 23,
'SPSS\\' => 5,
),
Expand Down Expand Up @@ -63,10 +61,6 @@ class ComposerStaticInitddb1a145e450f862353420acc5153e40
array (
0 => __DIR__ . '/..' . '/twig/twig/src',
),
'Symfony\\Polyfill\\Mbstring\\' =>
array (
0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring',
),
'Symfony\\Polyfill\\Ctype\\' =>
array (
0 => __DIR__ . '/..' . '/symfony/polyfill-ctype',
Expand Down
45 changes: 18 additions & 27 deletions third_party/composer/installed.php
@@ -1,24 +1,24 @@
<?php return array (
'root' =>
array (
'pretty_version' => 'dev-develop',
'version' => 'dev-develop',
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'aliases' =>
array (
),
'reference' => '0417917dc15116766d0143117d9176cf5aa60bc4',
'reference' => 'b4fe7fd6941c4b3c97eda73dafa786fa02ecd23a',
'name' => 'limesurvey/limesurvey',
),
'versions' =>
array (
'limesurvey/limesurvey' =>
array (
'pretty_version' => 'dev-develop',
'version' => 'dev-develop',
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'aliases' =>
array (
),
'reference' => '0417917dc15116766d0143117d9176cf5aa60bc4',
'reference' => 'b4fe7fd6941c4b3c97eda73dafa786fa02ecd23a',
),
'paragonie/constant_time_encoding' =>
array (
Expand All @@ -40,48 +40,39 @@
),
'paragonie/sodium_compat' =>
array (
'pretty_version' => 'v1.17.0',
'version' => '1.17.0.0',
'pretty_version' => 'v1.17.1',
'version' => '1.17.1.0',
'aliases' =>
array (
),
'reference' => 'c59cac21abbcc0df06a3dd18076450ea4797b321',
'reference' => 'ac994053faac18d386328c91c7900f930acadf1e',
),
'phpseclib/bcmath_compat' =>
array (
'pretty_version' => '1.0.4',
'version' => '1.0.4.0',
'pretty_version' => '2.0.1',
'version' => '2.0.1.0',
'aliases' =>
array (
),
'reference' => 'f805922db4b3d8c1e174dafb74ac7374264e8880',
'reference' => '2ffea8bfe1702b4535a7b3c2649c4301968e9a3c',
),
'phpseclib/phpseclib' =>
array (
'pretty_version' => '3.0.12',
'version' => '3.0.12.0',
'pretty_version' => '3.0.14',
'version' => '3.0.14.0',
'aliases' =>
array (
),
'reference' => '89bfb45bd8b1abc3b37e910d57f5dbd3174f40fb',
'reference' => '2f0b7af658cbea265cbb4a791d6c29a6613f98ef',
),
'symfony/polyfill-ctype' =>
array (
'pretty_version' => 'v1.24.0',
'version' => '1.24.0.0',
'aliases' =>
array (
),
'reference' => '30885182c981ab175d4d034db0f6f469898070ab',
),
'symfony/polyfill-mbstring' =>
array (
'pretty_version' => 'v1.24.0',
'version' => '1.24.0.0',
'pretty_version' => 'v1.26.0',
'version' => '1.26.0.0',
'aliases' =>
array (
),
'reference' => '0abb51d2f102e00a4eefcf46ba7fec406d245825',
'reference' => '6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4',
),
'tiamo/spss' =>
array (
Expand Down
11 changes: 7 additions & 4 deletions third_party/phpseclib/bcmath_compat/composer.json
@@ -1,6 +1,6 @@
{
"name": "phpseclib/bcmath_compat",
"description": "PHP 5.x/7.x polyfill for bcmath extension",
"description": "PHP 5.x-8.x polyfill for bcmath extension",
"keywords": [
"bcmath",
"math",
Expand All @@ -23,10 +23,10 @@
"source": "https://github.com/phpseclib/bcmath_compat"
},
"require": {
"phpseclib/phpseclib": ">=2.0.19"
"phpseclib/phpseclib": "^3.0"
},
"require-dev": {
"phpunit/phpunit": "^4.8.35|^5.7|^6.0",
"phpunit/phpunit": "^4.8.35|^5.7|^6.0|^9.4",
"squizlabs/php_codesniffer": "^3.0"
},
"suggest": {
Expand All @@ -42,5 +42,8 @@
"test": "phpunit",
"check-style": "phpcs src tests",
"fix-style": "phpcbf src tests"
},
"provide": {
"ext-bcmath": "8.1.0"
}
}
}
33 changes: 33 additions & 0 deletions third_party/phpseclib/bcmath_compat/lib/bcmath.php
Expand Up @@ -149,4 +149,37 @@ function bcsub($left_operand, $right_operand, $scale = 0)
{
return BCMath::sub($left_operand, $right_operand, $scale);
}
}

// the following were introduced in PHP 7.0.0
if (!class_exists('Error')) {
class Error extends Exception
{
}

class ArithmeticError extends Error
{
}

class DivisionByZeroError extends ArithmeticError
{
}

class TypeError extends Error
{
}
}

// the following was introduced in PHP 7.1.0
if (!class_exists('ArgumentCountError')) {
class ArgumentCountError extends TypeError
{
}
}

// the following was introduced in PHP 8.0.0
if (!class_exists('ValueError')) {
class ValueError extends Error
{
}
}

0 comments on commit 0364b32

Please sign in to comment.