Update vendorja na produkciji

This commit is contained in:
pero1203 2020-12-05 13:15:18 +01:00
parent 587d9edc7c
commit d4795b021e
249 changed files with 380 additions and 6451 deletions

74
composer.json Normal file
View File

@ -0,0 +1,74 @@
{
"name": "1ka/1ka.si",
"description": "1ka survey",
"type": "project",
"authors": [
{
"name": "Peter Hrvatin",
"role": "Developer"
},
{
"name": "Robert Šmalc",
"email": "robert@1ka.si",
"role": "Developer"
}
],
"require": {
"php": "^5.5|^7.0",
"sonata-project/google-authenticator": "^2.2",
"phpmailer/phpmailer": "~6.0",
"minishlink/web-push": "^5.2",
"stripe/stripe-php": "^7.40",
"geoip2/geoip2": "~2.0",
"paypal/paypal-checkout-sdk": "^1.0"
},
"require-dev": {
"kint-php/kint": "^1.1",
"filp/whoops": "^2.7.3",
"maximebf/debugbar": "^1.16.3",
"symfony/var-dumper": "^v4.4.11"
},
"autoload": {
"psr-4": {
"App\\": "main/survey/app/",
"Hierarhija\\": "admin/survey/modules/mod_hierarhija/"
},
"classmap": [
"admin/survey/",
"frontend/payments/classes/"
],
"files": [
"main/survey/class.EvalvacijaMain.php",
"main/survey/mobile-detect/Mobile_Detect.php",
"admin/survey/classes/phpqrcode/phpqrcode.php",
"admin/survey/classes/htmlpurifier-4.3.0/library/HTMLPurifier.auto.php",
"frontend/api/class.ApiLoginController.php",
"frontend/api/class.ApiLogin.php",
"utils/1kaCron/class.CronJobs.php"
],
"exclude-from-classmap": [
"admin/survey/excel/",
"admin/survey/classes/phpqrcode/",
"admin/survey/export/libs/",
"admin/survey/minify/"
]
},
"scripts": {
"produkcija": [
"composer update -o --no-dev",
"composer dump-autoload --optimize"
],
"dev": [
"composer update",
"composer dump-autoload --optimize",
"sudo rm /opt/lampp/htdocs/sisplet2/admin/survey/minify/cache/*"
]
}
}

79
composer.lock generated
View File

@ -1,9 +1,10 @@
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"hash": "c9fc655cdb58743c38114c03e68c1cc7",
"content-hash": "a150435d7f20bef4fdda8cb6c59eb1a6",
"packages": [
{
@ -60,7 +61,7 @@
"ssl",
"tls"
],
"time": "2020-08-23T12:54:47+00:00"
"time": "2020-08-23 12:54:47"
},
{
"name": "fgrosse/phpasn1",
@ -131,7 +132,7 @@
"x509",
"x690"
],
"time": "2020-10-11T16:28:18+00:00"
"time": "2020-10-11 16:28:18"
},
{
"name": "geoip2/geoip2",
@ -184,7 +185,7 @@
"geolocation",
"maxmind"
],
"time": "2020-10-01T18:48:34+00:00"
"time": "2020-10-01 18:48:34"
},
{
"name": "guzzlehttp/guzzle",
@ -251,7 +252,7 @@
"rest",
"web service"
],
"time": "2020-06-16T21:01:06+00:00"
"time": "2020-06-16 21:01:06"
},
{
"name": "guzzlehttp/promises",
@ -302,7 +303,7 @@
"keywords": [
"promise"
],
"time": "2020-09-30T07:37:28+00:00"
"time": "2020-09-30 07:37:28"
},
{
"name": "guzzlehttp/psr7",
@ -373,7 +374,7 @@
"uri",
"url"
],
"time": "2020-09-30T07:37:11+00:00"
"time": "2020-09-30 07:37:11"
},
{
"name": "maxmind-db/reader",
@ -433,7 +434,7 @@
"geolocation",
"maxmind"
],
"time": "2020-10-01T17:30:21+00:00"
"time": "2020-10-01 17:30:21"
},
{
"name": "maxmind/web-service-common",
@ -479,7 +480,7 @@
],
"description": "Internal MaxMind Web Service API",
"homepage": "https://github.com/maxmind/web-service-common-php",
"time": "2020-11-02T17:00:53+00:00"
"time": "2020-11-02 17:00:53"
},
{
"name": "minishlink/web-push",
@ -535,7 +536,7 @@
"push",
"web"
],
"time": "2020-08-02T08:58:01+00:00"
"time": "2020-08-02 08:58:01"
},
{
"name": "paragonie/random_compat",
@ -580,7 +581,7 @@
"pseudorandom",
"random"
],
"time": "2020-10-15T08:29:30+00:00"
"time": "2020-10-15 08:29:30"
},
{
"name": "paragonie/sodium_compat",
@ -662,7 +663,7 @@
"secret-key cryptography",
"side-channel resistant"
],
"time": "2020-12-03T16:26:19+00:00"
"time": "2020-12-03 16:26:19"
},
{
"name": "paypal/paypal-checkout-sdk",
@ -711,7 +712,7 @@
"rest",
"sdk"
],
"time": "2019-11-07T23:16:44+00:00"
"time": "2019-11-07 23:16:44"
},
{
"name": "paypal/paypalhttp",
@ -750,7 +751,7 @@
"homepage": "https://github.com/paypal/paypalhttp_php/contributors"
}
],
"time": "2019-11-06T21:27:12+00:00"
"time": "2019-11-06 21:27:12"
},
{
"name": "phpmailer/phpmailer",
@ -816,7 +817,7 @@
}
],
"description": "PHPMailer is a full-featured email creation and transfer class for PHP",
"time": "2020-11-25T15:24:57+00:00"
"time": "2020-11-25 15:24:57"
},
{
"name": "psr/http-message",
@ -866,7 +867,7 @@
"request",
"response"
],
"time": "2016-08-06T14:39:51+00:00"
"time": "2016-08-06 14:39:51"
},
{
"name": "ralouphie/getallheaders",
@ -906,7 +907,7 @@
}
],
"description": "A polyfill for getallheaders.",
"time": "2019-03-08T08:55:37+00:00"
"time": "2019-03-08 08:55:37"
},
{
"name": "sonata-project/google-authenticator",
@ -963,7 +964,7 @@
"keywords": [
"google authenticator"
],
"time": "2018-07-18T22:08:02+00:00"
"time": "2018-07-18 22:08:02"
},
{
"name": "spomky-labs/base64url",
@ -1014,7 +1015,7 @@
"safe",
"url"
],
"time": "2020-11-03T09:10:25+00:00"
"time": "2020-11-03 09:10:25"
},
{
"name": "stripe/stripe-php",
@ -1071,7 +1072,7 @@
"payment processing",
"stripe"
],
"time": "2020-12-01T18:44:12+00:00"
"time": "2020-12-01 18:44:12"
},
{
"name": "symfony/polyfill-intl-idn",
@ -1141,7 +1142,7 @@
"portable",
"shim"
],
"time": "2020-10-23T14:02:19+00:00"
"time": "2020-10-23 14:02:19"
},
{
"name": "symfony/polyfill-intl-normalizer",
@ -1208,7 +1209,7 @@
"portable",
"shim"
],
"time": "2020-10-23T14:02:19+00:00"
"time": "2020-10-23 14:02:19"
},
{
"name": "symfony/polyfill-php72",
@ -1267,7 +1268,7 @@
"portable",
"shim"
],
"time": "2020-10-23T14:02:19+00:00"
"time": "2020-10-23 14:02:19"
},
{
"name": "web-token/jwt-core",
@ -1342,7 +1343,7 @@
"jwt",
"symfony"
],
"time": "2020-03-20T13:29:04+00:00"
"time": "2020-03-20 13:29:04"
},
{
"name": "web-token/jwt-key-mgmt",
@ -1419,7 +1420,7 @@
"jwt",
"symfony"
],
"time": "2020-03-20T13:29:04+00:00"
"time": "2020-03-20 13:29:04"
},
{
"name": "web-token/jwt-signature",
@ -1499,7 +1500,7 @@
"jwt",
"symfony"
],
"time": "2020-03-20T13:29:04+00:00"
"time": "2020-03-20 13:29:04"
},
{
"name": "web-token/jwt-signature-algorithm-ecdsa",
@ -1566,7 +1567,7 @@
"jwt",
"symfony"
],
"time": "2020-03-20T13:29:04+00:00"
"time": "2020-03-20 13:29:04"
},
{
"name": "web-token/jwt-signature-algorithm-eddsa",
@ -1633,7 +1634,7 @@
"jwt",
"symfony"
],
"time": "2020-03-20T13:29:04+00:00"
"time": "2020-03-20 13:29:04"
},
{
"name": "web-token/jwt-signature-algorithm-hmac",
@ -1700,7 +1701,7 @@
"jwt",
"symfony"
],
"time": "2020-03-20T13:29:04+00:00"
"time": "2020-03-20 13:29:04"
},
{
"name": "web-token/jwt-signature-algorithm-none",
@ -1767,7 +1768,7 @@
"jwt",
"symfony"
],
"time": "2020-03-20T13:29:04+00:00"
"time": "2020-03-20 13:29:04"
},
{
"name": "web-token/jwt-signature-algorithm-rsa",
@ -1834,7 +1835,7 @@
"jwt",
"symfony"
],
"time": "2020-03-20T13:29:04+00:00"
"time": "2020-03-20 13:29:04"
},
{
"name": "web-token/jwt-util-ecc",
@ -1903,7 +1904,7 @@
"jwt",
"symfony"
],
"time": "2020-03-20T13:29:04+00:00"
"time": "2020-03-20 13:29:04"
}
],
"packages-dev": [
@ -1966,7 +1967,7 @@
"throwable",
"whoops"
],
"time": "2020-11-01T12:00:00+00:00"
"time": "2020-11-01 12:00:00"
},
{
"name": "kint-php/kint",
@ -2017,7 +2018,7 @@
"kint",
"php"
],
"time": "2017-01-15T14:23:43+00:00"
"time": "2017-01-15 14:23:43"
},
{
"name": "maximebf/debugbar",
@ -2078,7 +2079,7 @@
"debug",
"debugbar"
],
"time": "2020-05-06T07:06:27+00:00"
"time": "2020-05-06 07:06:27"
},
{
"name": "psr/log",
@ -2125,7 +2126,7 @@
"psr",
"psr-3"
],
"time": "2020-03-23T09:12:05+00:00"
"time": "2020-03-23 09:12:05"
},
{
"name": "symfony/polyfill-mbstring",
@ -2188,7 +2189,7 @@
"portable",
"shim"
],
"time": "2020-10-23T14:02:19+00:00"
"time": "2020-10-23 14:02:19"
},
{
"name": "symfony/polyfill-php80",
@ -2254,7 +2255,7 @@
"portable",
"shim"
],
"time": "2020-10-23T14:02:19+00:00"
"time": "2020-10-23 14:02:19"
},
{
"name": "symfony/var-dumper",
@ -2326,7 +2327,7 @@
"debug",
"dump"
],
"time": "2020-11-24T09:55:37+00:00"
"time": "2020-11-24 09:55:37"
}
],
"aliases": [],

8
vendor/autoload.php vendored
View File

@ -2,12 +2,6 @@
// autoload.php @generated by Composer
<<<<<<< HEAD
require_once __DIR__ . '/composer' . '/autoload_real.php';
return ComposerAutoloaderInit817d358f3360c5248956ccfb4ef6d09a::getLoader();
=======
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit0d06eb1022200eb96b7e4bb652ca3996::getLoader();
>>>>>>> master
return ComposerAutoloaderInitb0a52c7015cc9c3d61646c8d77ee92c4::getLoader();

View File

@ -53,14 +53,8 @@ class ClassLoader
private $useIncludePath = false;
private $classMap = array();
<<<<<<< HEAD
private $classMapAuthoritative = false;
=======
private $classMapAuthoritative = false;
private $missingClasses = array();
private $apcuPrefix;
>>>>>>> master
public function getPrefixes()
{
@ -278,29 +272,6 @@ class ClassLoader
}
/**
<<<<<<< HEAD
=======
* APCu prefix to use to cache found/not-found classes, if the extension is enabled.
*
* @param string|null $apcuPrefix
*/
public function setApcuPrefix($apcuPrefix)
{
$this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
}
/**
* The APCu prefix in use, or null if APCu caching is not enabled.
*
* @return string|null
*/
public function getApcuPrefix()
{
return $this->apcuPrefix;
}
/**
>>>>>>> master
* Registers this instance as an autoloader.
*
* @param bool $prepend Whether to prepend the autoloader or not
@ -342,38 +313,22 @@ class ClassLoader
*/
public function findFile($class)
{
<<<<<<< HEAD
// work around for PHP 5.3.0 - 5.3.2 https://bugs.php.net/50731
if ('\\' == $class[0]) {
$class = substr($class, 1);
}
=======
>>>>>>> master
// class map lookup
if (isset($this->classMap[$class])) {
return $this->classMap[$class];
}
<<<<<<< HEAD
if ($this->classMapAuthoritative) {
return false;
}
=======
if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
return false;
}
if (null !== $this->apcuPrefix) {
$file = apcu_fetch($this->apcuPrefix.$class, $hit);
if ($hit) {
return $file;
}
}
>>>>>>> master
$file = $this->findFileWithExtension($class, '.php');
// Search for Hack files if we are running on HHVM
<<<<<<< HEAD
if ($file === null && defined('HHVM_VERSION')) {
$file = $this->findFileWithExtension($class, '.hh');
}
@ -381,19 +336,6 @@ class ClassLoader
if ($file === null) {
// Remember that this class does not exist.
return $this->classMap[$class] = false;
=======
if (false === $file && defined('HHVM_VERSION')) {
$file = $this->findFileWithExtension($class, '.hh');
}
if (null !== $this->apcuPrefix) {
apcu_add($this->apcuPrefix.$class, $file);
}
if (false === $file) {
// Remember that this class does not exist.
$this->missingClasses[$class] = true;
>>>>>>> master
}
return $file;
@ -406,21 +348,10 @@ class ClassLoader
$first = $class[0];
if (isset($this->prefixLengthsPsr4[$first])) {
<<<<<<< HEAD
foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) {
if (0 === strpos($class, $prefix)) {
foreach ($this->prefixDirsPsr4[$prefix] as $dir) {
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
=======
$subPath = $class;
while (false !== $lastPos = strrpos($subPath, '\\')) {
$subPath = substr($subPath, 0, $lastPos);
$search = $subPath . '\\';
if (isset($this->prefixDirsPsr4[$search])) {
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
foreach ($this->prefixDirsPsr4[$search] as $dir) {
if (file_exists($file = $dir . $pathEnd)) {
>>>>>>> master
return $file;
}
}
@ -468,11 +399,6 @@ class ClassLoader
if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
return $file;
}
<<<<<<< HEAD
=======
return false;
>>>>>>> master
}
}

View File

@ -1,9 +1,5 @@
<<<<<<< HEAD
Copyright (c) 2016 Nils Adermann, Jordi Boggiano
=======
Copyright (c) Nils Adermann, Jordi Boggiano
>>>>>>> master
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -54,18 +54,10 @@ return array(
'App\\Controllers\\Vprasanja\\TextController' => $baseDir . '/main/survey/app/Controllers/Vprasanja/TextController.php',
'App\\Controllers\\Vprasanja\\VprasanjaController' => $baseDir . '/main/survey/app/Controllers/Vprasanja/VprasanjaController.php',
'App\\Controllers\\Vprasanja\\VsotaController' => $baseDir . '/main/survey/app/Controllers/Vprasanja/VsotaController.php',
<<<<<<< HEAD
'App\\Controllers\\Vprasanja\\in' => $baseDir . '/main/survey/app/Controllers/Vprasanja/MultigridController.php',
'App\\Models\\Model' => $baseDir . '/main/survey/app/Models/Model.php',
'App\\Models\\SaveSurvey' => $baseDir . '/main/survey/app/Models/SaveSurvey.php',
'App\\Models\\User' => $baseDir . '/main/survey/app/Models/User.php',
'ArithmeticError' => $vendorDir . '/symfony/polyfill-php70/Resources/stubs/ArithmeticError.php',
'AssertionError' => $vendorDir . '/symfony/polyfill-php70/Resources/stubs/AssertionError.php',
=======
'App\\Models\\Model' => $baseDir . '/main/survey/app/Models/Model.php',
'App\\Models\\SaveSurvey' => $baseDir . '/main/survey/app/Models/SaveSurvey.php',
'App\\Models\\User' => $baseDir . '/main/survey/app/Models/User.php',
>>>>>>> master
'Base64Url\\Base64Url' => $vendorDir . '/spomky-labs/base64url/src/Base64Url.php',
'BesediloLatex' => $baseDir . '/admin/survey/export/latexclasses/Vprasanja/BesediloLatex.php',
'BesediloXml' => $baseDir . '/admin/survey/export/xmlClasses/Vprasanja/BesediloXml.php',
@ -73,22 +65,12 @@ return array(
'BranchingAjax' => $baseDir . '/admin/survey/BranchingAjax.php',
'Cache' => $baseDir . '/admin/survey/classes/class.Cache.php',
'CheckboxXml' => $baseDir . '/admin/survey/export/xmlClasses/Vprasanja/CheckboxXml.php',
<<<<<<< HEAD
'CollectIncrementalData' => $baseDir . '/admin/survey/classes/surveyData/old/class.CollectIncrementalData.php',
=======
>>>>>>> master
'Common' => $baseDir . '/admin/survey/classes/class.Common.php',
'Composer\\CaBundle\\CaBundle' => $vendorDir . '/composer/ca-bundle/src/CaBundle.php',
'CrossRoad' => $baseDir . '/admin/survey/classes/CrossRoad.php',
'DatumLatex' => $baseDir . '/admin/survey/export/latexclasses/Vprasanja/DatumLatex.php',
'Demografija' => $baseDir . '/admin/survey/classes/class.Demografija.php',
<<<<<<< HEAD
'DivisionByZeroError' => $vendorDir . '/symfony/polyfill-php70/Resources/stubs/DivisionByZeroError.php',
'Dostop' => $baseDir . '/admin/survey/classes/class.Dostop.php',
'Error' => $vendorDir . '/symfony/polyfill-php70/Resources/stubs/Error.php',
=======
'Dostop' => $baseDir . '/admin/survey/classes/class.Dostop.php',
>>>>>>> master
'Evalvacija' => $baseDir . '/admin/survey/modules/Evalvacija/class.Evalvacija.php',
'EvoliForm' => $baseDir . '/admin/survey/modules/mod_EVOLI/class.EvoliForm.php',
'ExclusiveLock' => $baseDir . '/admin/survey/classes/surveyData/class.ExclusiveLock.php',
@ -219,16 +201,11 @@ return array(
'GuzzleHttp\\Promise\\AggregateException' => $vendorDir . '/guzzlehttp/promises/src/AggregateException.php',
'GuzzleHttp\\Promise\\CancellationException' => $vendorDir . '/guzzlehttp/promises/src/CancellationException.php',
'GuzzleHttp\\Promise\\Coroutine' => $vendorDir . '/guzzlehttp/promises/src/Coroutine.php',
<<<<<<< HEAD
'GuzzleHttp\\Promise\\EachPromise' => $vendorDir . '/guzzlehttp/promises/src/EachPromise.php',
'GuzzleHttp\\Promise\\FulfilledPromise' => $vendorDir . '/guzzlehttp/promises/src/FulfilledPromise.php',
=======
'GuzzleHttp\\Promise\\Create' => $vendorDir . '/guzzlehttp/promises/src/Create.php',
'GuzzleHttp\\Promise\\Each' => $vendorDir . '/guzzlehttp/promises/src/Each.php',
'GuzzleHttp\\Promise\\EachPromise' => $vendorDir . '/guzzlehttp/promises/src/EachPromise.php',
'GuzzleHttp\\Promise\\FulfilledPromise' => $vendorDir . '/guzzlehttp/promises/src/FulfilledPromise.php',
'GuzzleHttp\\Promise\\Is' => $vendorDir . '/guzzlehttp/promises/src/Is.php',
>>>>>>> master
'GuzzleHttp\\Promise\\Promise' => $vendorDir . '/guzzlehttp/promises/src/Promise.php',
'GuzzleHttp\\Promise\\PromiseInterface' => $vendorDir . '/guzzlehttp/promises/src/PromiseInterface.php',
'GuzzleHttp\\Promise\\PromisorInterface' => $vendorDir . '/guzzlehttp/promises/src/PromisorInterface.php',
@ -236,24 +213,12 @@ return array(
'GuzzleHttp\\Promise\\RejectionException' => $vendorDir . '/guzzlehttp/promises/src/RejectionException.php',
'GuzzleHttp\\Promise\\TaskQueue' => $vendorDir . '/guzzlehttp/promises/src/TaskQueue.php',
'GuzzleHttp\\Promise\\TaskQueueInterface' => $vendorDir . '/guzzlehttp/promises/src/TaskQueueInterface.php',
<<<<<<< HEAD
=======
'GuzzleHttp\\Promise\\Utils' => $vendorDir . '/guzzlehttp/promises/src/Utils.php',
>>>>>>> master
'GuzzleHttp\\Psr7\\AppendStream' => $vendorDir . '/guzzlehttp/psr7/src/AppendStream.php',
'GuzzleHttp\\Psr7\\BufferStream' => $vendorDir . '/guzzlehttp/psr7/src/BufferStream.php',
'GuzzleHttp\\Psr7\\CachingStream' => $vendorDir . '/guzzlehttp/psr7/src/CachingStream.php',
'GuzzleHttp\\Psr7\\DroppingStream' => $vendorDir . '/guzzlehttp/psr7/src/DroppingStream.php',
'GuzzleHttp\\Psr7\\FnStream' => $vendorDir . '/guzzlehttp/psr7/src/FnStream.php',
<<<<<<< HEAD
'GuzzleHttp\\Psr7\\InflateStream' => $vendorDir . '/guzzlehttp/psr7/src/InflateStream.php',
'GuzzleHttp\\Psr7\\LazyOpenStream' => $vendorDir . '/guzzlehttp/psr7/src/LazyOpenStream.php',
'GuzzleHttp\\Psr7\\LimitStream' => $vendorDir . '/guzzlehttp/psr7/src/LimitStream.php',
'GuzzleHttp\\Psr7\\MessageTrait' => $vendorDir . '/guzzlehttp/psr7/src/MessageTrait.php',
'GuzzleHttp\\Psr7\\MultipartStream' => $vendorDir . '/guzzlehttp/psr7/src/MultipartStream.php',
'GuzzleHttp\\Psr7\\NoSeekStream' => $vendorDir . '/guzzlehttp/psr7/src/NoSeekStream.php',
'GuzzleHttp\\Psr7\\PumpStream' => $vendorDir . '/guzzlehttp/psr7/src/PumpStream.php',
=======
'GuzzleHttp\\Psr7\\Header' => $vendorDir . '/guzzlehttp/psr7/src/Header.php',
'GuzzleHttp\\Psr7\\InflateStream' => $vendorDir . '/guzzlehttp/psr7/src/InflateStream.php',
'GuzzleHttp\\Psr7\\LazyOpenStream' => $vendorDir . '/guzzlehttp/psr7/src/LazyOpenStream.php',
@ -265,7 +230,6 @@ return array(
'GuzzleHttp\\Psr7\\NoSeekStream' => $vendorDir . '/guzzlehttp/psr7/src/NoSeekStream.php',
'GuzzleHttp\\Psr7\\PumpStream' => $vendorDir . '/guzzlehttp/psr7/src/PumpStream.php',
'GuzzleHttp\\Psr7\\Query' => $vendorDir . '/guzzlehttp/psr7/src/Query.php',
>>>>>>> master
'GuzzleHttp\\Psr7\\Request' => $vendorDir . '/guzzlehttp/psr7/src/Request.php',
'GuzzleHttp\\Psr7\\Response' => $vendorDir . '/guzzlehttp/psr7/src/Response.php',
'GuzzleHttp\\Psr7\\Rfc7230' => $vendorDir . '/guzzlehttp/psr7/src/Rfc7230.php',
@ -277,10 +241,7 @@ return array(
'GuzzleHttp\\Psr7\\Uri' => $vendorDir . '/guzzlehttp/psr7/src/Uri.php',
'GuzzleHttp\\Psr7\\UriNormalizer' => $vendorDir . '/guzzlehttp/psr7/src/UriNormalizer.php',
'GuzzleHttp\\Psr7\\UriResolver' => $vendorDir . '/guzzlehttp/psr7/src/UriResolver.php',
<<<<<<< HEAD
=======
'GuzzleHttp\\Psr7\\Utils' => $vendorDir . '/guzzlehttp/psr7/src/Utils.php',
>>>>>>> master
'GuzzleHttp\\RedirectMiddleware' => $vendorDir . '/guzzlehttp/guzzle/src/RedirectMiddleware.php',
'GuzzleHttp\\RequestOptions' => $vendorDir . '/guzzlehttp/guzzle/src/RequestOptions.php',
'GuzzleHttp\\RetryMiddleware' => $vendorDir . '/guzzlehttp/guzzle/src/RetryMiddleware.php',
@ -649,10 +610,6 @@ return array(
'PHPMailer\\PHPMailer\\PHPMailer' => $vendorDir . '/phpmailer/phpmailer/src/PHPMailer.php',
'PHPMailer\\PHPMailer\\POP3' => $vendorDir . '/phpmailer/phpmailer/src/POP3.php',
'PHPMailer\\PHPMailer\\SMTP' => $vendorDir . '/phpmailer/phpmailer/src/SMTP.php',
<<<<<<< HEAD
'ParseError' => $vendorDir . '/symfony/polyfill-php70/Resources/stubs/ParseError.php',
=======
>>>>>>> master
'PayPalCheckoutSdk\\Core\\AccessToken' => $vendorDir . '/paypal/paypal-checkout-sdk/lib/PayPalCheckoutSdk/Core/AccessToken.php',
'PayPalCheckoutSdk\\Core\\AccessTokenRequest' => $vendorDir . '/paypal/paypal-checkout-sdk/lib/PayPalCheckoutSdk/Core/AccessTokenRequest.php',
'PayPalCheckoutSdk\\Core\\AuthorizationInjector' => $vendorDir . '/paypal/paypal-checkout-sdk/lib/PayPalCheckoutSdk/Core/AuthorizationInjector.php',
@ -719,10 +676,6 @@ return array(
'Sample\\PatchOrder' => $vendorDir . '/paypal/paypal-checkout-sdk/samples/PatchOrder.php',
'Sample\\PayPalClient' => $vendorDir . '/paypal/paypal-checkout-sdk/samples/PayPalClient.php',
'Sample\\RefundOrder' => $vendorDir . '/paypal/paypal-checkout-sdk/samples/RefundOrder.php',
<<<<<<< HEAD
'SessionUpdateTimestampHandlerInterface' => $vendorDir . '/symfony/polyfill-php70/Resources/stubs/SessionUpdateTimestampHandlerInterface.php',
=======
>>>>>>> master
'Setting' => $baseDir . '/admin/survey/classes/class.Setting.php',
'Sonata\\GoogleAuthenticator\\FixedBitNotation' => $vendorDir . '/sonata-project/google-authenticator/src/FixedBitNotation.php',
'Sonata\\GoogleAuthenticator\\GoogleAuthenticator' => $vendorDir . '/sonata-project/google-authenticator/src/GoogleAuthenticator.php',
@ -887,10 +840,7 @@ return array(
'Stripe\\Service\\Reporting\\ReportTypeService' => $vendorDir . '/stripe/stripe-php/lib/Service/Reporting/ReportTypeService.php',
'Stripe\\Service\\Reporting\\ReportingServiceFactory' => $vendorDir . '/stripe/stripe-php/lib/Service/Reporting/ReportingServiceFactory.php',
'Stripe\\Service\\ReviewService' => $vendorDir . '/stripe/stripe-php/lib/Service/ReviewService.php',
<<<<<<< HEAD
=======
'Stripe\\Service\\SetupAttemptService' => $vendorDir . '/stripe/stripe-php/lib/Service/SetupAttemptService.php',
>>>>>>> master
'Stripe\\Service\\SetupIntentService' => $vendorDir . '/stripe/stripe-php/lib/Service/SetupIntentService.php',
'Stripe\\Service\\Sigma\\ScheduledQueryRunService' => $vendorDir . '/stripe/stripe-php/lib/Service/Sigma/ScheduledQueryRunService.php',
'Stripe\\Service\\Sigma\\SigmaServiceFactory' => $vendorDir . '/stripe/stripe-php/lib/Service/Sigma/SigmaServiceFactory.php',
@ -908,10 +858,7 @@ return array(
'Stripe\\Service\\TopupService' => $vendorDir . '/stripe/stripe-php/lib/Service/TopupService.php',
'Stripe\\Service\\TransferService' => $vendorDir . '/stripe/stripe-php/lib/Service/TransferService.php',
'Stripe\\Service\\WebhookEndpointService' => $vendorDir . '/stripe/stripe-php/lib/Service/WebhookEndpointService.php',
<<<<<<< HEAD
=======
'Stripe\\SetupAttempt' => $vendorDir . '/stripe/stripe-php/lib/SetupAttempt.php',
>>>>>>> master
'Stripe\\SetupIntent' => $vendorDir . '/stripe/stripe-php/lib/SetupIntent.php',
'Stripe\\Sigma\\ScheduledQueryRun' => $vendorDir . '/stripe/stripe-php/lib/Sigma/ScheduledQueryRun.php',
'Stripe\\SingletonApiResource' => $vendorDir . '/stripe/stripe-php/lib/SingletonApiResource.php',
@ -980,10 +927,6 @@ return array(
'SurveyDataFile' => $baseDir . '/admin/survey/classes/surveyData/class.SurveyDataFile.php',
'SurveyDataSettingProfiles' => $baseDir . '/admin/survey/classes/class.SurveyDataSettingProfiles.php',
'SurveyDiagnostics' => $baseDir . '/admin/survey/classes/class.SurveyDiagnostics.php',
<<<<<<< HEAD
'SurveyDisplayData' => $baseDir . '/admin/survey/classes/surveyData/old/class.SurveyDisplayData.php',
=======
>>>>>>> master
'SurveyEditsAnalysis' => $baseDir . '/admin/survey/classes/class.SurveyEditsAnalysis.php',
'SurveyEmployMeter' => $baseDir . '/admin/survey/modules/mod_EVOLI/class.SurveyEmployMeter.php',
'SurveyEvoli' => $baseDir . '/admin/survey/modules/mod_EVOLI/class.SurveyEvoli.php',
@ -1024,10 +967,6 @@ return array(
'SurveyRecoding' => $baseDir . '/admin/survey/classes/class.SurveyRecoding.php',
'SurveyReminderTracking' => $baseDir . '/admin/survey/classes/class.SurveyReminderTracking.php',
'SurveyRespondents' => $baseDir . '/admin/survey/classes/class.SurveyRespondents.php',
<<<<<<< HEAD
'SurveySNDataFile' => $baseDir . '/admin/survey/classes/surveyData/old/class.SurveySNDataFile.php',
=======
>>>>>>> master
'SurveySession' => $baseDir . '/admin/survey/classes/class.SurveySession.php',
'SurveySessionDestructor' => $baseDir . '/admin/survey/classes/class.SurveySession.php',
'SurveySetting' => $baseDir . '/admin/survey/classes/class.SurveySetting.php',
@ -1048,10 +987,6 @@ return array(
'SurveyTheme' => $baseDir . '/admin/survey/classes/class.SurveyTheme.php',
'SurveyThemeEditor' => $baseDir . '/admin/survey/classes/class.SurveyThemeEditor.php',
'SurveyTimeProfiles' => $baseDir . '/admin/survey/classes/class.SurveyTimeProfiles.php',
<<<<<<< HEAD
'SurveyTrackIncremental' => $baseDir . '/admin/survey/classes/surveyData/old/class.SurveyTrackIncremental.php',
=======
>>>>>>> master
'SurveyUnsubscribe' => $baseDir . '/admin/survey/classes/class.SurveyUnsubscribe.php',
'SurveyUporabnost' => $baseDir . '/admin/survey/modules/mod_uporabnost/class.SurveyUporabnost.php',
'SurveyUrlLinks' => $baseDir . '/admin/survey/classes/class.SurveyUrlLinks.php',
@ -1068,17 +1003,9 @@ return array(
'Symfony\\Polyfill\\Intl\\Idn\\Resources\\unidata\\DisallowedRanges' => $vendorDir . '/symfony/polyfill-intl-idn/Resources/unidata/DisallowedRanges.php',
'Symfony\\Polyfill\\Intl\\Idn\\Resources\\unidata\\Regex' => $vendorDir . '/symfony/polyfill-intl-idn/Resources/unidata/Regex.php',
'Symfony\\Polyfill\\Intl\\Normalizer\\Normalizer' => $vendorDir . '/symfony/polyfill-intl-normalizer/Normalizer.php',
<<<<<<< HEAD
'Symfony\\Polyfill\\Php70\\Php70' => $vendorDir . '/symfony/polyfill-php70/Php70.php',
'Symfony\\Polyfill\\Php72\\Php72' => $vendorDir . '/symfony/polyfill-php72/Php72.php',
'Timer' => $baseDir . '/admin/survey/classes/class.Timer.php',
'TrackingClass' => $baseDir . '/admin/survey/classes/TrackingClass.php',
'TypeError' => $vendorDir . '/symfony/polyfill-php70/Resources/stubs/TypeError.php',
=======
'Symfony\\Polyfill\\Php72\\Php72' => $vendorDir . '/symfony/polyfill-php72/Php72.php',
'Timer' => $baseDir . '/admin/survey/classes/class.Timer.php',
'TrackingClass' => $baseDir . '/admin/survey/classes/TrackingClass.php',
>>>>>>> master
'User' => $baseDir . '/admin/survey/classes/class.User.php',
'UserAccess' => $baseDir . '/frontend/payments/classes/class.UserAccess.php',
'UserNarocila' => $baseDir . '/frontend/payments/classes/class.UserNarocila.php',

View File

@ -6,21 +6,12 @@ $vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
'25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/bootstrap.php',
'7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php',
<<<<<<< HEAD
'25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/bootstrap.php',
'023d27dca8066ef29e6739335ea73bad' => $vendorDir . '/symfony/polyfill-php70/bootstrap.php',
'e69f7f6ee287b969198c3c9d6777bd38' => $vendorDir . '/symfony/polyfill-intl-normalizer/bootstrap.php',
'3109cb1a231dcd04bee1f9f620d46975' => $vendorDir . '/paragonie/sodium_compat/autoload.php',
'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php',
'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php',
=======
'e69f7f6ee287b969198c3c9d6777bd38' => $vendorDir . '/symfony/polyfill-intl-normalizer/bootstrap.php',
'25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/bootstrap.php',
'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php',
'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php',
'3109cb1a231dcd04bee1f9f620d46975' => $vendorDir . '/paragonie/sodium_compat/autoload.php',
>>>>>>> master
'f598d06aa772fa33d905e87be6398fb1' => $vendorDir . '/symfony/polyfill-intl-idn/bootstrap.php',
'37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
'2bf0564df058fbe21b5554296cc8571a' => $baseDir . '/main/survey/class.EvalvacijaMain.php',

View File

@ -7,10 +7,6 @@ $baseDir = dirname($vendorDir);
return array(
'Symfony\\Polyfill\\Php72\\' => array($vendorDir . '/symfony/polyfill-php72'),
<<<<<<< HEAD
'Symfony\\Polyfill\\Php70\\' => array($vendorDir . '/symfony/polyfill-php70'),
=======
>>>>>>> master
'Symfony\\Polyfill\\Intl\\Normalizer\\' => array($vendorDir . '/symfony/polyfill-intl-normalizer'),
'Symfony\\Polyfill\\Intl\\Idn\\' => array($vendorDir . '/symfony/polyfill-intl-idn'),
'Stripe\\' => array($vendorDir . '/stripe/stripe-php/lib'),
@ -24,11 +20,7 @@ return array(
'MaxMind\\WebService\\' => array($vendorDir . '/maxmind/web-service-common/src/WebService'),
'MaxMind\\Exception\\' => array($vendorDir . '/maxmind/web-service-common/src/Exception'),
'MaxMind\\Db\\' => array($vendorDir . '/maxmind-db/reader/src/MaxMind/Db'),
<<<<<<< HEAD
'Jose\\Component\\Signature\\Algorithm\\' => array($vendorDir . '/web-token/jwt-signature-algorithm-rsa', $vendorDir . '/web-token/jwt-signature-algorithm-none', $vendorDir . '/web-token/jwt-signature-algorithm-hmac', $vendorDir . '/web-token/jwt-signature-algorithm-eddsa', $vendorDir . '/web-token/jwt-signature-algorithm-ecdsa'),
=======
'Jose\\Component\\Signature\\Algorithm\\' => array($vendorDir . '/web-token/jwt-signature-algorithm-ecdsa', $vendorDir . '/web-token/jwt-signature-algorithm-eddsa', $vendorDir . '/web-token/jwt-signature-algorithm-hmac', $vendorDir . '/web-token/jwt-signature-algorithm-none', $vendorDir . '/web-token/jwt-signature-algorithm-rsa'),
>>>>>>> master
'Jose\\Component\\Signature\\' => array($vendorDir . '/web-token/jwt-signature'),
'Jose\\Component\\KeyManagement\\' => array($vendorDir . '/web-token/jwt-key-mgmt'),
'Jose\\Component\\Core\\Util\\Ecc\\' => array($vendorDir . '/web-token/jwt-util-ecc'),

View File

@ -2,11 +2,7 @@
// autoload_real.php @generated by Composer
<<<<<<< HEAD
class ComposerAutoloaderInit817d358f3360c5248956ccfb4ef6d09a
=======
class ComposerAutoloaderInit0d06eb1022200eb96b7e4bb652ca3996
>>>>>>> master
class ComposerAutoloaderInitb0a52c7015cc9c3d61646c8d77ee92c4
{
private static $loader;
@ -23,27 +19,15 @@ class ComposerAutoloaderInit0d06eb1022200eb96b7e4bb652ca3996
return self::$loader;
}
<<<<<<< HEAD
spl_autoload_register(array('ComposerAutoloaderInit817d358f3360c5248956ccfb4ef6d09a', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInitb0a52c7015cc9c3d61646c8d77ee92c4', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInit817d358f3360c5248956ccfb4ef6d09a', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInitb0a52c7015cc9c3d61646c8d77ee92c4', 'loadClassLoader'));
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION');
if ($useStaticLoader) {
require_once __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit817d358f3360c5248956ccfb4ef6d09a::getInitializer($loader));
=======
spl_autoload_register(array('ComposerAutoloaderInit0d06eb1022200eb96b7e4bb652ca3996', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInit0d06eb1022200eb96b7e4bb652ca3996', 'loadClassLoader'));
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) {
require_once __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit0d06eb1022200eb96b7e4bb652ca3996::getInitializer($loader));
>>>>>>> master
call_user_func(\Composer\Autoload\ComposerStaticInitb0a52c7015cc9c3d61646c8d77ee92c4::getInitializer($loader));
} else {
$map = require __DIR__ . '/autoload_namespaces.php';
foreach ($map as $namespace => $path) {
@ -64,31 +48,19 @@ class ComposerAutoloaderInit0d06eb1022200eb96b7e4bb652ca3996
$loader->register(true);
if ($useStaticLoader) {
<<<<<<< HEAD
$includeFiles = Composer\Autoload\ComposerStaticInit817d358f3360c5248956ccfb4ef6d09a::$files;
=======
$includeFiles = Composer\Autoload\ComposerStaticInit0d06eb1022200eb96b7e4bb652ca3996::$files;
>>>>>>> master
$includeFiles = Composer\Autoload\ComposerStaticInitb0a52c7015cc9c3d61646c8d77ee92c4::$files;
} else {
$includeFiles = require __DIR__ . '/autoload_files.php';
}
foreach ($includeFiles as $fileIdentifier => $file) {
<<<<<<< HEAD
composerRequire817d358f3360c5248956ccfb4ef6d09a($fileIdentifier, $file);
=======
composerRequire0d06eb1022200eb96b7e4bb652ca3996($fileIdentifier, $file);
>>>>>>> master
composerRequireb0a52c7015cc9c3d61646c8d77ee92c4($fileIdentifier, $file);
}
return $loader;
}
}
<<<<<<< HEAD
function composerRequire817d358f3360c5248956ccfb4ef6d09a($fileIdentifier, $file)
=======
function composerRequire0d06eb1022200eb96b7e4bb652ca3996($fileIdentifier, $file)
>>>>>>> master
function composerRequireb0a52c7015cc9c3d61646c8d77ee92c4($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
require $file;

View File

@ -4,28 +4,15 @@
namespace Composer\Autoload;
<<<<<<< HEAD
class ComposerStaticInit817d358f3360c5248956ccfb4ef6d09a
class ComposerStaticInitb0a52c7015cc9c3d61646c8d77ee92c4
{
public static $files = array (
'7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
'25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php',
'023d27dca8066ef29e6739335ea73bad' => __DIR__ . '/..' . '/symfony/polyfill-php70/bootstrap.php',
'7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
'e69f7f6ee287b969198c3c9d6777bd38' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/bootstrap.php',
'3109cb1a231dcd04bee1f9f620d46975' => __DIR__ . '/..' . '/paragonie/sodium_compat/autoload.php',
'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php',
'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php',
=======
class ComposerStaticInit0d06eb1022200eb96b7e4bb652ca3996
{
public static $files = array (
'7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
'e69f7f6ee287b969198c3c9d6777bd38' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/bootstrap.php',
'25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php',
'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php',
'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php',
'3109cb1a231dcd04bee1f9f620d46975' => __DIR__ . '/..' . '/paragonie/sodium_compat/autoload.php',
>>>>>>> master
'f598d06aa772fa33d905e87be6398fb1' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/bootstrap.php',
'37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php',
'2bf0564df058fbe21b5554296cc8571a' => __DIR__ . '/../..' . '/main/survey/class.EvalvacijaMain.php',
@ -41,10 +28,6 @@ class ComposerStaticInit0d06eb1022200eb96b7e4bb652ca3996
'S' =>
array (
'Symfony\\Polyfill\\Php72\\' => 23,
<<<<<<< HEAD
'Symfony\\Polyfill\\Php70\\' => 23,
=======
>>>>>>> master
'Symfony\\Polyfill\\Intl\\Normalizer\\' => 33,
'Symfony\\Polyfill\\Intl\\Idn\\' => 26,
'Stripe\\' => 7,
@ -108,13 +91,6 @@ class ComposerStaticInit0d06eb1022200eb96b7e4bb652ca3996
array (
0 => __DIR__ . '/..' . '/symfony/polyfill-php72',
),
<<<<<<< HEAD
'Symfony\\Polyfill\\Php70\\' =>
array (
0 => __DIR__ . '/..' . '/symfony/polyfill-php70',
),
=======
>>>>>>> master
'Symfony\\Polyfill\\Intl\\Normalizer\\' =>
array (
0 => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer',
@ -169,19 +145,11 @@ class ComposerStaticInit0d06eb1022200eb96b7e4bb652ca3996
),
'Jose\\Component\\Signature\\Algorithm\\' =>
array (
<<<<<<< HEAD
0 => __DIR__ . '/..' . '/web-token/jwt-signature-algorithm-rsa',
1 => __DIR__ . '/..' . '/web-token/jwt-signature-algorithm-none',
2 => __DIR__ . '/..' . '/web-token/jwt-signature-algorithm-hmac',
3 => __DIR__ . '/..' . '/web-token/jwt-signature-algorithm-eddsa',
4 => __DIR__ . '/..' . '/web-token/jwt-signature-algorithm-ecdsa',
=======
0 => __DIR__ . '/..' . '/web-token/jwt-signature-algorithm-ecdsa',
1 => __DIR__ . '/..' . '/web-token/jwt-signature-algorithm-eddsa',
2 => __DIR__ . '/..' . '/web-token/jwt-signature-algorithm-hmac',
3 => __DIR__ . '/..' . '/web-token/jwt-signature-algorithm-none',
4 => __DIR__ . '/..' . '/web-token/jwt-signature-algorithm-rsa',
>>>>>>> master
),
'Jose\\Component\\Signature\\' =>
array (
@ -290,18 +258,10 @@ class ComposerStaticInit0d06eb1022200eb96b7e4bb652ca3996
'App\\Controllers\\Vprasanja\\TextController' => __DIR__ . '/../..' . '/main/survey/app/Controllers/Vprasanja/TextController.php',
'App\\Controllers\\Vprasanja\\VprasanjaController' => __DIR__ . '/../..' . '/main/survey/app/Controllers/Vprasanja/VprasanjaController.php',
'App\\Controllers\\Vprasanja\\VsotaController' => __DIR__ . '/../..' . '/main/survey/app/Controllers/Vprasanja/VsotaController.php',
<<<<<<< HEAD
'App\\Controllers\\Vprasanja\\in' => __DIR__ . '/../..' . '/main/survey/app/Controllers/Vprasanja/MultigridController.php',
'App\\Models\\Model' => __DIR__ . '/../..' . '/main/survey/app/Models/Model.php',
'App\\Models\\SaveSurvey' => __DIR__ . '/../..' . '/main/survey/app/Models/SaveSurvey.php',
'App\\Models\\User' => __DIR__ . '/../..' . '/main/survey/app/Models/User.php',
'ArithmeticError' => __DIR__ . '/..' . '/symfony/polyfill-php70/Resources/stubs/ArithmeticError.php',
'AssertionError' => __DIR__ . '/..' . '/symfony/polyfill-php70/Resources/stubs/AssertionError.php',
=======
'App\\Models\\Model' => __DIR__ . '/../..' . '/main/survey/app/Models/Model.php',
'App\\Models\\SaveSurvey' => __DIR__ . '/../..' . '/main/survey/app/Models/SaveSurvey.php',
'App\\Models\\User' => __DIR__ . '/../..' . '/main/survey/app/Models/User.php',
>>>>>>> master
'Base64Url\\Base64Url' => __DIR__ . '/..' . '/spomky-labs/base64url/src/Base64Url.php',
'BesediloLatex' => __DIR__ . '/../..' . '/admin/survey/export/latexclasses/Vprasanja/BesediloLatex.php',
'BesediloXml' => __DIR__ . '/../..' . '/admin/survey/export/xmlClasses/Vprasanja/BesediloXml.php',
@ -309,22 +269,12 @@ class ComposerStaticInit0d06eb1022200eb96b7e4bb652ca3996
'BranchingAjax' => __DIR__ . '/../..' . '/admin/survey/BranchingAjax.php',
'Cache' => __DIR__ . '/../..' . '/admin/survey/classes/class.Cache.php',
'CheckboxXml' => __DIR__ . '/../..' . '/admin/survey/export/xmlClasses/Vprasanja/CheckboxXml.php',
<<<<<<< HEAD
'CollectIncrementalData' => __DIR__ . '/../..' . '/admin/survey/classes/surveyData/old/class.CollectIncrementalData.php',
=======
>>>>>>> master
'Common' => __DIR__ . '/../..' . '/admin/survey/classes/class.Common.php',
'Composer\\CaBundle\\CaBundle' => __DIR__ . '/..' . '/composer/ca-bundle/src/CaBundle.php',
'CrossRoad' => __DIR__ . '/../..' . '/admin/survey/classes/CrossRoad.php',
'DatumLatex' => __DIR__ . '/../..' . '/admin/survey/export/latexclasses/Vprasanja/DatumLatex.php',
'Demografija' => __DIR__ . '/../..' . '/admin/survey/classes/class.Demografija.php',
<<<<<<< HEAD
'DivisionByZeroError' => __DIR__ . '/..' . '/symfony/polyfill-php70/Resources/stubs/DivisionByZeroError.php',
'Dostop' => __DIR__ . '/../..' . '/admin/survey/classes/class.Dostop.php',
'Error' => __DIR__ . '/..' . '/symfony/polyfill-php70/Resources/stubs/Error.php',
=======
'Dostop' => __DIR__ . '/../..' . '/admin/survey/classes/class.Dostop.php',
>>>>>>> master
'Evalvacija' => __DIR__ . '/../..' . '/admin/survey/modules/Evalvacija/class.Evalvacija.php',
'EvoliForm' => __DIR__ . '/../..' . '/admin/survey/modules/mod_EVOLI/class.EvoliForm.php',
'ExclusiveLock' => __DIR__ . '/../..' . '/admin/survey/classes/surveyData/class.ExclusiveLock.php',
@ -455,16 +405,11 @@ class ComposerStaticInit0d06eb1022200eb96b7e4bb652ca3996
'GuzzleHttp\\Promise\\AggregateException' => __DIR__ . '/..' . '/guzzlehttp/promises/src/AggregateException.php',
'GuzzleHttp\\Promise\\CancellationException' => __DIR__ . '/..' . '/guzzlehttp/promises/src/CancellationException.php',
'GuzzleHttp\\Promise\\Coroutine' => __DIR__ . '/..' . '/guzzlehttp/promises/src/Coroutine.php',
<<<<<<< HEAD
'GuzzleHttp\\Promise\\EachPromise' => __DIR__ . '/..' . '/guzzlehttp/promises/src/EachPromise.php',
'GuzzleHttp\\Promise\\FulfilledPromise' => __DIR__ . '/..' . '/guzzlehttp/promises/src/FulfilledPromise.php',
=======
'GuzzleHttp\\Promise\\Create' => __DIR__ . '/..' . '/guzzlehttp/promises/src/Create.php',
'GuzzleHttp\\Promise\\Each' => __DIR__ . '/..' . '/guzzlehttp/promises/src/Each.php',
'GuzzleHttp\\Promise\\EachPromise' => __DIR__ . '/..' . '/guzzlehttp/promises/src/EachPromise.php',
'GuzzleHttp\\Promise\\FulfilledPromise' => __DIR__ . '/..' . '/guzzlehttp/promises/src/FulfilledPromise.php',
'GuzzleHttp\\Promise\\Is' => __DIR__ . '/..' . '/guzzlehttp/promises/src/Is.php',
>>>>>>> master
'GuzzleHttp\\Promise\\Promise' => __DIR__ . '/..' . '/guzzlehttp/promises/src/Promise.php',
'GuzzleHttp\\Promise\\PromiseInterface' => __DIR__ . '/..' . '/guzzlehttp/promises/src/PromiseInterface.php',
'GuzzleHttp\\Promise\\PromisorInterface' => __DIR__ . '/..' . '/guzzlehttp/promises/src/PromisorInterface.php',
@ -472,24 +417,12 @@ class ComposerStaticInit0d06eb1022200eb96b7e4bb652ca3996
'GuzzleHttp\\Promise\\RejectionException' => __DIR__ . '/..' . '/guzzlehttp/promises/src/RejectionException.php',
'GuzzleHttp\\Promise\\TaskQueue' => __DIR__ . '/..' . '/guzzlehttp/promises/src/TaskQueue.php',
'GuzzleHttp\\Promise\\TaskQueueInterface' => __DIR__ . '/..' . '/guzzlehttp/promises/src/TaskQueueInterface.php',
<<<<<<< HEAD
=======
'GuzzleHttp\\Promise\\Utils' => __DIR__ . '/..' . '/guzzlehttp/promises/src/Utils.php',
>>>>>>> master
'GuzzleHttp\\Psr7\\AppendStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/AppendStream.php',
'GuzzleHttp\\Psr7\\BufferStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/BufferStream.php',
'GuzzleHttp\\Psr7\\CachingStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/CachingStream.php',
'GuzzleHttp\\Psr7\\DroppingStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/DroppingStream.php',
'GuzzleHttp\\Psr7\\FnStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/FnStream.php',
<<<<<<< HEAD
'GuzzleHttp\\Psr7\\InflateStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/InflateStream.php',
'GuzzleHttp\\Psr7\\LazyOpenStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/LazyOpenStream.php',
'GuzzleHttp\\Psr7\\LimitStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/LimitStream.php',
'GuzzleHttp\\Psr7\\MessageTrait' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/MessageTrait.php',
'GuzzleHttp\\Psr7\\MultipartStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/MultipartStream.php',
'GuzzleHttp\\Psr7\\NoSeekStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/NoSeekStream.php',
'GuzzleHttp\\Psr7\\PumpStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/PumpStream.php',
=======
'GuzzleHttp\\Psr7\\Header' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/Header.php',
'GuzzleHttp\\Psr7\\InflateStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/InflateStream.php',
'GuzzleHttp\\Psr7\\LazyOpenStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/LazyOpenStream.php',
@ -501,7 +434,6 @@ class ComposerStaticInit0d06eb1022200eb96b7e4bb652ca3996
'GuzzleHttp\\Psr7\\NoSeekStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/NoSeekStream.php',
'GuzzleHttp\\Psr7\\PumpStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/PumpStream.php',
'GuzzleHttp\\Psr7\\Query' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/Query.php',
>>>>>>> master
'GuzzleHttp\\Psr7\\Request' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/Request.php',
'GuzzleHttp\\Psr7\\Response' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/Response.php',
'GuzzleHttp\\Psr7\\Rfc7230' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/Rfc7230.php',
@ -513,10 +445,7 @@ class ComposerStaticInit0d06eb1022200eb96b7e4bb652ca3996
'GuzzleHttp\\Psr7\\Uri' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/Uri.php',
'GuzzleHttp\\Psr7\\UriNormalizer' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/UriNormalizer.php',
'GuzzleHttp\\Psr7\\UriResolver' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/UriResolver.php',
<<<<<<< HEAD
=======
'GuzzleHttp\\Psr7\\Utils' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/Utils.php',
>>>>>>> master
'GuzzleHttp\\RedirectMiddleware' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/RedirectMiddleware.php',
'GuzzleHttp\\RequestOptions' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/RequestOptions.php',
'GuzzleHttp\\RetryMiddleware' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/RetryMiddleware.php',
@ -885,10 +814,6 @@ class ComposerStaticInit0d06eb1022200eb96b7e4bb652ca3996
'PHPMailer\\PHPMailer\\PHPMailer' => __DIR__ . '/..' . '/phpmailer/phpmailer/src/PHPMailer.php',
'PHPMailer\\PHPMailer\\POP3' => __DIR__ . '/..' . '/phpmailer/phpmailer/src/POP3.php',
'PHPMailer\\PHPMailer\\SMTP' => __DIR__ . '/..' . '/phpmailer/phpmailer/src/SMTP.php',
<<<<<<< HEAD
'ParseError' => __DIR__ . '/..' . '/symfony/polyfill-php70/Resources/stubs/ParseError.php',
=======
>>>>>>> master
'PayPalCheckoutSdk\\Core\\AccessToken' => __DIR__ . '/..' . '/paypal/paypal-checkout-sdk/lib/PayPalCheckoutSdk/Core/AccessToken.php',
'PayPalCheckoutSdk\\Core\\AccessTokenRequest' => __DIR__ . '/..' . '/paypal/paypal-checkout-sdk/lib/PayPalCheckoutSdk/Core/AccessTokenRequest.php',
'PayPalCheckoutSdk\\Core\\AuthorizationInjector' => __DIR__ . '/..' . '/paypal/paypal-checkout-sdk/lib/PayPalCheckoutSdk/Core/AuthorizationInjector.php',
@ -955,10 +880,6 @@ class ComposerStaticInit0d06eb1022200eb96b7e4bb652ca3996
'Sample\\PatchOrder' => __DIR__ . '/..' . '/paypal/paypal-checkout-sdk/samples/PatchOrder.php',
'Sample\\PayPalClient' => __DIR__ . '/..' . '/paypal/paypal-checkout-sdk/samples/PayPalClient.php',
'Sample\\RefundOrder' => __DIR__ . '/..' . '/paypal/paypal-checkout-sdk/samples/RefundOrder.php',
<<<<<<< HEAD
'SessionUpdateTimestampHandlerInterface' => __DIR__ . '/..' . '/symfony/polyfill-php70/Resources/stubs/SessionUpdateTimestampHandlerInterface.php',
=======
>>>>>>> master
'Setting' => __DIR__ . '/../..' . '/admin/survey/classes/class.Setting.php',
'Sonata\\GoogleAuthenticator\\FixedBitNotation' => __DIR__ . '/..' . '/sonata-project/google-authenticator/src/FixedBitNotation.php',
'Sonata\\GoogleAuthenticator\\GoogleAuthenticator' => __DIR__ . '/..' . '/sonata-project/google-authenticator/src/GoogleAuthenticator.php',
@ -1123,10 +1044,7 @@ class ComposerStaticInit0d06eb1022200eb96b7e4bb652ca3996
'Stripe\\Service\\Reporting\\ReportTypeService' => __DIR__ . '/..' . '/stripe/stripe-php/lib/Service/Reporting/ReportTypeService.php',
'Stripe\\Service\\Reporting\\ReportingServiceFactory' => __DIR__ . '/..' . '/stripe/stripe-php/lib/Service/Reporting/ReportingServiceFactory.php',
'Stripe\\Service\\ReviewService' => __DIR__ . '/..' . '/stripe/stripe-php/lib/Service/ReviewService.php',
<<<<<<< HEAD
=======
'Stripe\\Service\\SetupAttemptService' => __DIR__ . '/..' . '/stripe/stripe-php/lib/Service/SetupAttemptService.php',
>>>>>>> master
'Stripe\\Service\\SetupIntentService' => __DIR__ . '/..' . '/stripe/stripe-php/lib/Service/SetupIntentService.php',
'Stripe\\Service\\Sigma\\ScheduledQueryRunService' => __DIR__ . '/..' . '/stripe/stripe-php/lib/Service/Sigma/ScheduledQueryRunService.php',
'Stripe\\Service\\Sigma\\SigmaServiceFactory' => __DIR__ . '/..' . '/stripe/stripe-php/lib/Service/Sigma/SigmaServiceFactory.php',
@ -1144,10 +1062,7 @@ class ComposerStaticInit0d06eb1022200eb96b7e4bb652ca3996
'Stripe\\Service\\TopupService' => __DIR__ . '/..' . '/stripe/stripe-php/lib/Service/TopupService.php',
'Stripe\\Service\\TransferService' => __DIR__ . '/..' . '/stripe/stripe-php/lib/Service/TransferService.php',
'Stripe\\Service\\WebhookEndpointService' => __DIR__ . '/..' . '/stripe/stripe-php/lib/Service/WebhookEndpointService.php',
<<<<<<< HEAD
=======
'Stripe\\SetupAttempt' => __DIR__ . '/..' . '/stripe/stripe-php/lib/SetupAttempt.php',
>>>>>>> master
'Stripe\\SetupIntent' => __DIR__ . '/..' . '/stripe/stripe-php/lib/SetupIntent.php',
'Stripe\\Sigma\\ScheduledQueryRun' => __DIR__ . '/..' . '/stripe/stripe-php/lib/Sigma/ScheduledQueryRun.php',
'Stripe\\SingletonApiResource' => __DIR__ . '/..' . '/stripe/stripe-php/lib/SingletonApiResource.php',
@ -1216,10 +1131,6 @@ class ComposerStaticInit0d06eb1022200eb96b7e4bb652ca3996
'SurveyDataFile' => __DIR__ . '/../..' . '/admin/survey/classes/surveyData/class.SurveyDataFile.php',
'SurveyDataSettingProfiles' => __DIR__ . '/../..' . '/admin/survey/classes/class.SurveyDataSettingProfiles.php',
'SurveyDiagnostics' => __DIR__ . '/../..' . '/admin/survey/classes/class.SurveyDiagnostics.php',
<<<<<<< HEAD
'SurveyDisplayData' => __DIR__ . '/../..' . '/admin/survey/classes/surveyData/old/class.SurveyDisplayData.php',
=======
>>>>>>> master
'SurveyEditsAnalysis' => __DIR__ . '/../..' . '/admin/survey/classes/class.SurveyEditsAnalysis.php',
'SurveyEmployMeter' => __DIR__ . '/../..' . '/admin/survey/modules/mod_EVOLI/class.SurveyEmployMeter.php',
'SurveyEvoli' => __DIR__ . '/../..' . '/admin/survey/modules/mod_EVOLI/class.SurveyEvoli.php',
@ -1260,10 +1171,6 @@ class ComposerStaticInit0d06eb1022200eb96b7e4bb652ca3996
'SurveyRecoding' => __DIR__ . '/../..' . '/admin/survey/classes/class.SurveyRecoding.php',
'SurveyReminderTracking' => __DIR__ . '/../..' . '/admin/survey/classes/class.SurveyReminderTracking.php',
'SurveyRespondents' => __DIR__ . '/../..' . '/admin/survey/classes/class.SurveyRespondents.php',
<<<<<<< HEAD
'SurveySNDataFile' => __DIR__ . '/../..' . '/admin/survey/classes/surveyData/old/class.SurveySNDataFile.php',
=======
>>>>>>> master
'SurveySession' => __DIR__ . '/../..' . '/admin/survey/classes/class.SurveySession.php',
'SurveySessionDestructor' => __DIR__ . '/../..' . '/admin/survey/classes/class.SurveySession.php',
'SurveySetting' => __DIR__ . '/../..' . '/admin/survey/classes/class.SurveySetting.php',
@ -1284,10 +1191,6 @@ class ComposerStaticInit0d06eb1022200eb96b7e4bb652ca3996
'SurveyTheme' => __DIR__ . '/../..' . '/admin/survey/classes/class.SurveyTheme.php',
'SurveyThemeEditor' => __DIR__ . '/../..' . '/admin/survey/classes/class.SurveyThemeEditor.php',
'SurveyTimeProfiles' => __DIR__ . '/../..' . '/admin/survey/classes/class.SurveyTimeProfiles.php',
<<<<<<< HEAD
'SurveyTrackIncremental' => __DIR__ . '/../..' . '/admin/survey/classes/surveyData/old/class.SurveyTrackIncremental.php',
=======
>>>>>>> master
'SurveyUnsubscribe' => __DIR__ . '/../..' . '/admin/survey/classes/class.SurveyUnsubscribe.php',
'SurveyUporabnost' => __DIR__ . '/../..' . '/admin/survey/modules/mod_uporabnost/class.SurveyUporabnost.php',
'SurveyUrlLinks' => __DIR__ . '/../..' . '/admin/survey/classes/class.SurveyUrlLinks.php',
@ -1304,17 +1207,9 @@ class ComposerStaticInit0d06eb1022200eb96b7e4bb652ca3996
'Symfony\\Polyfill\\Intl\\Idn\\Resources\\unidata\\DisallowedRanges' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/Resources/unidata/DisallowedRanges.php',
'Symfony\\Polyfill\\Intl\\Idn\\Resources\\unidata\\Regex' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/Resources/unidata/Regex.php',
'Symfony\\Polyfill\\Intl\\Normalizer\\Normalizer' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/Normalizer.php',
<<<<<<< HEAD
'Symfony\\Polyfill\\Php70\\Php70' => __DIR__ . '/..' . '/symfony/polyfill-php70/Php70.php',
'Symfony\\Polyfill\\Php72\\Php72' => __DIR__ . '/..' . '/symfony/polyfill-php72/Php72.php',
'Timer' => __DIR__ . '/../..' . '/admin/survey/classes/class.Timer.php',
'TrackingClass' => __DIR__ . '/../..' . '/admin/survey/classes/TrackingClass.php',
'TypeError' => __DIR__ . '/..' . '/symfony/polyfill-php70/Resources/stubs/TypeError.php',
=======
'Symfony\\Polyfill\\Php72\\Php72' => __DIR__ . '/..' . '/symfony/polyfill-php72/Php72.php',
'Timer' => __DIR__ . '/../..' . '/admin/survey/classes/class.Timer.php',
'TrackingClass' => __DIR__ . '/../..' . '/admin/survey/classes/TrackingClass.php',
>>>>>>> master
'User' => __DIR__ . '/../..' . '/admin/survey/classes/class.User.php',
'UserAccess' => __DIR__ . '/../..' . '/frontend/payments/classes/class.UserAccess.php',
'UserNarocila' => __DIR__ . '/../..' . '/frontend/payments/classes/class.UserNarocila.php',
@ -1343,15 +1238,9 @@ class ComposerStaticInit0d06eb1022200eb96b7e4bb652ca3996
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
<<<<<<< HEAD
$loader->prefixLengthsPsr4 = ComposerStaticInit817d358f3360c5248956ccfb4ef6d09a::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit817d358f3360c5248956ccfb4ef6d09a::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit817d358f3360c5248956ccfb4ef6d09a::$classMap;
=======
$loader->prefixLengthsPsr4 = ComposerStaticInit0d06eb1022200eb96b7e4bb652ca3996::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit0d06eb1022200eb96b7e4bb652ca3996::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit0d06eb1022200eb96b7e4bb652ca3996::$classMap;
>>>>>>> master
$loader->prefixLengthsPsr4 = ComposerStaticInitb0a52c7015cc9c3d61646c8d77ee92c4::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitb0a52c7015cc9c3d61646c8d77ee92c4::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitb0a52c7015cc9c3d61646c8d77ee92c4::$classMap;
}, null, ClassLoader::class);
}

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,3 @@
<<<<<<< HEAD
=======
#### v2.2.0 (2020-08)
* support polyfills for bcmath and gmp, and add a composer.json
suggestion for the `phpseclib/bcmath_polyfill` for servers unable
@ -9,7 +7,6 @@
* add stricter validation around some structures, highlighed
by wycheproof test suite
>>>>>>> master
#### v.2.1.0 (2018-03)
* add support for `bcmath` extension (making `gmp` optional)<br>
https://github.com/fgrosse/PHPASN1/pull/68

View File

@ -27,13 +27,9 @@
},
"suggest": {
"ext-gmp": "GMP is the preferred extension for big integer calculations",
<<<<<<< HEAD
"php-curl": "For loading OID information from the web if they have not bee defined statically"
=======
"ext-bcmath": "BCmath is the fallback extension for big integer calculations",
"phpseclib/bcmath_compat": "BCmath polyfill for servers where neither GMP nor BCmath is available",
"ext-curl": "For loading OID information from the web if they have not bee defined statically"
>>>>>>> master
},
"autoload": {
"psr-4": {

View File

@ -53,23 +53,12 @@ abstract class BigInteger
}
else {
// autodetect
<<<<<<< HEAD
if (extension_loaded('gmp')) {
$ret = new BigIntegerGmp();
}
elseif (extension_loaded('bcmath')) {
$ret = new BigIntegerBcmath();
}
else {
// TODO: potentially offer pure php implementation?
=======
if (function_exists('gmp_add')) {
$ret = new BigIntegerGmp();
}
elseif (function_exists('bcadd')) {
$ret = new BigIntegerBcmath();
} else {
>>>>>>> master
throw new \RuntimeException('Requires GMP or bcmath extension.');
}
}

View File

@ -1,8 +1,6 @@
CHANGELOG
=========
<<<<<<< HEAD
=======
2.11.0 (2020-10-01)
-------------------
@ -11,7 +9,6 @@ CHANGELOG
`GeoIp2\Record\Traits`.
* Additional type hints have been added.
>>>>>>> master
2.10.0 (2019-12-12)
-------------------

View File

@ -13,24 +13,14 @@
}
],
"require": {
<<<<<<< HEAD
"maxmind-db/reader": "~1.5",
"maxmind/web-service-common": "~0.6",
"php": ">=5.6",
=======
"maxmind-db/reader": "~1.8",
"maxmind/web-service-common": "~0.8",
"php": ">=7.2",
>>>>>>> master
"ext-json": "*"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "2.*",
<<<<<<< HEAD
"phpunit/phpunit": "5.*",
=======
"phpunit/phpunit": "^8.0 || ^9.0",
>>>>>>> master
"squizlabs/php_codesniffer": "3.*"
},
"autoload": {

View File

@ -1,10 +1,7 @@
<?php
<<<<<<< HEAD
=======
declare(strict_types=1);
>>>>>>> master
namespace GeoIp2\Database;
use GeoIp2\Exception\AddressNotFoundException;
@ -53,13 +50,8 @@ class Reader implements ProviderInterface
* is corrupt or invalid
*/
public function __construct(
<<<<<<< HEAD
$filename,
$locales = ['en']
=======
string $filename,
array $locales = ['en']
>>>>>>> master
) {
$this->dbReader = new DbReader($filename);
$this->dbType = $this->dbReader->metadata()->databaseType;
@ -75,15 +67,8 @@ class Reader implements ProviderInterface
* not in the database
* @throws \MaxMind\Db\Reader\InvalidDatabaseException if the database
* is corrupt or invalid
<<<<<<< HEAD
*
* @return \GeoIp2\Model\City
*/
public function city($ipAddress)
=======
*/
public function city(string $ipAddress): \GeoIp2\Model\City
>>>>>>> master
{
return $this->modelFor('City', 'City', $ipAddress);
}
@ -97,15 +82,8 @@ class Reader implements ProviderInterface
* not in the database
* @throws \MaxMind\Db\Reader\InvalidDatabaseException if the database
* is corrupt or invalid
<<<<<<< HEAD
*
* @return \GeoIp2\Model\Country
*/
public function country($ipAddress)
=======
*/
public function country(string $ipAddress): \GeoIp2\Model\Country
>>>>>>> master
{
return $this->modelFor('Country', 'Country', $ipAddress);
}
@ -119,15 +97,8 @@ class Reader implements ProviderInterface
* not in the database
* @throws \MaxMind\Db\Reader\InvalidDatabaseException if the database
* is corrupt or invalid
<<<<<<< HEAD
*
* @return \GeoIp2\Model\AnonymousIp
*/
public function anonymousIp($ipAddress)
=======
*/
public function anonymousIp(string $ipAddress): \GeoIp2\Model\AnonymousIp
>>>>>>> master
{
return $this->flatModelFor(
'AnonymousIp',
@ -145,15 +116,8 @@ class Reader implements ProviderInterface
* not in the database
* @throws \MaxMind\Db\Reader\InvalidDatabaseException if the database
* is corrupt or invalid
<<<<<<< HEAD
*
* @return \GeoIp2\Model\Asn
*/
public function asn($ipAddress)
=======
*/
public function asn(string $ipAddress): \GeoIp2\Model\Asn
>>>>>>> master
{
return $this->flatModelFor(
'Asn',
@ -171,15 +135,8 @@ class Reader implements ProviderInterface
* not in the database
* @throws \MaxMind\Db\Reader\InvalidDatabaseException if the database
* is corrupt or invalid
<<<<<<< HEAD
*
* @return \GeoIp2\Model\ConnectionType
*/
public function connectionType($ipAddress)
=======
*/
public function connectionType(string $ipAddress): \GeoIp2\Model\ConnectionType
>>>>>>> master
{
return $this->flatModelFor(
'ConnectionType',
@ -197,15 +154,8 @@ class Reader implements ProviderInterface
* not in the database
* @throws \MaxMind\Db\Reader\InvalidDatabaseException if the database
* is corrupt or invalid
<<<<<<< HEAD
*
* @return \GeoIp2\Model\Domain
*/
public function domain($ipAddress)
=======
*/
public function domain(string $ipAddress): \GeoIp2\Model\Domain
>>>>>>> master
{
return $this->flatModelFor(
'Domain',
@ -223,15 +173,8 @@ class Reader implements ProviderInterface
* not in the database
* @throws \MaxMind\Db\Reader\InvalidDatabaseException if the database
* is corrupt or invalid
<<<<<<< HEAD
*
* @return \GeoIp2\Model\Enterprise
*/
public function enterprise($ipAddress)
=======
*/
public function enterprise(string $ipAddress): \GeoIp2\Model\Enterprise
>>>>>>> master
{
return $this->modelFor('Enterprise', 'Enterprise', $ipAddress);
}
@ -245,15 +188,8 @@ class Reader implements ProviderInterface
* not in the database
* @throws \MaxMind\Db\Reader\InvalidDatabaseException if the database
* is corrupt or invalid
<<<<<<< HEAD
*
* @return \GeoIp2\Model\Isp
*/
public function isp($ipAddress)
=======
*/
public function isp(string $ipAddress): \GeoIp2\Model\Isp
>>>>>>> master
{
return $this->flatModelFor(
'Isp',
@ -262,11 +198,7 @@ class Reader implements ProviderInterface
);
}
<<<<<<< HEAD
private function modelFor($class, $type, $ipAddress)
=======
private function modelFor(string $class, string $type, string $ipAddress)
>>>>>>> master
{
list($record, $prefixLen) = $this->getRecord($class, $type, $ipAddress);
@ -278,11 +210,7 @@ class Reader implements ProviderInterface
return new $class($record, $this->locales);
}
<<<<<<< HEAD
private function flatModelFor($class, $type, $ipAddress)
=======
private function flatModelFor(string $class, string $type, string $ipAddress)
>>>>>>> master
{
list($record, $prefixLen) = $this->getRecord($class, $type, $ipAddress);
@ -293,11 +221,7 @@ class Reader implements ProviderInterface
return new $class($record);
}
<<<<<<< HEAD
private function getRecord($class, $type, $ipAddress)
=======
private function getRecord(string $class, string $type, string $ipAddress): array
>>>>>>> master
{
if (strpos($this->dbType, $type) === false) {
$method = lcfirst($class);
@ -334,11 +258,7 @@ class Reader implements ProviderInterface
*
* @return \MaxMind\Db\Reader\Metadata object for the database
*/
<<<<<<< HEAD
public function metadata()
=======
public function metadata(): \MaxMind\Db\Reader\Metadata
>>>>>>> master
{
return $this->dbReader->metadata();
}
@ -346,11 +266,7 @@ class Reader implements ProviderInterface
/**
* Closes the GeoIP2 database and returns the resources to the system.
*/
<<<<<<< HEAD
public function close()
=======
public function close(): void
>>>>>>> master
{
$this->dbReader->close();
}

View File

@ -1,10 +1,7 @@
<?php
<<<<<<< HEAD
=======
declare(strict_types=1);
>>>>>>> master
namespace GeoIp2\Exception;
/**

View File

@ -1,10 +1,7 @@
<?php
<<<<<<< HEAD
=======
declare(strict_types=1);
>>>>>>> master
namespace GeoIp2\Exception;
/**

View File

@ -1,10 +1,7 @@
<?php
<<<<<<< HEAD
=======
declare(strict_types=1);
>>>>>>> master
namespace GeoIp2\Exception;
/**

View File

@ -1,10 +1,7 @@
<?php
<<<<<<< HEAD
=======
declare(strict_types=1);
>>>>>>> master
namespace GeoIp2\Exception;
/**
@ -18,15 +15,9 @@ class HttpException extends GeoIp2Exception
public $uri;
public function __construct(
<<<<<<< HEAD
$message,
$httpStatus,
$uri,
=======
string $message,
int $httpStatus,
string $uri,
>>>>>>> master
\Exception $previous = null
) {
$this->uri = $uri;

View File

@ -1,10 +1,7 @@
<?php
<<<<<<< HEAD
=======
declare(strict_types=1);
>>>>>>> master
namespace GeoIp2\Exception;
/**
@ -19,17 +16,10 @@ class InvalidRequestException extends HttpException
public $error;
public function __construct(
<<<<<<< HEAD
$message,
$error,
$httpStatus,
$uri,
=======
string $message,
string $error,
int $httpStatus,
string $uri,
>>>>>>> master
\Exception $previous = null
) {
$this->error = $error;

View File

@ -1,10 +1,7 @@
<?php
<<<<<<< HEAD
=======
declare(strict_types=1);
>>>>>>> master
namespace GeoIp2\Exception;
/**

View File

@ -1,10 +1,7 @@
<?php
<<<<<<< HEAD
=======
declare(strict_types=1);
>>>>>>> master
namespace GeoIp2\Model;
/**
@ -16,30 +13,16 @@ abstract class AbstractModel implements \JsonSerializable
/**
* @ignore
<<<<<<< HEAD
*
* @param mixed $raw
*/
public function __construct($raw)
=======
*/
public function __construct(array $raw)
>>>>>>> master
{
$this->raw = $raw;
}
/**
* @ignore
<<<<<<< HEAD
*
* @param mixed $field
*/
protected function get($field)
=======
*/
protected function get(string $field)
>>>>>>> master
{
if (isset($this->raw[$field])) {
return $this->raw[$field];
@ -53,15 +36,8 @@ abstract class AbstractModel implements \JsonSerializable
/**
* @ignore
<<<<<<< HEAD
*
* @param mixed $attr
*/
public function __get($attr)
=======
*/
public function __get(string $attr)
>>>>>>> master
{
if ($attr !== 'instance' && property_exists($this, $attr)) {
return $this->$attr;
@ -72,24 +48,13 @@ abstract class AbstractModel implements \JsonSerializable
/**
* @ignore
<<<<<<< HEAD
*
* @param mixed $attr
*/
public function __isset($attr)
=======
*/
public function __isset(string $attr): bool
>>>>>>> master
{
return $attr !== 'instance' && isset($this->$attr);
}
<<<<<<< HEAD
public function jsonSerialize()
=======
public function jsonSerialize(): array
>>>>>>> master
{
return $this->raw;
}

View File

@ -1,10 +1,7 @@
<?php
<<<<<<< HEAD
=======
declare(strict_types=1);
>>>>>>> master
namespace GeoIp2\Model;
use GeoIp2\Util;
@ -22,11 +19,8 @@ use GeoIp2\Util;
* to a hosting or VPN provider (see description of isAnonymousVpn property).
* @property-read bool $isPublicProxy This is true if the IP address belongs to
* a public proxy.
<<<<<<< HEAD
=======
* @property-read bool $isResidentialProxy This is true if the IP address is
* on a suspected anonymizing network and belongs to a residential ISP.
>>>>>>> master
* @property-read bool $isTorExitNode This is true if the IP address is a Tor
* exit node.
* @property-read string $ipAddress The IP address that the data in the model is
@ -41,25 +35,15 @@ class AnonymousIp extends AbstractModel
protected $isAnonymousVpn;
protected $isHostingProvider;
protected $isPublicProxy;
<<<<<<< HEAD
=======
protected $isResidentialProxy;
>>>>>>> master
protected $isTorExitNode;
protected $ipAddress;
protected $network;
/**
* @ignore
<<<<<<< HEAD
*
* @param mixed $raw
*/
public function __construct($raw)
=======
*/
public function __construct(array $raw)
>>>>>>> master
{
parent::__construct($raw);
@ -67,10 +51,7 @@ class AnonymousIp extends AbstractModel
$this->isAnonymousVpn = $this->get('is_anonymous_vpn');
$this->isHostingProvider = $this->get('is_hosting_provider');
$this->isPublicProxy = $this->get('is_public_proxy');
<<<<<<< HEAD
=======
$this->isResidentialProxy = $this->get('is_residential_proxy');
>>>>>>> master
$this->isTorExitNode = $this->get('is_tor_exit_node');
$ipAddress = $this->get('ip_address');
$this->ipAddress = $ipAddress;

View File

@ -1,10 +1,7 @@
<?php
<<<<<<< HEAD
=======
declare(strict_types=1);
>>>>>>> master
namespace GeoIp2\Model;
use GeoIp2\Util;
@ -32,15 +29,8 @@ class Asn extends AbstractModel
/**
* @ignore
<<<<<<< HEAD
*
* @param mixed $raw
*/
public function __construct($raw)
=======
*/
public function __construct(array $raw)
>>>>>>> master
{
parent::__construct($raw);
$this->autonomousSystemNumber = $this->get('autonomous_system_number');

View File

@ -1,10 +1,7 @@
<?php
<<<<<<< HEAD
=======
declare(strict_types=1);
>>>>>>> master
namespace GeoIp2\Model;
/**
@ -53,16 +50,8 @@ class City extends Country
/**
* @ignore
<<<<<<< HEAD
*
* @param mixed $raw
* @param mixed $locales
*/
public function __construct($raw, $locales = ['en'])
=======
*/
public function __construct(array $raw, array $locales = ['en'])
>>>>>>> master
{
parent::__construct($raw, $locales);
@ -73,11 +62,7 @@ class City extends Country
$this->createSubdivisions($raw, $locales);
}
<<<<<<< HEAD
private function createSubdivisions($raw, $locales)
=======
private function createSubdivisions(array $raw, array $locales): void
>>>>>>> master
{
if (!isset($raw['subdivisions'])) {
return;
@ -93,15 +78,8 @@ class City extends Country
/**
* @ignore
<<<<<<< HEAD
*
* @param mixed $attr
*/
public function __get($attr)
=======
*/
public function __get(string $attr)
>>>>>>> master
{
if ($attr === 'mostSpecificSubdivision') {
return $this->$attr();
@ -112,15 +90,8 @@ class City extends Country
/**
* @ignore
<<<<<<< HEAD
*
* @param mixed $attr
*/
public function __isset($attr)
=======
*/
public function __isset(string $attr): bool
>>>>>>> master
{
if ($attr === 'mostSpecificSubdivision') {
// We always return a mostSpecificSubdivision, even if it is the
@ -131,11 +102,7 @@ class City extends Country
return parent::__isset($attr);
}
<<<<<<< HEAD
private function mostSpecificSubdivision()
=======
private function mostSpecificSubdivision(): \GeoIp2\Record\Subdivision
>>>>>>> master
{
return empty($this->subdivisions) ?
new \GeoIp2\Record\Subdivision([], $this->locales) :

View File

@ -1,10 +1,7 @@
<?php
<<<<<<< HEAD
=======
declare(strict_types=1);
>>>>>>> master
namespace GeoIp2\Model;
use GeoIp2\Util;
@ -29,15 +26,8 @@ class ConnectionType extends AbstractModel
/**
* @ignore
<<<<<<< HEAD
*
* @param mixed $raw
*/
public function __construct($raw)
=======
*/
public function __construct(array $raw)
>>>>>>> master
{
parent::__construct($raw);

View File

@ -1,10 +1,7 @@
<?php
<<<<<<< HEAD
=======
declare(strict_types=1);
>>>>>>> master
namespace GeoIp2\Model;
/**
@ -44,16 +41,8 @@ class Country extends AbstractModel
/**
* @ignore
<<<<<<< HEAD
*
* @param mixed $raw
* @param mixed $locales
*/
public function __construct($raw, $locales = ['en'])
=======
*/
public function __construct(array $raw, array $locales = ['en'])
>>>>>>> master
{
parent::__construct($raw);

View File

@ -1,10 +1,7 @@
<?php
<<<<<<< HEAD
=======
declare(strict_types=1);
>>>>>>> master
namespace GeoIp2\Model;
use GeoIp2\Util;
@ -29,15 +26,8 @@ class Domain extends AbstractModel
/**
* @ignore
<<<<<<< HEAD
*
* @param mixed $raw
*/
public function __construct($raw)
=======
*/
public function __construct(array $raw)
>>>>>>> master
{
parent::__construct($raw);

View File

@ -1,10 +1,7 @@
<?php
<<<<<<< HEAD
=======
declare(strict_types=1);
>>>>>>> master
namespace GeoIp2\Model;
/**

View File

@ -1,10 +1,7 @@
<?php
<<<<<<< HEAD
=======
declare(strict_types=1);
>>>>>>> master
namespace GeoIp2\Model;
/**

View File

@ -1,10 +1,7 @@
<?php
<<<<<<< HEAD
=======
declare(strict_types=1);
>>>>>>> master
namespace GeoIp2\Model;
use GeoIp2\Util;
@ -38,15 +35,8 @@ class Isp extends AbstractModel
/**
* @ignore
<<<<<<< HEAD
*
* @param mixed $raw
*/
public function __construct($raw)
=======
*/
public function __construct(array $raw)
>>>>>>> master
{
parent::__construct($raw);
$this->autonomousSystemNumber = $this->get('autonomous_system_number');

View File

@ -1,10 +1,7 @@
<?php
<<<<<<< HEAD
=======
declare(strict_types=1);
>>>>>>> master
namespace GeoIp2;
interface ProviderInterface
@ -14,20 +11,12 @@ interface ProviderInterface
*
* @return \GeoIp2\Model\Country a Country model for the requested IP address
*/
<<<<<<< HEAD
public function country($ipAddress);
=======
public function country(string $ipAddress): \GeoIp2\Model\Country;
>>>>>>> master
/**
* @param string $ipAddress an IPv4 or IPv6 address to lookup
*
* @return \GeoIp2\Model\City a City model for the requested IP address
*/
<<<<<<< HEAD
public function city($ipAddress);
=======
public function city(string $ipAddress): \GeoIp2\Model\City;
>>>>>>> master
}

View File

@ -1,10 +1,7 @@
<?php
<<<<<<< HEAD
=======
declare(strict_types=1);
>>>>>>> master
namespace GeoIp2\Record;
abstract class AbstractPlaceRecord extends AbstractRecord
@ -13,16 +10,8 @@ abstract class AbstractPlaceRecord extends AbstractRecord
/**
* @ignore
<<<<<<< HEAD
*
* @param mixed $record
* @param mixed $locales
*/
public function __construct($record, $locales = ['en'])
=======
*/
public function __construct(?array $record, array $locales = ['en'])
>>>>>>> master
{
$this->locales = $locales;
parent::__construct($record);
@ -30,15 +19,8 @@ abstract class AbstractPlaceRecord extends AbstractRecord
/**
* @ignore
<<<<<<< HEAD
*
* @param mixed $attr
*/
public function __get($attr)
=======
*/
public function __get(string $attr)
>>>>>>> master
{
if ($attr === 'name') {
return $this->name();
@ -49,42 +31,24 @@ abstract class AbstractPlaceRecord extends AbstractRecord
/**
* @ignore
<<<<<<< HEAD
*
* @param mixed $attr
*/
public function __isset($attr)
{
if ($attr === 'name') {
return $this->firstSetNameLocale() === null ? false : true;
=======
*/
public function __isset(string $attr): bool
{
if ($attr === 'name') {
return $this->firstSetNameLocale() !== null;
>>>>>>> master
}
return parent::__isset($attr);
}
<<<<<<< HEAD
private function name()
=======
private function name(): ?string
>>>>>>> master
{
$locale = $this->firstSetNameLocale();
return $locale === null ? null : $this->names[$locale];
}
<<<<<<< HEAD
private function firstSetNameLocale()
=======
private function firstSetNameLocale(): ?string
>>>>>>> master
{
foreach ($this->locales as $locale) {
if (isset($this->names[$locale])) {

View File

@ -1,10 +1,7 @@
<?php
<<<<<<< HEAD
=======
declare(strict_types=1);
>>>>>>> master
namespace GeoIp2\Record;
abstract class AbstractRecord implements \JsonSerializable
@ -13,30 +10,16 @@ abstract class AbstractRecord implements \JsonSerializable
/**
* @ignore
<<<<<<< HEAD
*
* @param mixed $record
*/
public function __construct($record)
=======
*/
public function __construct(?array $record)
>>>>>>> master
{
$this->record = isset($record) ? $record : [];
}
/**
* @ignore
<<<<<<< HEAD
*
* @param mixed $attr
*/
public function __get($attr)
=======
*/
public function __get(string $attr)
>>>>>>> master
{
// XXX - kind of ugly but greatly reduces boilerplate code
$key = $this->attributeToKey($attr);
@ -53,39 +36,23 @@ abstract class AbstractRecord implements \JsonSerializable
throw new \RuntimeException("Unknown attribute: $attr");
}
<<<<<<< HEAD
public function __isset($attr)
=======
public function __isset(string $attr): bool
>>>>>>> master
{
return $this->validAttribute($attr) &&
isset($this->record[$this->attributeToKey($attr)]);
}
<<<<<<< HEAD
private function attributeToKey($attr)
=======
private function attributeToKey(string $attr): string
>>>>>>> master
{
return strtolower(preg_replace('/([A-Z])/', '_\1', $attr));
}
<<<<<<< HEAD
private function validAttribute($attr)
=======
private function validAttribute(string $attr): bool
>>>>>>> master
{
return \in_array($attr, $this->validAttributes, true);
}
<<<<<<< HEAD
public function jsonSerialize()
=======
public function jsonSerialize(): ?array
>>>>>>> master
{
return $this->record;
}

View File

@ -1,10 +1,7 @@
<?php
<<<<<<< HEAD
=======
declare(strict_types=1);
>>>>>>> master
namespace GeoIp2\Record;
/**

View File

@ -1,10 +1,7 @@
<?php
<<<<<<< HEAD
=======
declare(strict_types=1);
>>>>>>> master
namespace GeoIp2\Record;
/**

View File

@ -1,10 +1,7 @@
<?php
<<<<<<< HEAD
=======
declare(strict_types=1);
>>>>>>> master
namespace GeoIp2\Record;
/**

View File

@ -1,10 +1,7 @@
<?php
<<<<<<< HEAD
=======
declare(strict_types=1);
>>>>>>> master
namespace GeoIp2\Record;
/**

View File

@ -1,10 +1,7 @@
<?php
<<<<<<< HEAD
=======
declare(strict_types=1);
>>>>>>> master
namespace GeoIp2\Record;
/**

View File

@ -1,10 +1,7 @@
<?php
<<<<<<< HEAD
=======
declare(strict_types=1);
>>>>>>> master
namespace GeoIp2\Record;
/**

View File

@ -1,10 +1,7 @@
<?php
<<<<<<< HEAD
=======
declare(strict_types=1);
>>>>>>> master
namespace GeoIp2\Record;
/**

View File

@ -1,10 +1,7 @@
<?php
<<<<<<< HEAD
=======
declare(strict_types=1);
>>>>>>> master
namespace GeoIp2\Record;
/**

View File

@ -1,10 +1,7 @@
<?php
<<<<<<< HEAD
=======
declare(strict_types=1);
>>>>>>> master
namespace GeoIp2\Record;
use GeoIp2\Util;
@ -61,12 +58,9 @@ use GeoIp2\Util;
* @property-read bool $isPublicProxy This is true if the IP address belongs to
* a public proxy. This property is only available from GeoIP2 Precision
* Insights.
<<<<<<< HEAD
=======
* @property-read bool $isResidentialProxy This is true if the IP address is
* on a suspected anonymizing network and belongs to a residential ISP. This
* property is only available from GeoIP2 Precision Insights.
>>>>>>> master
* @property-read bool $isSatelliteProvider *Deprecated.* Due to the
* increased coverage by mobile carriers, very few satellite providers now
* serve multiple countries. As a result, the output does not provide
@ -131,10 +125,7 @@ class Traits extends AbstractRecord
'isLegitimateProxy',
'isp',
'isPublicProxy',
<<<<<<< HEAD
=======
'isResidentialProxy',
>>>>>>> master
'isSatelliteProvider',
'isTorExitNode',
'network',
@ -144,11 +135,7 @@ class Traits extends AbstractRecord
'userType',
];
<<<<<<< HEAD
public function __construct($record)
=======
public function __construct(?array $record)
>>>>>>> master
{
if (!isset($record['network']) && isset($record['ip_address']) && isset($record['prefix_len'])) {
$record['network'] = Util::cidr($record['ip_address'], $record['prefix_len']);

View File

@ -1,10 +1,7 @@
<?php
<<<<<<< HEAD
=======
declare(strict_types=1);
>>>>>>> master
namespace GeoIp2;
class Util
@ -15,16 +12,8 @@ class Util
*
* @internal
* @ignore
<<<<<<< HEAD
*
* @param mixed $ipAddress
* @param mixed $prefixLen
*/
public static function cidr($ipAddress, $prefixLen)
=======
*/
public static function cidr(string $ipAddress, int $prefixLen): string
>>>>>>> master
{
$ipBytes = inet_pton($ipAddress);
$networkBytes = str_repeat("\0", \strlen($ipBytes));

View File

@ -1,10 +1,7 @@
<?php
<<<<<<< HEAD
=======
declare(strict_types=1);
>>>>>>> master
namespace GeoIp2\WebService;
use GeoIp2\Exception\AddressNotFoundException;
@ -52,11 +49,7 @@ class Client implements ProviderInterface
private $client;
private static $basePath = '/geoip/v2.1';
<<<<<<< HEAD
const VERSION = 'v2.10.0';
=======
const VERSION = 'v2.11.0';
>>>>>>> master
/**
* Constructor.
@ -74,17 +67,10 @@ class Client implements ProviderInterface
* `http://username:password@127.0.0.1:10`.
*/
public function __construct(
<<<<<<< HEAD
$accountId,
$licenseKey,
$locales = ['en'],
$options = []
=======
int $accountId,
string $licenseKey,
array $locales = ['en'],
array $options = []
>>>>>>> master
) {
$this->locales = $locales;
@ -103,11 +89,7 @@ class Client implements ProviderInterface
$this->client = new WsClient($accountId, $licenseKey, $options);
}
<<<<<<< HEAD
private function userAgent()
=======
private function userAgent(): string
>>>>>>> master
{
return 'GeoIP2-API/' . self::VERSION;
}
@ -135,15 +117,8 @@ class Client implements ProviderInterface
* @throws \GeoIp2\Exception\GeoIp2Exception This serves as the parent
* class to the above exceptions. It will be thrown directly
* if a 200 status code is returned but the body is invalid.
<<<<<<< HEAD
*
* @return \GeoIp2\Model\City
*/
public function city($ipAddress = 'me')
=======
*/
public function city(string $ipAddress = 'me'): \GeoIp2\Model\City
>>>>>>> master
{
return $this->responseFor('city', 'City', $ipAddress);
}
@ -171,15 +146,8 @@ class Client implements ProviderInterface
* @throws \GeoIp2\Exception\GeoIp2Exception This serves as the parent class to the above exceptions. It
* will be thrown directly if a 200 status code is returned but
* the body is invalid.
<<<<<<< HEAD
*
* @return \GeoIp2\Model\Country
*/
public function country($ipAddress = 'me')
=======
*/
public function country(string $ipAddress = 'me'): \GeoIp2\Model\Country
>>>>>>> master
{
return $this->responseFor('country', 'Country', $ipAddress);
}
@ -207,24 +175,13 @@ class Client implements ProviderInterface
* @throws \GeoIp2\Exception\GeoIp2Exception This serves as the parent
* class to the above exceptions. It will be thrown directly
* if a 200 status code is returned but the body is invalid.
<<<<<<< HEAD
*
* @return \GeoIp2\Model\Insights
*/
public function insights($ipAddress = 'me')
=======
*/
public function insights(string $ipAddress = 'me'): \GeoIp2\Model\Insights
>>>>>>> master
{
return $this->responseFor('insights', 'Insights', $ipAddress);
}
<<<<<<< HEAD
private function responseFor($endpoint, $class, $ipAddress)
=======
private function responseFor(string $endpoint, string $class, string $ipAddress)
>>>>>>> master
{
$path = implode('/', [self::$basePath, $endpoint, $ipAddress]);

View File

@ -1,8 +1,6 @@
# CHANGELOG
<<<<<<< HEAD
=======
## 1.4.0 - 2020-09-30
### Added
@ -19,7 +17,6 @@
- Memory leak on exceptions
>>>>>>> master
## 1.3.1 - 2016-12-20
### Fixed

View File

@ -26,11 +26,7 @@ for a general introduction to promises.
- Promises can be cancelled.
- Works with any object that has a `then` function.
- C# style async/await coroutine promises using
<<<<<<< HEAD
`GuzzleHttp\Promise\coroutine()`.
=======
`GuzzleHttp\Promise\Coroutine::of()`.
>>>>>>> master
# Quick start
@ -92,11 +88,7 @@ $promise
});
// Resolving the promise triggers the $onFulfilled callbacks and outputs
<<<<<<< HEAD
// "Hello, reader".
=======
// "Hello, reader."
>>>>>>> master
$promise->resolve('reader.');
```
@ -158,11 +150,7 @@ use GuzzleHttp\Promise\Promise;
$promise = new Promise();
$promise->then(null, function ($reason) {
<<<<<<< HEAD
throw new \Exception($reason);
=======
throw new Exception($reason);
>>>>>>> master
})->then(null, function ($reason) {
assert($reason->getMessage() === 'Error!');
});
@ -194,10 +182,6 @@ invoked using the value returned from the `$onRejected` callback.
```php
use GuzzleHttp\Promise\Promise;
<<<<<<< HEAD
use GuzzleHttp\Promise\RejectedPromise;
=======
>>>>>>> master
$promise = new Promise();
$promise
@ -235,11 +219,7 @@ the promise is rejected with the exception and the exception is thrown.
```php
$promise = new Promise(function () use (&$promise) {
<<<<<<< HEAD
throw new \Exception('foo');
=======
throw new Exception('foo');
>>>>>>> master
});
$promise->wait(); // throws the exception.
@ -416,11 +396,7 @@ $deferred = new React\Promise\Deferred();
$reactPromise = $deferred->promise();
// Create a Guzzle promise that is fulfilled with a React promise.
<<<<<<< HEAD
$guzzlePromise = new \GuzzleHttp\Promise\Promise();
=======
$guzzlePromise = new GuzzleHttp\Promise\Promise();
>>>>>>> master
$guzzlePromise->then(function ($value) use ($reactPromise) {
// Do something something with the value...
// Return the React promise
@ -447,11 +423,7 @@ instance.
```php
// Get the global task queue
<<<<<<< HEAD
$queue = \GuzzleHttp\Promise\queue();
=======
$queue = GuzzleHttp\Promise\Utils::queue();
>>>>>>> master
$queue->run();
```
@ -529,8 +501,6 @@ $promise->then(function ($value) { echo $value; });
$promise->resolve('foo');
// prints "foo"
```
<<<<<<< HEAD
=======
## Upgrading from Function API
@ -560,4 +530,3 @@ A static API was first introduced in 1.4.0, in order to mitigate problems with f
| `is_rejected` | `Is::rejected` |
| `is_settled` | `Is::settled` |
| `coroutine` | `Coroutine::of` |
>>>>>>> master

View File

@ -11,17 +11,10 @@
}
],
"require": {
<<<<<<< HEAD
"php": ">=5.5.0"
},
"require-dev": {
"phpunit/phpunit": "^4.0"
=======
"php": ">=5.5"
},
"require-dev": {
"symfony/phpunit-bridge": "^4.4 || ^5.1"
>>>>>>> master
},
"autoload": {
"psr-4": {
@ -29,11 +22,6 @@
},
"files": ["src/functions_include.php"]
},
<<<<<<< HEAD
"scripts": {
"test": "vendor/bin/phpunit",
"test-ci": "vendor/bin/phpunit --coverage-text"
=======
"autoload-dev": {
"psr-4": {
"GuzzleHttp\\Promise\\Tests\\": "tests/"
@ -42,7 +30,6 @@
"scripts": {
"test": "vendor/bin/simple-phpunit",
"test-ci": "vendor/bin/simple-phpunit --coverage-text"
>>>>>>> master
},
"extra": {
"branch-alias": {

View File

@ -1,8 +1,5 @@
<?php
<<<<<<< HEAD
=======
>>>>>>> master
namespace GuzzleHttp\Promise;
/**

View File

@ -1,8 +1,5 @@
<?php
<<<<<<< HEAD
=======
>>>>>>> master
namespace GuzzleHttp\Promise;
/**

View File

@ -1,8 +1,5 @@
<?php
<<<<<<< HEAD
=======
>>>>>>> master
namespace GuzzleHttp\Promise;
use Exception;
@ -13,11 +10,7 @@ use Throwable;
* Creates a promise that is resolved using a generator that yields values or
* promises (somewhat similar to C#'s async keyword).
*
<<<<<<< HEAD
* When called, the coroutine function will start an instance of the generator
=======
* When called, the Coroutine::of method will start an instance of the generator
>>>>>>> master
* and returns a promise that is fulfilled with its final yielded value.
*
* Control is returned back to the generator when the yielded promise settles.
@ -30,11 +23,7 @@ use Throwable;
* return new Promise\FulfilledPromise($value);
* }
*
<<<<<<< HEAD
* $promise = Promise\coroutine(function () {
=======
* $promise = Promise\Coroutine::of(function () {
>>>>>>> master
* $value = (yield createPromise('a'));
* try {
* $value = (yield createPromise($value . 'b'));
@ -50,10 +39,7 @@ use Throwable;
* @param callable $generatorFn Generator function to wrap into a promise.
*
* @return Promise
<<<<<<< HEAD
=======
*
>>>>>>> master
* @link https://github.com/petkaantonov/bluebird/blob/master/API.md#generators inspiration
*/
final class Coroutine implements PromiseInterface
@ -81,9 +67,6 @@ final class Coroutine implements PromiseInterface
$this->currentPromise->wait();
}
});
<<<<<<< HEAD
$this->nextCoroutine($this->generator->current());
=======
try {
$this->nextCoroutine($this->generator->current());
} catch (\Exception $exception) {
@ -101,7 +84,6 @@ final class Coroutine implements PromiseInterface
public static function of(callable $generatorFn)
{
return new self($generatorFn);
>>>>>>> master
}
public function then(
@ -144,11 +126,7 @@ final class Coroutine implements PromiseInterface
private function nextCoroutine($yielded)
{
<<<<<<< HEAD
$this->currentPromise = promise_for($yielded)
=======
$this->currentPromise = Create::promiseFor($yielded)
>>>>>>> master
->then([$this, '_handleSuccess'], [$this, '_handleFailure']);
}
@ -179,11 +157,7 @@ final class Coroutine implements PromiseInterface
{
unset($this->currentPromise);
try {
<<<<<<< HEAD
$nextYield = $this->generator->throw(exception_for($reason));
=======
$nextYield = $this->generator->throw(Create::exceptionFor($reason));
>>>>>>> master
// The throw was caught, so keep iterating on the coroutine
$this->nextCoroutine($nextYield);
} catch (Exception $exception) {

View File

@ -1,8 +1,5 @@
<?php
<<<<<<< HEAD
=======
>>>>>>> master
namespace GuzzleHttp\Promise;
/**
@ -13,24 +10,6 @@ class EachPromise implements PromisorInterface
{
private $pending = [];
<<<<<<< HEAD
/** @var \Iterator */
private $iterable;
/** @var callable|int */
private $concurrency;
/** @var callable */
private $onFulfilled;
/** @var callable */
private $onRejected;
/** @var Promise */
private $aggregate;
/** @var bool */
=======
/** @var \Iterator|null */
private $iterable;
@ -47,7 +26,6 @@ class EachPromise implements PromisorInterface
private $aggregate;
/** @var bool|null */
>>>>>>> master
private $mutex;
/**
@ -68,21 +46,12 @@ class EachPromise implements PromisorInterface
* allowed number of outstanding concurrently executing promises,
* creating a capped pool of promises. There is no limit by default.
*
<<<<<<< HEAD
* @param mixed $iterable Promises or values to iterate.
* @param array $config Configuration options
*/
public function __construct($iterable, array $config = [])
{
$this->iterable = iter_for($iterable);
=======
* @param mixed $iterable Promises or values to iterate.
* @param array $config Configuration options
*/
public function __construct($iterable, array $config = [])
{
$this->iterable = Create::iterFor($iterable);
>>>>>>> master
if (isset($config['concurrency'])) {
$this->concurrency = $config['concurrency'];
@ -97,10 +66,7 @@ class EachPromise implements PromisorInterface
}
}
<<<<<<< HEAD
=======
/** @psalm-suppress InvalidNullableReturnType */
>>>>>>> master
public function promise()
{
if ($this->aggregate) {
@ -109,16 +75,6 @@ class EachPromise implements PromisorInterface
try {
$this->createPromise();
<<<<<<< HEAD
$this->iterable->rewind();
$this->refillPending();
} catch (\Throwable $e) {
$this->aggregate->reject($e);
} catch (\Exception $e) {
$this->aggregate->reject($e);
}
=======
/** @psalm-assert Promise $this->aggregate */
$this->iterable->rewind();
if (!$this->checkIfFinished()) {
@ -142,7 +98,6 @@ class EachPromise implements PromisorInterface
* @psalm-suppress NullableReturnStatement
* @phpstan-ignore-next-line
*/
>>>>>>> master
return $this->aggregate;
}
@ -151,24 +106,12 @@ class EachPromise implements PromisorInterface
$this->mutex = false;
$this->aggregate = new Promise(function () {
reset($this->pending);
<<<<<<< HEAD
if (empty($this->pending) && !$this->iterable->valid()) {
$this->aggregate->resolve(null);
return;
}
=======
>>>>>>> master
// Consume a potentially fluctuating list of promises while
// ensuring that indexes are maintained (precluding array_shift).
while ($promise = current($this->pending)) {
next($this->pending);
$promise->wait();
<<<<<<< HEAD
if ($this->aggregate->getState() !== PromiseInterface::PENDING) {
=======
if (Is::settled($this->aggregate)) {
>>>>>>> master
return;
}
}
@ -217,16 +160,6 @@ class EachPromise implements PromisorInterface
return false;
}
<<<<<<< HEAD
$promise = promise_for($this->iterable->current());
$idx = $this->iterable->key();
$this->pending[$idx] = $promise->then(
function ($value) use ($idx) {
if ($this->onFulfilled) {
call_user_func(
$this->onFulfilled, $value, $idx, $this->aggregate
=======
$promise = Create::promiseFor($this->iterable->current());
$key = $this->iterable->key();
@ -244,17 +177,10 @@ class EachPromise implements PromisorInterface
$value,
$key,
$this->aggregate
>>>>>>> master
);
}
$this->step($idx);
},
<<<<<<< HEAD
function ($reason) use ($idx) {
if ($this->onRejected) {
call_user_func(
$this->onRejected, $reason, $idx, $this->aggregate
=======
function ($reason) use ($idx, $key) {
if ($this->onRejected) {
call_user_func(
@ -262,7 +188,6 @@ class EachPromise implements PromisorInterface
$reason,
$key,
$this->aggregate
>>>>>>> master
);
}
$this->step($idx);
@ -300,11 +225,7 @@ class EachPromise implements PromisorInterface
private function step($idx)
{
// If the promise was already resolved, then ignore this step.
<<<<<<< HEAD
if ($this->aggregate->getState() !== PromiseInterface::PENDING) {
=======
if (Is::settled($this->aggregate)) {
>>>>>>> master
return;
}

View File

@ -1,8 +1,5 @@
<?php
<<<<<<< HEAD
=======
>>>>>>> master
namespace GuzzleHttp\Promise;
/**
@ -17,16 +14,10 @@ class FulfilledPromise implements PromiseInterface
public function __construct($value)
{
<<<<<<< HEAD
if (method_exists($value, 'then')) {
throw new \InvalidArgumentException(
'You cannot create a FulfilledPromise with a promise.');
=======
if (is_object($value) && method_exists($value, 'then')) {
throw new \InvalidArgumentException(
'You cannot create a FulfilledPromise with a promise.'
);
>>>>>>> master
}
$this->value = $value;
@ -41,19 +32,11 @@ class FulfilledPromise implements PromiseInterface
return $this;
}
<<<<<<< HEAD
$queue = queue();
$p = new Promise([$queue, 'run']);
$value = $this->value;
$queue->add(static function () use ($p, $value, $onFulfilled) {
if ($p->getState() === self::PENDING) {
=======
$queue = Utils::queue();
$p = new Promise([$queue, 'run']);
$value = $this->value;
$queue->add(static function () use ($p, $value, $onFulfilled) {
if (Is::pending($p)) {
>>>>>>> master
try {
$p->resolve($onFulfilled($value));
} catch (\Throwable $e) {

View File

@ -1,8 +1,5 @@
<?php
<<<<<<< HEAD
=======
>>>>>>> master
namespace GuzzleHttp\Promise;
/**
@ -45,23 +42,13 @@ class Promise implements PromiseInterface
// Return a fulfilled promise and immediately invoke any callbacks.
if ($this->state === self::FULFILLED) {
<<<<<<< HEAD
return $onFulfilled
? promise_for($this->result)->then($onFulfilled)
: promise_for($this->result);
=======
$promise = Create::promiseFor($this->result);
return $onFulfilled ? $promise->then($onFulfilled) : $promise;
>>>>>>> master
}
// It's either cancelled or rejected, so return a rejected promise
// and immediately invoke any callbacks.
<<<<<<< HEAD
$rejection = rejection_for($this->result);
=======
$rejection = Create::rejectionFor($this->result);
>>>>>>> master
return $onRejected ? $rejection->then(null, $onRejected) : $rejection;
}
@ -74,21 +61,6 @@ class Promise implements PromiseInterface
{
$this->waitIfPending();
<<<<<<< HEAD
$inner = $this->result instanceof PromiseInterface
? $this->result->wait($unwrap)
: $this->result;
if ($unwrap) {
if ($this->result instanceof PromiseInterface
|| $this->state === self::FULFILLED
) {
return $inner;
} else {
// It's rejected so "unwrap" and throw an exception.
throw exception_for($inner);
}
=======
if ($this->result instanceof PromiseInterface) {
return $this->result->wait($unwrap);
}
@ -98,7 +70,6 @@ class Promise implements PromiseInterface
}
// It's rejected so "unwrap" and throw an exception.
throw Create::exceptionFor($this->result);
>>>>>>> master
}
}
@ -128,10 +99,7 @@ class Promise implements PromiseInterface
}
// Reject the promise only if it wasn't rejected in a then callback.
<<<<<<< HEAD
=======
/** @psalm-suppress RedundantCondition */
>>>>>>> master
if ($this->state === self::PENDING) {
$this->reject(new CancellationException('Promise has been cancelled'));
}
@ -177,28 +145,15 @@ class Promise implements PromiseInterface
// If the value was not a settled promise or a thenable, then resolve
// it in the task queue using the correct ID.
<<<<<<< HEAD
if (!method_exists($value, 'then')) {
$id = $state === self::FULFILLED ? 1 : 2;
// It's a success, so resolve the handlers in the queue.
queue()->add(static function () use ($id, $value, $handlers) {
=======
if (!is_object($value) || !method_exists($value, 'then')) {
$id = $state === self::FULFILLED ? 1 : 2;
// It's a success, so resolve the handlers in the queue.
Utils::queue()->add(static function () use ($id, $value, $handlers) {
>>>>>>> master
foreach ($handlers as $handler) {
self::callHandler($id, $value, $handler);
}
});
<<<<<<< HEAD
} elseif ($value instanceof Promise
&& $value->getState() === self::PENDING
) {
=======
} elseif ($value instanceof Promise && Is::pending($value)) {
>>>>>>> master
// We can just merge our handlers onto the next promise.
$value->handlers = array_merge($value->handlers, $handlers);
} else {
@ -224,11 +179,6 @@ class Promise implements PromiseInterface
* @param int $index 1 (resolve) or 2 (reject).
* @param mixed $value Value to pass to the callback.
* @param array $handler Array of handler data (promise and callbacks).
<<<<<<< HEAD
*
* @return array Returns the next group to resolve.
=======
>>>>>>> master
*/
private static function callHandler($index, $value, array $handler)
{
@ -237,19 +187,12 @@ class Promise implements PromiseInterface
// The promise may have been cancelled or resolved before placing
// this thunk in the queue.
<<<<<<< HEAD
if ($promise->getState() !== self::PENDING) {
=======
if (Is::settled($promise)) {
>>>>>>> master
return;
}
try {
if (isset($handler[$index])) {
<<<<<<< HEAD
$promise->resolve($handler[$index]($value));
=======
/*
* If $f throws an exception, then $handler will be in the exception
* stack trace. Since $handler contains a reference to the callable
@ -259,7 +202,6 @@ class Promise implements PromiseInterface
$f = $handler[$index];
unset($handler);
$promise->resolve($f($value));
>>>>>>> master
} elseif ($index === 1) {
// Forward resolution values as-is.
$promise->resolve($value);
@ -283,25 +225,16 @@ class Promise implements PromiseInterface
} elseif ($this->waitList) {
$this->invokeWaitList();
} else {
<<<<<<< HEAD
// If there's not wait function, then reject the promise.
=======
// If there's no wait function, then reject the promise.
>>>>>>> master
$this->reject('Cannot wait on a promise that has '
. 'no internal wait function. You must provide a wait '
. 'function when constructing the promise to be able to '
. 'wait on a promise.');
}
<<<<<<< HEAD
queue()->run();
=======
Utils::queue()->run();
/** @psalm-suppress RedundantCondition */
>>>>>>> master
if ($this->state === self::PENDING) {
$this->reject('Invoking the wait callback did not resolve the promise');
}
@ -332,19 +265,6 @@ class Promise implements PromiseInterface
$this->waitList = null;
foreach ($waitList as $result) {
<<<<<<< HEAD
while (true) {
$result->waitIfPending();
if ($result->result instanceof Promise) {
$result = $result->result;
} else {
if ($result->result instanceof PromiseInterface) {
$result->result->wait(false);
}
break;
}
=======
do {
$result->waitIfPending();
$result = $result->result;
@ -352,7 +272,6 @@ class Promise implements PromiseInterface
if ($result instanceof PromiseInterface) {
$result->wait(false);
>>>>>>> master
}
}
}

View File

@ -1,8 +1,5 @@
<?php
<<<<<<< HEAD
=======
>>>>>>> master
namespace GuzzleHttp\Promise;
/**
@ -60,10 +57,7 @@ interface PromiseInterface
* Resolve the promise with the given value.
*
* @param mixed $value
<<<<<<< HEAD
=======
*
>>>>>>> master
* @throws \RuntimeException if the promise is already resolved.
*/
public function resolve($value);
@ -72,10 +66,7 @@ interface PromiseInterface
* Reject the promise with the given reason.
*
* @param mixed $reason
<<<<<<< HEAD
=======
*
>>>>>>> master
* @throws \RuntimeException if the promise is already resolved.
*/
public function reject($reason);
@ -98,10 +89,7 @@ interface PromiseInterface
* @param bool $unwrap
*
* @return mixed
<<<<<<< HEAD
=======
*
>>>>>>> master
* @throws \LogicException if the promise has no wait function or if the
* promise does not settle after waiting.
*/

View File

@ -1,8 +1,5 @@
<?php
<<<<<<< HEAD
=======
>>>>>>> master
namespace GuzzleHttp\Promise;
/**

View File

@ -1,8 +1,5 @@
<?php
<<<<<<< HEAD
=======
>>>>>>> master
namespace GuzzleHttp\Promise;
/**
@ -17,16 +14,10 @@ class RejectedPromise implements PromiseInterface
public function __construct($reason)
{
<<<<<<< HEAD
if (method_exists($reason, 'then')) {
throw new \InvalidArgumentException(
'You cannot create a RejectedPromise with a promise.');
=======
if (is_object($reason) && method_exists($reason, 'then')) {
throw new \InvalidArgumentException(
'You cannot create a RejectedPromise with a promise.'
);
>>>>>>> master
}
$this->reason = $reason;
@ -41,19 +32,11 @@ class RejectedPromise implements PromiseInterface
return $this;
}
<<<<<<< HEAD
$queue = queue();
$reason = $this->reason;
$p = new Promise([$queue, 'run']);
$queue->add(static function () use ($p, $reason, $onRejected) {
if ($p->getState() === self::PENDING) {
=======
$queue = Utils::queue();
$reason = $this->reason;
$p = new Promise([$queue, 'run']);
$queue->add(static function () use ($p, $reason, $onRejected) {
if (Is::pending($p)) {
>>>>>>> master
try {
// Return a resolved promise if onRejected does not throw.
$p->resolve($onRejected($reason));
@ -78,15 +61,10 @@ class RejectedPromise implements PromiseInterface
public function wait($unwrap = true, $defaultDelivery = null)
{
if ($unwrap) {
<<<<<<< HEAD
throw exception_for($this->reason);
}
=======
throw Create::exceptionFor($this->reason);
}
return null;
>>>>>>> master
}
public function getState()

View File

@ -1,8 +1,5 @@
<?php
<<<<<<< HEAD
=======
>>>>>>> master
namespace GuzzleHttp\Promise;
/**
@ -16,11 +13,7 @@ class RejectionException extends \RuntimeException
private $reason;
/**
<<<<<<< HEAD
* @param mixed $reason Rejection reason.
=======
* @param mixed $reason Rejection reason.
>>>>>>> master
* @param string $description Optional description
*/
public function __construct($reason, $description = null)

View File

@ -1,8 +1,5 @@
<?php
<<<<<<< HEAD
=======
>>>>>>> master
namespace GuzzleHttp\Promise;
/**
@ -12,11 +9,7 @@ namespace GuzzleHttp\Promise;
* maintains a constant stack size. You can use the task queue asynchronously
* by calling the `run()` function of the global task queue in an event loop.
*
<<<<<<< HEAD
* GuzzleHttp\Promise\queue()->run();
=======
* GuzzleHttp\Promise\Utils::queue()->run();
>>>>>>> master
*/
class TaskQueue implements TaskQueueInterface
{
@ -50,13 +43,8 @@ class TaskQueue implements TaskQueueInterface
public function run()
{
<<<<<<< HEAD
/** @var callable $task */
while ($task = array_shift($this->queue)) {
=======
while ($task = array_shift($this->queue)) {
/** @var callable $task */
>>>>>>> master
$task();
}
}

View File

@ -1,8 +1,5 @@
<?php
<<<<<<< HEAD
=======
>>>>>>> master
namespace GuzzleHttp\Promise;
interface TaskQueueInterface
@ -17,11 +14,6 @@ interface TaskQueueInterface
/**
* Adds a task to the queue that will be executed the next time run is
* called.
<<<<<<< HEAD
*
* @param callable $task
=======
>>>>>>> master
*/
public function add(callable $task);

View File

@ -1,8 +1,5 @@
<?php
<<<<<<< HEAD
=======
>>>>>>> master
namespace GuzzleHttp\Promise;
/**
@ -21,27 +18,12 @@ namespace GuzzleHttp\Promise;
* @param TaskQueueInterface $assign Optionally specify a new queue instance.
*
* @return TaskQueueInterface
<<<<<<< HEAD
*/
function queue(TaskQueueInterface $assign = null)
{
static $queue;
if ($assign) {
$queue = $assign;
} elseif (!$queue) {
$queue = new TaskQueue();
}
return $queue;
=======
*
* @deprecated queue will be removed in guzzlehttp/promises:2.0. Use Utils::queue instead.
*/
function queue(TaskQueueInterface $assign = null)
{
return Utils::queue($assign);
>>>>>>> master
}
/**
@ -51,31 +33,12 @@ function queue(TaskQueueInterface $assign = null)
* @param callable $task Task function to run.
*
* @return PromiseInterface
<<<<<<< HEAD
*/
function task(callable $task)
{
$queue = queue();
$promise = new Promise([$queue, 'run']);
$queue->add(function () use ($task, $promise) {
try {
$promise->resolve($task());
} catch (\Throwable $e) {
$promise->reject($e);
} catch (\Exception $e) {
$promise->reject($e);
}
});
return $promise;
=======
*
* @deprecated task will be removed in guzzlehttp/promises:2.0. Use Utils::task instead.
*/
function task(callable $task)
{
return Utils::task($task);
>>>>>>> master
}
/**
@ -84,32 +47,12 @@ function task(callable $task)
* @param mixed $value Promise or value.
*
* @return PromiseInterface
<<<<<<< HEAD
*/
function promise_for($value)
{
if ($value instanceof PromiseInterface) {
return $value;
}
// Return a Guzzle promise that shadows the given promise.
if (method_exists($value, 'then')) {
$wfn = method_exists($value, 'wait') ? [$value, 'wait'] : null;
$cfn = method_exists($value, 'cancel') ? [$value, 'cancel'] : null;
$promise = new Promise($wfn, $cfn);
$value->then([$promise, 'resolve'], [$promise, 'reject']);
return $promise;
}
return new FulfilledPromise($value);
=======
*
* @deprecated promise_for will be removed in guzzlehttp/promises:2.0. Use Create::promiseFor instead.
*/
function promise_for($value)
{
return Create::promiseFor($value);
>>>>>>> master
}
/**
@ -119,23 +62,12 @@ function promise_for($value)
* @param mixed $reason Promise or reason.
*
* @return PromiseInterface
<<<<<<< HEAD
*/
function rejection_for($reason)
{
if ($reason instanceof PromiseInterface) {
return $reason;
}
return new RejectedPromise($reason);
=======
*
* @deprecated rejection_for will be removed in guzzlehttp/promises:2.0. Use Create::rejectionFor instead.
*/
function rejection_for($reason)
{
return Create::rejectionFor($reason);
>>>>>>> master
}
/**
@ -144,21 +76,12 @@ function rejection_for($reason)
* @param mixed $reason
*
* @return \Exception|\Throwable
<<<<<<< HEAD
*/
function exception_for($reason)
{
return $reason instanceof \Exception || $reason instanceof \Throwable
? $reason
: new RejectionException($reason);
=======
*
* @deprecated exception_for will be removed in guzzlehttp/promises:2.0. Use Create::exceptionFor instead.
*/
function exception_for($reason)
{
return Create::exceptionFor($reason);
>>>>>>> master
}
/**
@ -167,25 +90,12 @@ function exception_for($reason)
* @param mixed $value
*
* @return \Iterator
<<<<<<< HEAD
*/
function iter_for($value)
{
if ($value instanceof \Iterator) {
return $value;
} elseif (is_array($value)) {
return new \ArrayIterator($value);
} else {
return new \ArrayIterator([$value]);
}
=======
*
* @deprecated iter_for will be removed in guzzlehttp/promises:2.0. Use Create::iterFor instead.
*/
function iter_for($value)
{
return Create::iterFor($value);
>>>>>>> master
}
/**
@ -201,30 +111,12 @@ function iter_for($value)
* @param PromiseInterface $promise Promise or value.
*
* @return array
<<<<<<< HEAD
*/
function inspect(PromiseInterface $promise)
{
try {
return [
'state' => PromiseInterface::FULFILLED,
'value' => $promise->wait()
];
} catch (RejectionException $e) {
return ['state' => PromiseInterface::REJECTED, 'reason' => $e->getReason()];
} catch (\Throwable $e) {
return ['state' => PromiseInterface::REJECTED, 'reason' => $e];
} catch (\Exception $e) {
return ['state' => PromiseInterface::REJECTED, 'reason' => $e];
}
=======
*
* @deprecated inspect will be removed in guzzlehttp/promises:2.0. Use Utils::inspect instead.
*/
function inspect(PromiseInterface $promise)
{
return Utils::inspect($promise);
>>>>>>> master
}
/**
@ -233,21 +125,6 @@ function inspect(PromiseInterface $promise)
*
* Returns an array of inspection state arrays.
*
<<<<<<< HEAD
* @param PromiseInterface[] $promises Traversable of promises to wait upon.
*
* @return array
* @see GuzzleHttp\Promise\inspect for the inspection state array format.
*/
function inspect_all($promises)
{
$results = [];
foreach ($promises as $key => $promise) {
$results[$key] = inspect($promise);
}
return $results;
=======
* @see inspect for the inspection state array format.
*
* @param PromiseInterface[] $promises Traversable of promises to wait upon.
@ -259,7 +136,6 @@ function inspect_all($promises)
function inspect_all($promises)
{
return Utils::inspectAll($promises);
>>>>>>> master
}
/**
@ -269,22 +145,6 @@ function inspect_all($promises)
* the promises were provided). An exception is thrown if any of the promises
* are rejected.
*
<<<<<<< HEAD
* @param mixed $promises Iterable of PromiseInterface objects to wait on.
*
* @return array
* @throws \Exception on error
* @throws \Throwable on error in PHP >=7
*/
function unwrap($promises)
{
$results = [];
foreach ($promises as $key => $promise) {
$results[$key] = $promise->wait();
}
return $results;
=======
* @param iterable<PromiseInterface> $promises Iterable of PromiseInterface objects to wait on.
*
* @return array
@ -297,7 +157,6 @@ function unwrap($promises)
function unwrap($promises)
{
return Utils::unwrap($promises);
>>>>>>> master
}
/**
@ -308,27 +167,6 @@ function unwrap($promises)
* respective positions to the original array. If any promise in the array
* rejects, the returned promise is rejected with the rejection reason.
*
<<<<<<< HEAD
* @param mixed $promises Promises or values.
*
* @return PromiseInterface
*/
function all($promises)
{
$results = [];
return each(
$promises,
function ($value, $idx) use (&$results) {
$results[$idx] = $value;
},
function ($reason, $idx, Promise $aggregate) {
$aggregate->reject($reason);
}
)->then(function () use (&$results) {
ksort($results);
return $results;
});
=======
* @param mixed $promises Promises or values.
* @param bool $recursive If true, resolves new promises that might have been added to the stack during its own resolution.
*
@ -339,7 +177,6 @@ function all($promises)
function all($promises, $recursive = false)
{
return Utils::all($promises, $recursive);
>>>>>>> master
}
/**
@ -350,59 +187,19 @@ function all($promises, $recursive = false)
* fulfilled with an array that contains the fulfillment values of the winners
* in order of resolution.
*
<<<<<<< HEAD
* This prommise is rejected with a {@see GuzzleHttp\Promise\AggregateException}
* if the number of fulfilled promises is less than the desired $count.
=======
* This promise is rejected with a {@see AggregateException} if the number of
* fulfilled promises is less than the desired $count.
>>>>>>> master
*
* @param int $count Total number of promises.
* @param mixed $promises Promises or values.
*
* @return PromiseInterface
<<<<<<< HEAD
*/
function some($count, $promises)
{
$results = [];
$rejections = [];
return each(
$promises,
function ($value, $idx, PromiseInterface $p) use (&$results, $count) {
if ($p->getState() !== PromiseInterface::PENDING) {
return;
}
$results[$idx] = $value;
if (count($results) >= $count) {
$p->resolve(null);
}
},
function ($reason) use (&$rejections) {
$rejections[] = $reason;
}
)->then(
function () use (&$results, &$rejections, $count) {
if (count($results) !== $count) {
throw new AggregateException(
'Not enough promises to fulfill count',
$rejections
);
}
ksort($results);
return array_values($results);
}
);
=======
*
* @deprecated some will be removed in guzzlehttp/promises:2.0. Use Utils::some instead.
*/
function some($count, $promises)
{
return Utils::some($count, $promises);
>>>>>>> master
}
/**
@ -412,19 +209,12 @@ function some($count, $promises)
* @param mixed $promises Promises or values.
*
* @return PromiseInterface
<<<<<<< HEAD
*/
function any($promises)
{
return some(1, $promises)->then(function ($values) { return $values[0]; });
=======
*
* @deprecated any will be removed in guzzlehttp/promises:2.0. Use Utils::any instead.
*/
function any($promises)
{
return Utils::any($promises);
>>>>>>> master
}
/**
@ -433,29 +223,6 @@ function any($promises)
*
* The returned promise is fulfilled with an array of inspection state arrays.
*
<<<<<<< HEAD
* @param mixed $promises Promises or values.
*
* @return PromiseInterface
* @see GuzzleHttp\Promise\inspect for the inspection state array format.
*/
function settle($promises)
{
$results = [];
return each(
$promises,
function ($value, $idx) use (&$results) {
$results[$idx] = ['state' => PromiseInterface::FULFILLED, 'value' => $value];
},
function ($reason, $idx) use (&$results) {
$results[$idx] = ['state' => PromiseInterface::REJECTED, 'reason' => $reason];
}
)->then(function () use (&$results) {
ksort($results);
return $results;
});
=======
* @see inspect for the inspection state array format.
*
* @param mixed $promises Promises or values.
@ -467,7 +234,6 @@ function settle($promises)
function settle($promises)
{
return Utils::settle($promises);
>>>>>>> master
}
/**
@ -475,15 +241,6 @@ function settle($promises)
* fulfilled with a null value when the iterator has been consumed or the
* aggregate promise has been fulfilled or rejected.
*
<<<<<<< HEAD
* $onFulfilled is a function that accepts the fulfilled value, iterator
* index, and the aggregate promise. The callback can invoke any necessary side
* effects and choose to resolve or reject the aggregate promise if needed.
*
* $onRejected is a function that accepts the rejection reason, iterator
* index, and the aggregate promise. The callback can invoke any necessary side
* effects and choose to resolve or reject the aggregate promise if needed.
=======
* $onFulfilled is a function that accepts the fulfilled value, iterator index,
* and the aggregate promise. The callback can invoke any necessary side
* effects and choose to resolve or reject the aggregate if needed.
@ -491,32 +248,21 @@ function settle($promises)
* $onRejected is a function that accepts the rejection reason, iterator index,
* and the aggregate promise. The callback can invoke any necessary side
* effects and choose to resolve or reject the aggregate if needed.
>>>>>>> master
*
* @param mixed $iterable Iterator or array to iterate over.
* @param callable $onFulfilled
* @param callable $onRejected
*
* @return PromiseInterface
<<<<<<< HEAD
=======
*
* @deprecated each will be removed in guzzlehttp/promises:2.0. Use Each::of instead.
>>>>>>> master
*/
function each(
$iterable,
callable $onFulfilled = null,
callable $onRejected = null
) {
<<<<<<< HEAD
return (new EachPromise($iterable, [
'fulfilled' => $onFulfilled,
'rejected' => $onRejected
]))->promise();
=======
return Each::of($iterable, $onFulfilled, $onRejected);
>>>>>>> master
}
/**
@ -533,11 +279,8 @@ function each(
* @param callable $onRejected
*
* @return PromiseInterface
<<<<<<< HEAD
=======
*
* @deprecated each_limit will be removed in guzzlehttp/promises:2.0. Use Each::ofLimit instead.
>>>>>>> master
*/
function each_limit(
$iterable,
@ -545,15 +288,7 @@ function each_limit(
callable $onFulfilled = null,
callable $onRejected = null
) {
<<<<<<< HEAD
return (new EachPromise($iterable, [
'fulfilled' => $onFulfilled,
'rejected' => $onRejected,
'concurrency' => $concurrency
]))->promise();
=======
return Each::ofLimit($iterable, $concurrency, $onFulfilled, $onRejected);
>>>>>>> master
}
/**
@ -566,43 +301,20 @@ function each_limit(
* @param callable $onFulfilled
*
* @return PromiseInterface
<<<<<<< HEAD
=======
*
* @deprecated each_limit_all will be removed in guzzlehttp/promises:2.0. Use Each::ofLimitAll instead.
>>>>>>> master
*/
function each_limit_all(
$iterable,
$concurrency,
callable $onFulfilled = null
) {
<<<<<<< HEAD
return each_limit(
$iterable,
$concurrency,
$onFulfilled,
function ($reason, $idx, PromiseInterface $aggregate) {
$aggregate->reject($reason);
}
);
=======
return Each::ofLimitAll($iterable, $concurrency, $onFulfilled);
>>>>>>> master
}
/**
* Returns true if a promise is fulfilled.
*
<<<<<<< HEAD
* @param PromiseInterface $promise
*
* @return bool
*/
function is_fulfilled(PromiseInterface $promise)
{
return $promise->getState() === PromiseInterface::FULFILLED;
=======
* @return bool
*
* @deprecated is_fulfilled will be removed in guzzlehttp/promises:2.0. Use Is::fulfilled instead.
@ -610,21 +322,11 @@ function is_fulfilled(PromiseInterface $promise)
function is_fulfilled(PromiseInterface $promise)
{
return Is::fulfilled($promise);
>>>>>>> master
}
/**
* Returns true if a promise is rejected.
*
<<<<<<< HEAD
* @param PromiseInterface $promise
*
* @return bool
*/
function is_rejected(PromiseInterface $promise)
{
return $promise->getState() === PromiseInterface::REJECTED;
=======
* @return bool
*
* @deprecated is_rejected will be removed in guzzlehttp/promises:2.0. Use Is::rejected instead.
@ -632,33 +334,11 @@ function is_rejected(PromiseInterface $promise)
function is_rejected(PromiseInterface $promise)
{
return Is::rejected($promise);
>>>>>>> master
}
/**
* Returns true if a promise is fulfilled or rejected.
*
<<<<<<< HEAD
* @param PromiseInterface $promise
*
* @return bool
*/
function is_settled(PromiseInterface $promise)
{
return $promise->getState() !== PromiseInterface::PENDING;
}
/**
* @see Coroutine
*
* @param callable $generatorFn
*
* @return PromiseInterface
*/
function coroutine(callable $generatorFn)
{
return new Coroutine($generatorFn);
=======
* @return bool
*
* @deprecated is_settled will be removed in guzzlehttp/promises:2.0. Use Is::settled instead.
@ -680,5 +360,4 @@ function is_settled(PromiseInterface $promise)
function coroutine(callable $generatorFn)
{
return Coroutine::of($generatorFn);
>>>>>>> master
}

View File

@ -9,10 +9,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## [Unreleased]
<<<<<<< HEAD
## [1.6.0]
=======
## [1.7.0] - 2020-09-30
### Added
@ -39,7 +35,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## [1.6.0] - 2019-06-30
>>>>>>> master
### Added

View File

@ -23,19 +23,11 @@ Reads from multiple streams, one after the other.
```php
use GuzzleHttp\Psr7;
<<<<<<< HEAD
$a = Psr7\stream_for('abc, ');
$b = Psr7\stream_for('123.');
$composed = new Psr7\AppendStream([$a, $b]);
$composed->addStream(Psr7\stream_for(' Above all listen to me'));
=======
$a = Psr7\Utils::streamFor('abc, ');
$b = Psr7\Utils::streamFor('123.');
$composed = new Psr7\AppendStream([$a, $b]);
$composed->addStream(Psr7\Utils::streamFor(' Above all listen to me'));
>>>>>>> master
echo $composed; // abc, 123. Above all listen to me.
```
@ -73,11 +65,7 @@ then on disk.
```php
use GuzzleHttp\Psr7;
<<<<<<< HEAD
$original = Psr7\stream_for(fopen('http://www.google.com', 'r'));
=======
$original = Psr7\Utils::streamFor(fopen('http://www.google.com', 'r'));
>>>>>>> master
$stream = new Psr7\CachingStream($original);
$stream->read(1024);
@ -101,11 +89,7 @@ stream becomes too full.
use GuzzleHttp\Psr7;
// Create an empty stream
<<<<<<< HEAD
$stream = Psr7\stream_for();
=======
$stream = Psr7\Utils::streamFor();
>>>>>>> master
// Start dropping data when the stream has more than 10 bytes
$dropping = new Psr7\DroppingStream($stream, 10);
@ -128,11 +112,7 @@ to create a concrete class for a simple extension point.
use GuzzleHttp\Psr7;
<<<<<<< HEAD
$stream = Psr7\stream_for('hi');
=======
$stream = Psr7\Utils::streamFor('hi');
>>>>>>> master
$fnStream = Psr7\FnStream::decorate($stream, [
'rewind' => function () use ($stream) {
echo 'About to rewind - ';
@ -187,11 +167,7 @@ chunks (e.g. Amazon S3's multipart upload API).
```php
use GuzzleHttp\Psr7;
<<<<<<< HEAD
$original = Psr7\stream_for(fopen('/tmp/test.txt', 'r+'));
=======
$original = Psr7\Utils::streamFor(fopen('/tmp/test.txt', 'r+'));
>>>>>>> master
echo $original->getSize();
// >>> 1048576
@ -221,11 +197,7 @@ NoSeekStream wraps a stream and does not allow seeking.
```php
use GuzzleHttp\Psr7;
<<<<<<< HEAD
$original = Psr7\stream_for('foo');
=======
$original = Psr7\Utils::streamFor('foo');
>>>>>>> master
$noSeek = new Psr7\NoSeekStream($original);
echo $noSeek->read(3);
@ -299,11 +271,7 @@ This decorator could be added to any existing stream and used like so:
```php
use GuzzleHttp\Psr7;
<<<<<<< HEAD
$original = Psr7\stream_for('foo');
=======
$original = Psr7\Utils::streamFor('foo');
>>>>>>> master
$eofStream = new EofCallbackStream($original, function () {
echo 'EOF!';
@ -329,26 +297,12 @@ stream from a PSR-7 stream.
```php
use GuzzleHttp\Psr7\StreamWrapper;
<<<<<<< HEAD
$stream = GuzzleHttp\Psr7\stream_for('hello!');
=======
$stream = GuzzleHttp\Psr7\Utils::streamFor('hello!');
>>>>>>> master
$resource = StreamWrapper::getResource($stream);
echo fread($resource, 6); // outputs hello!
```
<<<<<<< HEAD
# Function API
There are various functions available under the `GuzzleHttp\Psr7` namespace.
## `function str`
`function str(MessageInterface $message)`
=======
# Static API
There are various static methods available under the `GuzzleHttp\Psr7` namespace.
@ -357,162 +311,11 @@ There are various static methods available under the `GuzzleHttp\Psr7` namespace
## `GuzzleHttp\Psr7\Message::toString`
`public static function toString(MessageInterface $message): string`
>>>>>>> master
Returns the string representation of an HTTP message.
```php
$request = new GuzzleHttp\Psr7\Request('GET', 'http://example.com');
<<<<<<< HEAD
echo GuzzleHttp\Psr7\str($request);
```
## `function uri_for`
`function uri_for($uri)`
This function accepts a string or `Psr\Http\Message\UriInterface` and returns a
UriInterface for the given value. If the value is already a `UriInterface`, it
is returned as-is.
```php
$uri = GuzzleHttp\Psr7\uri_for('http://example.com');
assert($uri === GuzzleHttp\Psr7\uri_for($uri));
```
## `function stream_for`
`function stream_for($resource = '', array $options = [])`
Create a new stream based on the input type.
Options is an associative array that can contain the following keys:
* - metadata: Array of custom metadata.
* - size: Size of the stream.
This method accepts the following `$resource` types:
- `Psr\Http\Message\StreamInterface`: Returns the value as-is.
- `string`: Creates a stream object that uses the given string as the contents.
- `resource`: Creates a stream object that wraps the given PHP stream resource.
- `Iterator`: If the provided value implements `Iterator`, then a read-only
stream object will be created that wraps the given iterable. Each time the
stream is read from, data from the iterator will fill a buffer and will be
continuously called until the buffer is equal to the requested read size.
Subsequent read calls will first read from the buffer and then call `next`
on the underlying iterator until it is exhausted.
- `object` with `__toString()`: If the object has the `__toString()` method,
the object will be cast to a string and then a stream will be returned that
uses the string value.
- `NULL`: When `null` is passed, an empty stream object is returned.
- `callable` When a callable is passed, a read-only stream object will be
created that invokes the given callable. The callable is invoked with the
number of suggested bytes to read. The callable can return any number of
bytes, but MUST return `false` when there is no more data to return. The
stream object that wraps the callable will invoke the callable until the
number of requested bytes are available. Any additional bytes will be
buffered and used in subsequent reads.
```php
$stream = GuzzleHttp\Psr7\stream_for('foo');
$stream = GuzzleHttp\Psr7\stream_for(fopen('/path/to/file', 'r'));
$generator = function ($bytes) {
for ($i = 0; $i < $bytes; $i++) {
yield ' ';
}
}
$stream = GuzzleHttp\Psr7\stream_for($generator(100));
```
## `function parse_header`
`function parse_header($header)`
Parse an array of header values containing ";" separated data into an array of
associative arrays representing the header key value pair data of the header.
When a parameter does not contain a value, but just contains a key, this
function will inject a key with a '' string value.
## `function normalize_header`
`function normalize_header($header)`
Converts an array of header values that may contain comma separated headers
into an array of headers with no comma separated values.
## `function modify_request`
`function modify_request(RequestInterface $request, array $changes)`
Clone and modify a request with the given changes. This method is useful for
reducing the number of clones needed to mutate a message.
The changes can be one of:
- method: (string) Changes the HTTP method.
- set_headers: (array) Sets the given headers.
- remove_headers: (array) Remove the given headers.
- body: (mixed) Sets the given body.
- uri: (UriInterface) Set the URI.
- query: (string) Set the query string value of the URI.
- version: (string) Set the protocol version.
## `function rewind_body`
`function rewind_body(MessageInterface $message)`
Attempts to rewind a message body and throws an exception on failure. The body
of the message will only be rewound if a call to `tell()` returns a value other
than `0`.
## `function try_fopen`
`function try_fopen($filename, $mode)`
Safely opens a PHP stream resource using a filename.
When fopen fails, PHP normally raises a warning. This function adds an error
handler that checks for errors and throws an exception instead.
## `function copy_to_string`
`function copy_to_string(StreamInterface $stream, $maxLen = -1)`
Copy the contents of a stream into a string until the given number of bytes
have been read.
## `function copy_to_stream`
`function copy_to_stream(StreamInterface $source, StreamInterface $dest, $maxLen = -1)`
Copy the contents of a stream into another stream until the given number of
bytes have been read.
## `function hash`
`function hash(StreamInterface $stream, $algo, $rawOutput = false)`
Calculate a hash of a Stream. This method reads the entire stream to calculate
a rolling hash (based on PHP's hash_init functions).
## `function readline`
`function readline(StreamInterface $stream, $maxLength = null)`
=======
echo GuzzleHttp\Psr7\Message::toString($request);
```
@ -663,53 +466,10 @@ a message.
## `GuzzleHttp\Psr7\Utils::readLine`
`public static function readLine(StreamInterface $stream, int $maxLength = null): string`
>>>>>>> master
Read a line from the stream up to the maximum allowed buffer length.
<<<<<<< HEAD
## `function parse_request`
`function parse_request($message)`
Parses a request message string into a request object.
## `function parse_response`
`function parse_response($message)`
Parses a response message string into a response object.
## `function parse_query`
`function parse_query($str, $urlEncoding = true)`
Parse a query string into an associative array.
If multiple values are found for the same key, the value of that key value pair
will become an array. This function does not parse nested PHP style arrays into
an associative array (e.g., `foo[a]=1&foo[b]=2` will be parsed into
`['foo[a]' => '1', 'foo[b]' => '2']`).
## `function build_query`
`function build_query(array $params, $encoding = PHP_QUERY_RFC3986)`
Build a query string from an array of key value pairs.
This function can use the return value of parse_query() to build a query string.
This function does not modify the provided keys when an array is encountered
(like http_build_query would).
## `function mimetype_from_filename`
`function mimetype_from_filename($filename)`
=======
## `GuzzleHttp\Psr7\Utils::streamFor`
`public static function streamFor(resource|string|null|int|float|bool|StreamInterface|callable|\Iterator $resource = '', array $options = []): StreamInterface`
@ -782,26 +542,17 @@ UriInterface, it is returned as-is.
## `GuzzleHttp\Psr7\MimeType::fromFilename`
`public static function fromFilename(string $filename): string|null`
>>>>>>> master
Determines the mimetype of a file by looking at its extension.
<<<<<<< HEAD
## `function mimetype_from_extension`
`function mimetype_from_extension($extension)`
=======
## `GuzzleHttp\Psr7\MimeType::fromExtension`
`public static function fromExtension(string $extension): string|null`
>>>>>>> master
Maps a file extensions to a mimetype.
<<<<<<< HEAD
=======
## Upgrading from Function API
The static API was first introduced in 1.7.0, in order to mitigate problems with functions conflicting between global and local copies of the package. The function API will be removed in 2.0.0. A migration table has been provided here for your convenience:
@ -832,7 +583,6 @@ The static API was first introduced in 1.7.0, in order to mitigate problems with
| `_caseless_remove` | `Utils::caselessRemove` |
>>>>>>> master
# Additional URI Methods
Aside from the standard `Psr\Http\Message\UriInterface` implementation in form of the `GuzzleHttp\Psr7\Uri` class,

View File

@ -21,22 +21,14 @@
"ralouphie/getallheaders": "^2.0.5 || ^3.0.0"
},
"require-dev": {
<<<<<<< HEAD
"phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8",
=======
"phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.10",
>>>>>>> master
"ext-zlib": "*"
},
"provide": {
"psr/http-message-implementation": "1.0"
},
"suggest": {
<<<<<<< HEAD
"zendframework/zend-httphandlerrunner": "Emit PSR-7 responses"
=======
"laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
>>>>>>> master
},
"autoload": {
"psr-4": {
@ -51,11 +43,7 @@
},
"extra": {
"branch-alias": {
<<<<<<< HEAD
"dev-master": "1.6-dev"
=======
"dev-master": "1.7-dev"
>>>>>>> master
}
}
}

View File

@ -1,8 +1,5 @@
<?php
<<<<<<< HEAD
=======
>>>>>>> master
namespace GuzzleHttp\Psr7;
use Psr\Http\Message\StreamInterface;
@ -65,11 +62,7 @@ class AppendStream implements StreamInterface
public function getContents()
{
<<<<<<< HEAD
return copy_to_string($this);
=======
return Utils::copyToString($this);
>>>>>>> master
}
/**
@ -106,11 +99,8 @@ class AppendStream implements StreamInterface
}
$this->streams = [];
<<<<<<< HEAD
=======
return null;
>>>>>>> master
}
public function tell()

View File

@ -1,8 +1,5 @@
<?php
<<<<<<< HEAD
=======
>>>>>>> master
namespace GuzzleHttp\Psr7;
use Psr\Http\Message\StreamInterface;
@ -53,11 +50,8 @@ class BufferStream implements StreamInterface
public function detach()
{
$this->close();
<<<<<<< HEAD
=======
return null;
>>>>>>> master
}
public function getSize()

View File

@ -1,8 +1,5 @@
<?php
<<<<<<< HEAD
=======
>>>>>>> master
namespace GuzzleHttp\Psr7;
use Psr\Http\Message\StreamInterface;
@ -135,11 +132,7 @@ class CachingStream implements StreamInterface
private function cacheEntireStream()
{
$target = new FnStream(['write' => 'strlen']);
<<<<<<< HEAD
copy_to_stream($this, $target);
=======
Utils::copyToStream($this, $target);
>>>>>>> master
return $this->tell();
}

View File

@ -1,8 +1,5 @@
<?php
<<<<<<< HEAD
=======
>>>>>>> master
namespace GuzzleHttp\Psr7;
use Psr\Http\Message\StreamInterface;

View File

@ -1,8 +1,5 @@
<?php
<<<<<<< HEAD
=======
>>>>>>> master
namespace GuzzleHttp\Psr7;
use Psr\Http\Message\StreamInterface;
@ -38,10 +35,7 @@ class FnStream implements StreamInterface
/**
* Lazily determine which methods are not implemented.
<<<<<<< HEAD
=======
*
>>>>>>> master
* @throws \BadMethodCallException
*/
public function __get($name)

View File

@ -1,8 +1,5 @@
<?php
<<<<<<< HEAD
=======
>>>>>>> master
namespace GuzzleHttp\Psr7;
use Psr\Http\Message\StreamInterface;

View File

@ -1,8 +1,5 @@
<?php
<<<<<<< HEAD
=======
>>>>>>> master
namespace GuzzleHttp\Psr7;
use Psr\Http\Message\StreamInterface;
@ -38,10 +35,6 @@ class LazyOpenStream implements StreamInterface
*/
protected function createStream()
{
<<<<<<< HEAD
return stream_for(try_fopen($this->filename, $this->mode));
=======
return Utils::streamFor(Utils::tryFopen($this->filename, $this->mode));
>>>>>>> master
}
}

View File

@ -1,8 +1,5 @@
<?php
<<<<<<< HEAD
=======
>>>>>>> master
namespace GuzzleHttp\Psr7;
use Psr\Http\Message\StreamInterface;

View File

@ -1,8 +1,5 @@
<?php
<<<<<<< HEAD
=======
>>>>>>> master
namespace GuzzleHttp\Psr7;
use Psr\Http\Message\StreamInterface;
@ -21,11 +18,7 @@ trait MessageTrait
/** @var string */
private $protocol = '1.1';
<<<<<<< HEAD
/** @var StreamInterface */
=======
/** @var StreamInterface|null */
>>>>>>> master
private $stream;
public function getProtocolVersion()
@ -125,11 +118,7 @@ trait MessageTrait
public function getBody()
{
if (!$this->stream) {
<<<<<<< HEAD
$this->stream = stream_for('');
=======
$this->stream = Utils::streamFor('');
>>>>>>> master
}
return $this->stream;
@ -206,11 +195,7 @@ trait MessageTrait
}
return trim((string) $value, " \t");
<<<<<<< HEAD
}, $values);
=======
}, array_values($values));
>>>>>>> master
}
private function assertHeader($header)

View File

@ -1,8 +1,5 @@
<?php
<<<<<<< HEAD
=======
>>>>>>> master
namespace GuzzleHttp\Psr7;
use Psr\Http\Message\StreamInterface;
@ -75,11 +72,7 @@ class MultipartStream implements StreamInterface
}
// Add the trailing boundary with CRLF
<<<<<<< HEAD
$stream->addStream(stream_for("--{$this->boundary}--\r\n"));
=======
$stream->addStream(Utils::streamFor("--{$this->boundary}--\r\n"));
>>>>>>> master
return $stream;
}
@ -92,11 +85,7 @@ class MultipartStream implements StreamInterface
}
}
<<<<<<< HEAD
$element['contents'] = stream_for($element['contents']);
=======
$element['contents'] = Utils::streamFor($element['contents']);
>>>>>>> master
if (empty($element['filename'])) {
$uri = $element['contents']->getMetadata('uri');
@ -112,15 +101,9 @@ class MultipartStream implements StreamInterface
isset($element['headers']) ? $element['headers'] : []
);
<<<<<<< HEAD
$stream->addStream(stream_for($this->getHeaders($headers)));
$stream->addStream($body);
$stream->addStream(stream_for("\r\n"));
=======
$stream->addStream(Utils::streamFor($this->getHeaders($headers)));
$stream->addStream($body);
$stream->addStream(Utils::streamFor("\r\n"));
>>>>>>> master
}
/**
@ -149,11 +132,7 @@ class MultipartStream implements StreamInterface
// Set a default Content-Type if one was not supplied
$type = $this->getHeader($headers, 'content-type');
if (!$type && ($filename === '0' || $filename)) {
<<<<<<< HEAD
if ($type = mimetype_from_filename($filename)) {
=======
if ($type = MimeType::fromFilename($filename)) {
>>>>>>> master
$headers['Content-Type'] = $type;
}
}

View File

@ -1,8 +1,5 @@
<?php
<<<<<<< HEAD
=======
>>>>>>> master
namespace GuzzleHttp\Psr7;
use Psr\Http\Message\StreamInterface;

View File

@ -1,8 +1,5 @@
<?php
<<<<<<< HEAD
=======
>>>>>>> master
namespace GuzzleHttp\Psr7;
use Psr\Http\Message\StreamInterface;
@ -55,11 +52,7 @@ class PumpStream implements StreamInterface
public function __toString()
{
try {
<<<<<<< HEAD
return copy_to_string($this);
=======
return Utils::copyToString($this);
>>>>>>> master
} catch (\Exception $e) {
return '';
}
@ -74,11 +67,8 @@ class PumpStream implements StreamInterface
{
$this->tellPos = false;
$this->source = null;
<<<<<<< HEAD
=======
return null;
>>>>>>> master
}
public function getSize()

View File

@ -1,8 +1,5 @@
<?php
<<<<<<< HEAD
=======
>>>>>>> master
namespace GuzzleHttp\Psr7;
use InvalidArgumentException;
@ -55,11 +52,7 @@ class Request implements RequestInterface
}
if ($body !== '' && $body !== null) {
<<<<<<< HEAD
$this->stream = stream_for($body);
=======
$this->stream = Utils::streamFor($body);
>>>>>>> master
}
}

View File

@ -1,8 +1,5 @@
<?php
<<<<<<< HEAD
=======
>>>>>>> master
namespace GuzzleHttp\Psr7;
use Psr\Http\Message\ResponseInterface;
@ -104,11 +101,7 @@ class Response implements ResponseInterface
$this->statusCode = $status;
if ($body !== '' && $body !== null) {
<<<<<<< HEAD
$this->stream = stream_for($body);
=======
$this->stream = Utils::streamFor($body);
>>>>>>> master
}
$this->setHeaders($headers);
@ -142,11 +135,7 @@ class Response implements ResponseInterface
if ($reasonPhrase == '' && isset(self::$phrases[$new->statusCode])) {
$reasonPhrase = self::$phrases[$new->statusCode];
}
<<<<<<< HEAD
$new->reasonPhrase = $reasonPhrase;
=======
$new->reasonPhrase = (string) $reasonPhrase;
>>>>>>> master
return $new;
}

View File

@ -79,15 +79,10 @@ class ServerRequest extends Request implements ServerRequestInterface
* Return an UploadedFile instance array.
*
* @param array $files A array which respect $_FILES structure
<<<<<<< HEAD
* @throws InvalidArgumentException for unrecognized values
* @return array
=======
*
* @return array
*
* @throws InvalidArgumentException for unrecognized values
>>>>>>> master
*/
public static function normalizeFiles(array $files)
{

View File

@ -1,8 +1,5 @@
<?php
<<<<<<< HEAD
=======
>>>>>>> master
namespace GuzzleHttp\Psr7;
use Psr\Http\Message\StreamInterface;
@ -80,15 +77,10 @@ class Stream implements StreamInterface
public function __toString()
{
try {
<<<<<<< HEAD
$this->seek(0);
return (string) stream_get_contents($this->stream);
=======
if ($this->isSeekable()) {
$this->seek(0);
}
return $this->getContents();
>>>>>>> master
} catch (\Exception $e) {
return '';
}
@ -204,11 +196,7 @@ class Stream implements StreamInterface
public function seek($offset, $whence = SEEK_SET)
{
$whence = (int) $whence;
<<<<<<< HEAD
=======
>>>>>>> master
if (!isset($this->stream)) {
throw new \RuntimeException('Stream is detached');
}

View File

@ -1,8 +1,5 @@
<?php
<<<<<<< HEAD
=======
>>>>>>> master
namespace GuzzleHttp\Psr7;
use Psr\Http\Message\StreamInterface;
@ -56,11 +53,7 @@ trait StreamDecoratorTrait
public function getContents()
{
<<<<<<< HEAD
return copy_to_string($this);
=======
return Utils::copyToString($this);
>>>>>>> master
}
/**
@ -148,10 +141,7 @@ trait StreamDecoratorTrait
* Implement in subclasses to dynamically create streams when requested.
*
* @return StreamInterface
<<<<<<< HEAD
=======
*
>>>>>>> master
* @throws \BadMethodCallException
*/
protected function createStream()

View File

@ -1,8 +1,5 @@
<?php
<<<<<<< HEAD
=======
>>>>>>> master
namespace GuzzleHttp\Psr7;
use Psr\Http\Message\StreamInterface;
@ -27,10 +24,7 @@ class StreamWrapper
* @param StreamInterface $stream The stream to get a resource for
*
* @return resource
<<<<<<< HEAD
=======
*
>>>>>>> master
* @throws \InvalidArgumentException if stream is not readable or writable
*/
public static function getResource(StreamInterface $stream)

View File

@ -1,8 +1,5 @@
<?php
<<<<<<< HEAD
=======
>>>>>>> master
namespace GuzzleHttp\Psr7;
use InvalidArgumentException;
@ -89,10 +86,7 @@ class UploadedFile implements UploadedFileInterface
* Depending on the value set file or stream variable
*
* @param mixed $streamOrFile
<<<<<<< HEAD
=======
*
>>>>>>> master
* @throws InvalidArgumentException
*/
private function setStreamOrFile($streamOrFile)
@ -112,10 +106,7 @@ class UploadedFile implements UploadedFileInterface
/**
* @param int $error
<<<<<<< HEAD
=======
*
>>>>>>> master
* @throws InvalidArgumentException
*/
private function setError($error)
@ -137,10 +128,7 @@ class UploadedFile implements UploadedFileInterface
/**
* @param int $size
<<<<<<< HEAD
=======
*
>>>>>>> master
* @throws InvalidArgumentException
*/
private function setSize($size)
@ -174,10 +162,7 @@ class UploadedFile implements UploadedFileInterface
/**
* @param string|null $clientFilename
<<<<<<< HEAD
=======
*
>>>>>>> master
* @throws InvalidArgumentException
*/
private function setClientFilename($clientFilename)
@ -193,10 +178,7 @@ class UploadedFile implements UploadedFileInterface
/**
* @param string|null $clientMediaType
<<<<<<< HEAD
=======
*
>>>>>>> master
* @throws InvalidArgumentException
*/
private function setClientMediaType($clientMediaType)
@ -244,10 +226,7 @@ class UploadedFile implements UploadedFileInterface
/**
* {@inheritdoc}
<<<<<<< HEAD
=======
*
>>>>>>> master
* @throws RuntimeException if the upload was not successful.
*/
public function getStream()
@ -266,13 +245,9 @@ class UploadedFile implements UploadedFileInterface
*
* @see http://php.net/is_uploaded_file
* @see http://php.net/move_uploaded_file
<<<<<<< HEAD
* @param string $targetPath Path to which to move the uploaded file.
=======
*
* @param string $targetPath Path to which to move the uploaded file.
*
>>>>>>> master
* @throws RuntimeException if the upload was not successful.
* @throws InvalidArgumentException if the $path specified is invalid.
* @throws RuntimeException on any error during the move operation, or on
@ -293,11 +268,7 @@ class UploadedFile implements UploadedFileInterface
? rename($this->file, $targetPath)
: move_uploaded_file($this->file, $targetPath);
} else {
<<<<<<< HEAD
copy_to_stream(
=======
Utils::copyToStream(
>>>>>>> master
$this->getStream(),
new LazyOpenStream($targetPath, 'w')
);

View File

@ -1,8 +1,5 @@
<?php
<<<<<<< HEAD
=======
>>>>>>> master
namespace GuzzleHttp\Psr7;
use Psr\Http\Message\UriInterface;

View File

@ -1,8 +1,5 @@
<?php
<<<<<<< HEAD
=======
>>>>>>> master
namespace GuzzleHttp\Psr7;
use Psr\Http\Message\UriInterface;

View File

@ -1,8 +1,5 @@
<?php
<<<<<<< HEAD
=======
>>>>>>> master
namespace GuzzleHttp\Psr7;
use Psr\Http\Message\UriInterface;

File diff suppressed because it is too large Load Diff

View File

@ -1,14 +1,11 @@
CHANGELOG
=========
<<<<<<< HEAD
=======
1.8.0 (2020-10-01)
------------------
* Fixes for PHP 8.0. Pull Request by Remi Collet. GitHub #108.
>>>>>>> master
1.7.0 (2020-08-07)
------------------

View File

@ -21,11 +21,7 @@
"ext-maxminddb": "A C-based database decoder that provides significantly faster lookups"
},
"conflict": {
<<<<<<< HEAD
"ext-maxminddb": "<1.7.0,>=2.0.0"
=======
"ext-maxminddb": "<1.8.0,>=2.0.0"
>>>>>>> master
},
"require-dev": {
"friendsofphp/php-cs-fixer": "2.*",

View File

@ -45,17 +45,6 @@ typedef size_t strsize_t;
typedef zend_object free_obj_t;
/* For PHP 8 compatibility */
<<<<<<< HEAD
#ifndef TSRMLS_C
#define TSRMLS_C
#endif
#ifndef TSRMLS_CC
#define TSRMLS_CC
#endif
#ifndef TSRMLS_DC
#define TSRMLS_DC
#endif
=======
#if PHP_VERSION_ID < 80000
#define PROP_OBJ(zv) (zv)
@ -71,7 +60,6 @@ typedef zend_object free_obj_t;
/* End PHP 8 compatibility */
#endif
>>>>>>> master
#ifndef ZEND_ACC_CTOR
#define ZEND_ACC_CTOR 0
#endif
@ -352,30 +340,13 @@ PHP_METHOD(MaxMind_Db_Reader, metadata) {
return;
}
MMDB_free_entry_data_list(entry_data_list);
<<<<<<< HEAD
#if PHP_VERSION_ID >= 80000
zend_call_method_with_1_params(Z_OBJ_P(return_value),
=======
zend_call_method_with_1_params(PROP_OBJ(return_value),
>>>>>>> master
metadata_ce,
&metadata_ce->constructor,
ZEND_CONSTRUCTOR_FUNC_NAME,
NULL,
&metadata_array);
zval_ptr_dtor(&metadata_array);
<<<<<<< HEAD
#else
zend_call_method_with_1_params(return_value,
metadata_ce,
&metadata_ce->constructor,
ZEND_CONSTRUCTOR_FUNC_NAME,
NULL,
&metadata_array);
zval_ptr_dtor(&metadata_array);
#endif
=======
>>>>>>> master
}
PHP_METHOD(MaxMind_Db_Reader, close) {
@ -632,11 +603,7 @@ PHP_METHOD(MaxMind_Db_Reader_Metadata, __construct) {
"binary_format_major_version",
sizeof("binary_format_major_version") - 1))) {
zend_update_property(metadata_ce,
<<<<<<< HEAD
object,
=======
PROP_OBJ(object),
>>>>>>> master
"binaryFormatMajorVersion",
sizeof("binaryFormatMajorVersion") - 1,
tmp);
@ -646,11 +613,7 @@ PHP_METHOD(MaxMind_Db_Reader_Metadata, __construct) {
"binary_format_minor_version",
sizeof("binary_format_minor_version") - 1))) {
zend_update_property(metadata_ce,
<<<<<<< HEAD
object,
=======
PROP_OBJ(object),
>>>>>>> master
"binaryFormatMinorVersion",
sizeof("binaryFormatMinorVersion") - 1,
tmp);
@ -659,27 +622,18 @@ PHP_METHOD(MaxMind_Db_Reader_Metadata, __construct) {
if ((tmp = zend_hash_str_find(HASH_OF(metadata_array),
"build_epoch",
sizeof("build_epoch") - 1))) {
<<<<<<< HEAD
zend_update_property(
metadata_ce, object, "buildEpoch", sizeof("buildEpoch") - 1, tmp);
=======
zend_update_property(metadata_ce,
PROP_OBJ(object),
"buildEpoch",
sizeof("buildEpoch") - 1,
tmp);
>>>>>>> master
}
if ((tmp = zend_hash_str_find(HASH_OF(metadata_array),
"database_type",
sizeof("database_type") - 1))) {
zend_update_property(metadata_ce,
<<<<<<< HEAD
object,
=======
PROP_OBJ(object),
>>>>>>> master
"databaseType",
sizeof("databaseType") - 1,
tmp);
@ -688,60 +642,40 @@ PHP_METHOD(MaxMind_Db_Reader_Metadata, __construct) {
if ((tmp = zend_hash_str_find(HASH_OF(metadata_array),
"description",
sizeof("description") - 1))) {
<<<<<<< HEAD
zend_update_property(
metadata_ce, object, "description", sizeof("description") - 1, tmp);
=======
zend_update_property(metadata_ce,
PROP_OBJ(object),
"description",
sizeof("description") - 1,
tmp);
>>>>>>> master
}
if ((tmp = zend_hash_str_find(HASH_OF(metadata_array),
"ip_version",
sizeof("ip_version") - 1))) {
<<<<<<< HEAD
zend_update_property(
metadata_ce, object, "ipVersion", sizeof("ipVersion") - 1, tmp);
=======
zend_update_property(metadata_ce,
PROP_OBJ(object),
"ipVersion",
sizeof("ipVersion") - 1,
tmp);
>>>>>>> master
}
if ((tmp = zend_hash_str_find(
HASH_OF(metadata_array), "languages", sizeof("languages") - 1))) {
<<<<<<< HEAD
zend_update_property(
metadata_ce, object, "languages", sizeof("languages") - 1, tmp);
=======
zend_update_property(metadata_ce,
PROP_OBJ(object),
"languages",
sizeof("languages") - 1,
tmp);
>>>>>>> master
}
if ((tmp = zend_hash_str_find(HASH_OF(metadata_array),
"record_size",
sizeof("record_size") - 1))) {
<<<<<<< HEAD
zend_update_property(
metadata_ce, object, "recordSize", sizeof("recordSize") - 1, tmp);
=======
zend_update_property(metadata_ce,
PROP_OBJ(object),
"recordSize",
sizeof("recordSize") - 1,
tmp);
>>>>>>> master
if (Z_TYPE_P(tmp) == IS_LONG) {
record_size = Z_LVAL_P(tmp);
}
@ -749,11 +683,7 @@ PHP_METHOD(MaxMind_Db_Reader_Metadata, __construct) {
if (record_size != 0) {
zend_update_property_long(metadata_ce,
<<<<<<< HEAD
object,
=======
PROP_OBJ(object),
>>>>>>> master
"nodeByteSize",
sizeof("nodeByteSize") - 1,
record_size / 4);
@ -762,16 +692,11 @@ PHP_METHOD(MaxMind_Db_Reader_Metadata, __construct) {
if ((tmp = zend_hash_str_find(HASH_OF(metadata_array),
"node_count",
sizeof("node_count") - 1))) {
<<<<<<< HEAD
zend_update_property(
metadata_ce, object, "nodeCount", sizeof("nodeCount") - 1, tmp);
=======
zend_update_property(metadata_ce,
PROP_OBJ(object),
"nodeCount",
sizeof("nodeCount") - 1,
tmp);
>>>>>>> master
if (Z_TYPE_P(tmp) == IS_LONG) {
node_count = Z_LVAL_P(tmp);
}
@ -779,11 +704,7 @@ PHP_METHOD(MaxMind_Db_Reader_Metadata, __construct) {
if (record_size != 0) {
zend_update_property_long(metadata_ce,
<<<<<<< HEAD
object,
=======
PROP_OBJ(object),
>>>>>>> master
"searchTreeSize",
sizeof("searchTreeSize") - 1,
record_size * node_count / 4);

View File

@ -15,11 +15,7 @@
#ifndef PHP_MAXMINDDB_H
#define PHP_MAXMINDDB_H 1
<<<<<<< HEAD
#define PHP_MAXMINDDB_VERSION "1.7.0"
=======
#define PHP_MAXMINDDB_VERSION "1.8.0"
>>>>>>> master
#define PHP_MAXMINDDB_EXTNAME "maxminddb"
extern zend_module_entry maxminddb_module_entry;

View File

@ -14,15 +14,9 @@
<email>goschwald@maxmind.com</email>
<active>yes</active>
</lead>
<<<<<<< HEAD
<date>2020-08-07</date>
<version>
<release>1.7.0</release>
=======
<date>2020-10-01</date>
<version>
<release>1.8.0</release>
>>>>>>> master
<api>1.7.0</api>
</version>
<stability>
@ -30,21 +24,7 @@
<api>stable</api>
</stability>
<license uri="https://github.com/maxmind/MaxMind-DB-Reader-php/blob/master/LICENSE">Apache License 2.0</license>
<<<<<<< HEAD
<notes>* IMPORTANT: PHP 7.2 or greater is now required.
* The extension no longer depends on the pure PHP classes in
`maxmind-db/reader`. You can use it independently.
* Type hints have been added to both the pure PHP implementation
and the extension.
* The `metadata` method on the reader now returns a new copy of the
metadata object rather than the actual object used by the reader.
* Work around PHP `is_readable()` bug. Reported by Ben Roberts. GitHub
#92.
* This is the first release of the extension as a PECL package.
GitHub #34.</notes>
=======
<notes>* Fixes for PHP 8.0. Pull Request by Remi Collet. GitHub #108.</notes>
>>>>>>> master
<contents>
<dir name="/">
<file role="doc" name="LICENSE"/>

View File

@ -1,8 +1,6 @@
CHANGELOG
=========
<<<<<<< HEAD
=======
0.8.1 (2020-11-02)
------------------
@ -18,7 +16,6 @@ CHANGELOG
* PHP 7.2 or greater is now required.
* Added additional type hints.
>>>>>>> master
0.7.0 (2020-05-06)
------------------

View File

@ -5,11 +5,7 @@ shared code between MaxMind's various web service client APIs.
## Requirements ##
<<<<<<< HEAD
The library requires PHP 5.6 or greater.
=======
The library requires PHP 7.2 or greater.
>>>>>>> master
There are several other dependencies as defined in the `composer.json` file.

View File

@ -12,22 +12,14 @@
}
],
"require": {
<<<<<<< HEAD
"php": ">=5.6",
=======
"php": ">=7.2",
>>>>>>> master
"composer/ca-bundle": "^1.0.3",
"ext-curl": "*",
"ext-json": "*"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "2.*",
<<<<<<< HEAD
"phpunit/phpunit": "^4.8.36 || ^5.7 || ^6.5 || ^7.0",
=======
"phpunit/phpunit": "^8.0 || ^9.0",
>>>>>>> master
"squizlabs/php_codesniffer": "3.*"
},
"autoload": {

View File

@ -1,10 +1,7 @@
<?php
<<<<<<< HEAD
=======
declare(strict_types=1);
>>>>>>> master
namespace MaxMind\Exception;
/**

View File

@ -1,10 +1,7 @@
<?php
<<<<<<< HEAD
=======
declare(strict_types=1);
>>>>>>> master
namespace MaxMind\Exception;
/**
@ -24,35 +21,21 @@ class HttpException extends WebServiceException
* @param \Exception $previous the previous exception, if any
*/
public function __construct(
<<<<<<< HEAD
$message,
$httpStatus,
$uri,
=======
string $message,
int $httpStatus,
string $uri,
>>>>>>> master
\Exception $previous = null
) {
$this->uri = $uri;
parent::__construct($message, $httpStatus, $previous);
}
<<<<<<< HEAD
public function getUri()
=======
public function getUri(): string
>>>>>>> master
{
return $this->uri;
}
<<<<<<< HEAD
public function getStatusCode()
=======
public function getStatusCode(): int
>>>>>>> master
{
return $this->getCode();
}

View File

@ -1,10 +1,7 @@
<?php
<<<<<<< HEAD
=======
declare(strict_types=1);
>>>>>>> master
namespace MaxMind\Exception;
/**

Some files were not shown because too many files have changed in this diff Show More