Update vendor dependencyjev in minify-a na najnovejso verzijo
This commit is contained in:
parent
01747093b1
commit
708e18d031
@ -1,27 +1,23 @@
|
||||
<?php
|
||||
|
||||
$finder = Symfony\CS\Finder\DefaultFinder::create()
|
||||
->in(__DIR__ . '/lib')
|
||||
;
|
||||
$rules = array(
|
||||
'@PSR2' => true,
|
||||
);
|
||||
|
||||
return Symfony\CS\Config\Config::create()
|
||||
->level(Symfony\CS\FixerInterface::PSR2_LEVEL)
|
||||
$config = PhpCsFixer\Config::create();
|
||||
$finder = $config->getFinder();
|
||||
|
||||
$finder
|
||||
->in(array('.', 'builder/', 'lib/', 'tests/', 'min_extras/', 'static/'))
|
||||
->name('*.php')
|
||||
->ignoreDotFiles(true)
|
||||
->ignoreVCS(true);
|
||||
|
||||
return $config
|
||||
->setUsingCache(true)
|
||||
->fixers(array(
|
||||
'linefeed',
|
||||
'trailing_spaces',
|
||||
'unused_use',
|
||||
'short_tag',
|
||||
'return',
|
||||
'visibility',
|
||||
'php_closing_tag',
|
||||
'extra_empty_lines',
|
||||
'function_declaration',
|
||||
'include',
|
||||
'controls_spaces',
|
||||
'elseif',
|
||||
'-eof_ending',
|
||||
'-method_argument_space',
|
||||
))
|
||||
->finder($finder)
|
||||
;
|
||||
->setRiskyAllowed(true)
|
||||
->setRules($rules)
|
||||
->setIndent(' ')
|
||||
->setLineEnding("\n");
|
||||
|
||||
// vim:ft=php
|
||||
|
6
admin/survey/minify/.semver
Normal file
6
admin/survey/minify/.semver
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
:major: 3
|
||||
:minor: 0
|
||||
:patch: 11
|
||||
:special: ''
|
||||
:metadata: ''
|
@ -5,7 +5,8 @@ dist: trusty
|
||||
jobs:
|
||||
fast_finish: true
|
||||
allow_failures:
|
||||
- php: "hhvm"
|
||||
- php: "nightly"
|
||||
- name: "Php CS Fixer"
|
||||
include:
|
||||
- php: "5.3"
|
||||
dist: precise
|
||||
@ -15,8 +16,13 @@ jobs:
|
||||
- php: "7.0"
|
||||
- php: "7.1"
|
||||
- php: "7.2"
|
||||
- php: "7.3"
|
||||
- php: "7.4"
|
||||
- php: "nightly"
|
||||
- php: "hhvm"
|
||||
- name: "Php CS Fixer"
|
||||
php: "7.3"
|
||||
env:
|
||||
- PHP_CS_FIXER=1
|
||||
|
||||
env:
|
||||
- CLOSURE_VERSION: 20161024
|
||||
@ -36,7 +42,14 @@ before_script:
|
||||
- tests/dl-closure.sh
|
||||
|
||||
script:
|
||||
- PATH=vendor/bin:$PATH
|
||||
- composer validate
|
||||
- phpunit --verbose
|
||||
- |
|
||||
if [ "$PHP_CS_FIXER" ]; then
|
||||
composer config --unset platform.php
|
||||
composer require --dev friendsofphp/php-cs-fixer:2.16
|
||||
php-cs-fixer fix --verbose --diff --dry-run --ansi
|
||||
fi
|
||||
- vendor/bin/phpunit --verbose
|
||||
|
||||
# vim:ts=2:sw=2:et
|
||||
|
@ -1,18 +1,101 @@
|
||||
## Version 3.0.3 (2017-11-03)
|
||||
# Changelog
|
||||
|
||||
* Fix closure-compiler's error "redirection limit reached". #618, #619
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
## Version 3.0.2 (2017-09-14)
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
* Fixes syntax error in Groups controller, #613
|
||||
* Better-maintained lessphp fork, #610
|
||||
* No longer corrupts some chars in some environments, #608
|
||||
## [3.0.11] - 2021-03-11
|
||||
|
||||
## Version 3.0.1 (2017-06-09)
|
||||
- PHP 8.0 support, [#685], [#682], [#677]
|
||||
|
||||
* Update CSSmin to v4, #599, #590
|
||||
[3.0.11]: https://github.com/mrclay/minify/compare/3.0.10...3.0.11
|
||||
[#685]: https://github.com/mrclay/minify/pull/685
|
||||
[#682]: https://github.com/mrclay/minify/pull/682
|
||||
[#677]: https://github.com/mrclay/minify/pull/677
|
||||
|
||||
## [3.0.10] - 2020-04-02
|
||||
|
||||
- Exclude SSI Comments from HTML minify, [#670], [#671]
|
||||
|
||||
[3.0.10]: https://github.com/mrclay/minify/compare/3.0.9...3.0.10
|
||||
[#671]: https://github.com/mrclay/minify/issues/671
|
||||
[#670]: https://github.com/mrclay/minify/pull/670
|
||||
|
||||
## [3.0.9] - 2020-03-24
|
||||
|
||||
- Allow `intervention/httpauth` 3.x, [#667], [#666], [#664]
|
||||
|
||||
[3.0.9]: https://github.com/mrclay/minify/compare/3.0.8...3.0.9
|
||||
[#664]: https://github.com/mrclay/minify/issues/664
|
||||
[#666]: https://github.com/mrclay/minify/pull/666
|
||||
[#667]: https://github.com/mrclay/minify/pull/667
|
||||
|
||||
## [3.0.8] - 2020-03-19
|
||||
|
||||
- Removed deprecated get_magic_quotes_gpc() function that since PHP 5.4.0 returns FALSE always, and since PHP 7.4 is deprecated, [#661]
|
||||
|
||||
[3.0.8]: https://github.com/mrclay/minify/compare/3.0.7...3.0.8
|
||||
[#661]: https://github.com/mrclay/minify/pull/661
|
||||
|
||||
## [3.0.7] - 2019-12-10
|
||||
|
||||
- Allow mrclay/props-dic ^3.0, [#658]
|
||||
|
||||
[3.0.7]: https://github.com/mrclay/minify/compare/3.0.6...3.0.7
|
||||
[#658]: https://github.com/mrclay/minify/pull/658
|
||||
|
||||
## [3.0.6] - 2019-10-28
|
||||
|
||||
- Bugfix for option sanitizer, [#654], [#655]
|
||||
|
||||
[3.0.6]: https://github.com/mrclay/minify/compare/3.0.5...3.0.6
|
||||
[#654]: https://github.com/mrclay/minify/issues/654
|
||||
[#655]: https://github.com/mrclay/minify/pull/655
|
||||
|
||||
## [3.0.5] - 2019-10-01
|
||||
|
||||
- Fix syntax error in composer.json, [#653]
|
||||
|
||||
[3.0.5]: https://github.com/mrclay/minify/compare/3.0.4...3.0.5
|
||||
[#653]: https://github.com/mrclay/minify/pull/653
|
||||
|
||||
## 3.0.4 - 2019-09-24
|
||||
|
||||
- Fix PHP 7.3 compatibility issues, [#648]
|
||||
|
||||
[3.0.4]: https://github.com/mrclay/minify/compare/3.0.3...3.0.4
|
||||
[#648]: https://github.com/mrclay/minify/issues/648
|
||||
|
||||
## [3.0.3] - 2017-11-03
|
||||
|
||||
- Fix closure-compiler's error "redirection limit reached". [#618], [#619]
|
||||
|
||||
[3.0.3]: https://github.com/mrclay/minify/compare/3.0.2...3.0.3
|
||||
[#618]: https://github.com/mrclay/minify/pull/618
|
||||
[#619]: https://github.com/mrclay/minify/issues/619
|
||||
|
||||
## [3.0.2] - 2017-09-14
|
||||
|
||||
- Fixes syntax error in Groups controller, [#613]
|
||||
- Better-maintained lessphp fork, [#610]
|
||||
- No longer corrupts some chars in some environments, [#608]
|
||||
|
||||
[3.0.2]: https://github.com/mrclay/minify/compare/3.0.1...3.0.2
|
||||
[#608]: https://github.com/mrclay/minify/pull/608
|
||||
[#610]: https://github.com/mrclay/minify/pull/610
|
||||
[#613]: https://github.com/mrclay/minify/issues/613
|
||||
|
||||
## [3.0.1] - 2017-06-09
|
||||
|
||||
- Update CSSmin to v4, [#599], [#590]
|
||||
|
||||
[3.0.1]: https://github.com/mrclay/minify/compare/3.0.0...3.0.1
|
||||
[#590]: https://github.com/mrclay/minify/issues/590
|
||||
[#599]: https://github.com/mrclay/minify/pull/599
|
||||
|
||||
## 3.0.0 - 2017-04-03
|
||||
|
||||
## Version 3.0.0 (2017-04-03)
|
||||
* Improved CSS minification via Túbal Martín's CSSMin
|
||||
* Easier error identification (just see error_log)
|
||||
* Adds feature to serve static files directly
|
||||
@ -30,7 +113,8 @@
|
||||
* BREAKING: Removes `$min_libPath` option
|
||||
* BREAKING: The Minify, source, and controller components have changed APIs
|
||||
|
||||
## Version 2.3.0 (2016-03-11)
|
||||
## 2.3.0 - 2016-03-11
|
||||
|
||||
* Adds `$min_concatOnly` option to just concatenate files
|
||||
* Deprecates use of Minify_Loader
|
||||
* Deprecates use of Minify_Logger
|
||||
@ -38,13 +122,15 @@
|
||||
* Deprecates use of FirePHP
|
||||
* Deprecates use of DooDigestAuth
|
||||
|
||||
## Version 2.2.1 (2014-10-30)
|
||||
## 2.2.1 - 2014-10-30
|
||||
|
||||
* Builder styled with Bootstrap (thanks to help from acidvertigo)
|
||||
* Update CSSmin to v.2.4.8
|
||||
* Added WinCache
|
||||
* URLs with spaces properly rewritten
|
||||
|
||||
## Version 2.2.0 (2014-03-12)
|
||||
## 2.2.0 - 2014-03-12
|
||||
|
||||
* Fix handling of RegEx in certain situations in JSMin
|
||||
* Thanks to Vovan-VE for reporting this
|
||||
* Update composer.json with support info
|
||||
@ -66,11 +152,13 @@
|
||||
* Allow far-future expiration and file versioning with the "v" querystirng parameter in addition to existing method
|
||||
* Lots of general code tidy ups
|
||||
|
||||
## Version 2.1.7 (2013-07-23)
|
||||
## 2.1.7 - 2013-07-23
|
||||
|
||||
* Fixes arbitrary file inclusion vulnerability on some systems
|
||||
* Thanks to Matt Mecham for reporting this
|
||||
|
||||
## Version 2.1.6 (2013-07-19)
|
||||
## 2.1.6 - 2013-07-19
|
||||
|
||||
* JSMin fixes
|
||||
* Prevents some Closure Compiler API failures
|
||||
* Uses autoloading for all class loading
|
||||
@ -82,7 +170,8 @@
|
||||
* CLI script more portable
|
||||
* Adds composer.json
|
||||
|
||||
## Version 2.1.5 (2012-03-10)
|
||||
## 2.1.5 - 2012-03-10
|
||||
|
||||
* Removed XSS vulnerability
|
||||
* Disabled builder by default
|
||||
* command line tools to minify and rewrite URIs in CSS
|
||||
@ -91,7 +180,8 @@
|
||||
* Closure Compiler uses cURL when allow\_url\_fopen is off
|
||||
* Missing file notices when using groups
|
||||
|
||||
## Version 2.1.4b (2010-07-10)
|
||||
## 2.1.4b - 2010-07-10
|
||||
|
||||
* Option to minify JS with Closure Compiler API w/ JSMin failover
|
||||
* Cookie/bookmarklet-based debug mode. No HTML editing!
|
||||
* Allows 1 file to be missing w/o complete failure
|
||||
@ -107,7 +197,8 @@
|
||||
* Removed annoying maxFiles limit
|
||||
* mbstring.func\_overload usage is safer
|
||||
|
||||
## Version 2.1.3 (2009-06-30)
|
||||
## 2.1.3 - 2009-06-30
|
||||
|
||||
* CSS fixes
|
||||
* A few URI rewriting bugs fixed
|
||||
* comment/whitespace removal no longer breaks some values
|
||||
@ -122,7 +213,8 @@
|
||||
* API: Can set contentType Minify\_Source objects (fixes an annoying [caveat](http://groups.google.com/group/minify/msg/8446d32ee99a4961))
|
||||
* [Resolved Issue list](http://code.google.com/p/minify/issues/list?can=1&q=label%3ARelease-2.1.2%20status%3AVerified)
|
||||
|
||||
## Version 2.1.2 (2009-03-04)
|
||||
## 2.1.2 - 2009-03-04
|
||||
|
||||
* Javascript fixes
|
||||
* Debug mode no longer confused by `*/*` in strings/RegExps (jQuery)
|
||||
* quote characters inside RegExp literals no longer cause exception
|
||||
@ -134,14 +226,16 @@
|
||||
* Builder app doesn't fail on systems without gzdeflate()
|
||||
* APC caching class included
|
||||
|
||||
## Version 2.1.1 (2008-10-19)
|
||||
## 2.1.1 - 2008-10-19
|
||||
|
||||
* Bug fix release
|
||||
* Detection and workarounds for zlib.output\_compression and non-PHP encoding modules
|
||||
* Zlib not required (mod\_rewrite, et.al., can still be used for encoding)
|
||||
* HTML : More IE conditional comments preserved
|
||||
* Minify\_groupUri() utility fixed
|
||||
|
||||
## Version 2.1.0 (2008-09-18)
|
||||
## 2.1.0 - 2008-09-18
|
||||
|
||||
* "min" default application for quick deployment
|
||||
* Minify URI Builder app & bookmarklet for quickly creating minify URIs
|
||||
* Relative URIs in CSS file are fixed automatically by default
|
||||
@ -157,8 +251,8 @@
|
||||
* Minify\_Cache\_File has flock()s (by default)
|
||||
* Workaround for Windows mtime reporting bug
|
||||
|
||||
## 2.0.0 - 2008-05-22
|
||||
|
||||
## Version 2.0.0 (2008-05-22)
|
||||
* Complete code overhaul. Minify is now a PEAR-style class and toolkit for building customized minifying file servers.
|
||||
* Content-Encoding: deflate/gzip/compress, based on request headers
|
||||
* Expanded CSS and HTML minifiers with test cases
|
||||
@ -167,10 +261,12 @@
|
||||
* Compression & encoding modules lazy-loaded as needed (304 responses use minimal code)
|
||||
* Separate utility classes for HTTP encoding and cache control
|
||||
|
||||
## Version 1.0.1 (2007-05-05)
|
||||
## 1.0.1 - 2007-05-05
|
||||
|
||||
* Fixed various problems resolving pathnames when hosted on an NFS mount.
|
||||
* Fixed 'undefined constant' notice.
|
||||
* Replaced old JSMin library with a much faster custom implementation.
|
||||
|
||||
## Version 1.0.0 (2007-05-02)
|
||||
## 1.0.0 - 2007-05-02
|
||||
|
||||
* First release.
|
||||
|
4
admin/survey/minify/builder/.htaccess
Normal file
4
admin/survey/minify/builder/.htaccess
Normal file
@ -0,0 +1,4 @@
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine on
|
||||
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
|
||||
</IfModule>
|
@ -162,12 +162,12 @@ var MUB = {
|
||||
ext = thisExt;
|
||||
else if (thisExt !== ext) {
|
||||
fail = true;
|
||||
return genericAlertPopup('alert_extensions_match');
|
||||
return alert('extensions must match!');
|
||||
}
|
||||
this.value = this.value.replace(/^\//, '');
|
||||
if (-1 !== $.inArray(this.value, sources)) {
|
||||
fail = true;
|
||||
return genericAlertPopup('alert_duplicate_file');
|
||||
return alert('duplicate file!');
|
||||
}
|
||||
sources.push(this.value);
|
||||
}
|
||||
|
@ -32,5 +32,7 @@ javascript:(function() {
|
||||
if (uris.length)
|
||||
window.open('%BUILDER_URL%#' + uris.join(','));
|
||||
else
|
||||
genericAlertPopup('alert_no_jscss_found',home.split('/')[2]);
|
||||
alert('No js/css files found with URLs within "'
|
||||
+ home.split('/')[2]
|
||||
+ '".\n(This tool is limited to URLs with the same domain.)');
|
||||
})();
|
@ -29,7 +29,6 @@ if ($app->env->get('hello')) {
|
||||
));
|
||||
$he->encode();
|
||||
$he->sendAll();
|
||||
|
||||
} else {
|
||||
// echo status "0" or "1"
|
||||
header('Content-Type: text/plain');
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "mrclay/minify",
|
||||
"type": "library",
|
||||
"description": "Minify is a PHP5 app that helps you follow several rules for client-side performance. It combines multiple CSS or Javascript files, removes unnecessary whitespace and comments, and serves them with gzip encoding and optimal client-side cache headers",
|
||||
"description": "Minify is a PHP app that helps you follow several rules for client-side performance. It combines multiple CSS or Javascript files, removes unnecessary whitespace and comments, and serves them with gzip encoding and optimal client-side cache headers",
|
||||
"homepage": "https://github.com/mrclay/minify",
|
||||
"license": "BSD-3-Clause",
|
||||
"authors": [
|
||||
@ -22,26 +22,31 @@
|
||||
"autoload-dev": {
|
||||
"psr-4": {"Minify\\Test\\": "tests/"}
|
||||
},
|
||||
"config": {
|
||||
"platform": {
|
||||
"php": "5.3.29"
|
||||
},
|
||||
"sort-packages": true
|
||||
},
|
||||
"require": {
|
||||
"php": "^5.3.0 || ^7.0 || ^8.0",
|
||||
"ext-pcre": "*",
|
||||
"intervention/httpauth": "~2.0",
|
||||
"monolog/monolog": "~1.1",
|
||||
"intervention/httpauth": "^2.0|^3.0",
|
||||
"marcusschwarz/lesserphp": "^0.5.1",
|
||||
"monolog/monolog": "~1.1|~2.0",
|
||||
"mrclay/jsmin-php": "~2",
|
||||
"mrclay/props-dic": "^2.2",
|
||||
"php": "^5.3.0 || ^7.0",
|
||||
"mrclay/props-dic": "^2.2|^3.0",
|
||||
"tubalmartin/cssmin": "~4"
|
||||
},
|
||||
"require-dev": {
|
||||
"firephp/firephp-core": "~0.4.0",
|
||||
"leafo/scssphp": "^0.3 || ^0.6 || ^0.7",
|
||||
"marcusschwarz/lesserphp": "~0.5.1",
|
||||
"meenie/javascript-packer": "~1.1",
|
||||
"phpunit/phpunit": "^4.8.36",
|
||||
"tedivm/jshrink": "~1.1.0"
|
||||
},
|
||||
"suggest": {
|
||||
"firephp/firephp-core": "Use FirePHP for Log messages",
|
||||
"marcusschwarz/lesserphp": "LESS support",
|
||||
"meenie/javascript-packer": "Keep track of the Packer PHP port using Composer"
|
||||
},
|
||||
"scripts": {
|
||||
|
@ -7,4 +7,3 @@
|
||||
*
|
||||
* @package Minify
|
||||
*/
|
||||
|
||||
|
@ -128,8 +128,8 @@ class HTTP_ConditionalGet
|
||||
$etagAppend = '';
|
||||
if (isset($spec['encoding'])) {
|
||||
$this->_stripEtag = true;
|
||||
$this->_headers['Vary'] = 'Accept-Encoding';
|
||||
if ('' !== $spec['encoding']) {
|
||||
$this->_headers['Vary'] = 'Accept-Encoding';
|
||||
if (0 === strpos($spec['encoding'], 'x-')) {
|
||||
$spec['encoding'] = substr($spec['encoding'], 2);
|
||||
}
|
||||
@ -317,7 +317,7 @@ class HTTP_ConditionalGet
|
||||
if (!isset($_SERVER['HTTP_IF_NONE_MATCH'])) {
|
||||
return false;
|
||||
}
|
||||
$clientEtagList = get_magic_quotes_gpc()
|
||||
$clientEtagList = PHP_VERSION_ID < 50400 && get_magic_quotes_gpc()
|
||||
? stripslashes($_SERVER['HTTP_IF_NONE_MATCH'])
|
||||
: $_SERVER['HTTP_IF_NONE_MATCH'];
|
||||
$clientEtags = explode(',', $clientEtagList);
|
||||
|
@ -204,9 +204,10 @@ class HTTP_Encoder
|
||||
}
|
||||
// gzip checks (slow)
|
||||
if (preg_match(
|
||||
'@(?:^|,)\\s*((?:x-)?gzip)\\s*(?:$|,|;\\s*q=(?:0\\.|1))@'
|
||||
,$ae
|
||||
,$m)) {
|
||||
'@(?:^|,)\\s*((?:x-)?gzip)\\s*(?:$|,|;\\s*q=(?:0\\.|1))@',
|
||||
$ae,
|
||||
$m
|
||||
)) {
|
||||
return array('gzip', $m[1]);
|
||||
}
|
||||
if ($allowDeflate) {
|
||||
@ -217,14 +218,17 @@ class HTTP_Encoder
|
||||
|| 0 === strpos($ae, 'deflate,') // opera
|
||||
// slow parsing
|
||||
|| preg_match(
|
||||
'@(?:^|,)\\s*deflate\\s*(?:$|,|;\\s*q=(?:0\\.|1))@', $ae)) {
|
||||
'@(?:^|,)\\s*deflate\\s*(?:$|,|;\\s*q=(?:0\\.|1))@',
|
||||
$ae
|
||||
)) {
|
||||
return array('deflate', 'deflate');
|
||||
}
|
||||
}
|
||||
if ($allowCompress && preg_match(
|
||||
'@(?:^|,)\\s*((?:x-)?compress)\\s*(?:$|,|;\\s*q=(?:0\\.|1))@'
|
||||
,$ae
|
||||
,$m)) {
|
||||
'@(?:^|,)\\s*((?:x-)?compress)\\s*(?:$|,|;\\s*q=(?:0\\.|1))@',
|
||||
$ae,
|
||||
$m
|
||||
)) {
|
||||
return array('compress', $m[1]);
|
||||
}
|
||||
|
||||
|
@ -593,7 +593,8 @@ class Minify
|
||||
! $source // yes, we ran out of sources
|
||||
|| $type === self::TYPE_CSS // yes, to process CSS individually (avoiding PCRE bugs/limits)
|
||||
|| $minifier !== $lastMinifier // yes, minifier changed
|
||||
|| $options !== $lastOptions)) { // yes, options changed
|
||||
|| $options !== $lastOptions // yes, options changed
|
||||
)) {
|
||||
// minify previous sources with last settings
|
||||
$imploded = implode($implodeSeparator, $groupToProcessTogether);
|
||||
$groupToProcessTogether = array();
|
||||
|
@ -80,6 +80,12 @@ class App extends Container
|
||||
};
|
||||
$varNames = array_map($prefixer, $propNames);
|
||||
|
||||
$varDefined = get_defined_vars();
|
||||
|
||||
$varNames = array_filter($varNames, function ($name) use ($varDefined) {
|
||||
return array_key_exists($name, $varDefined);
|
||||
});
|
||||
|
||||
$vars = compact($varNames);
|
||||
|
||||
foreach ($varNames as $varName) {
|
||||
|
@ -73,16 +73,16 @@ class Minify_CSSmin
|
||||
}
|
||||
if ($options['currentDir']) {
|
||||
return Minify_CSS_UriRewriter::rewrite(
|
||||
$css
|
||||
,$options['currentDir']
|
||||
,$options['docRoot']
|
||||
,$options['symlinks']
|
||||
$css,
|
||||
$options['currentDir'],
|
||||
$options['docRoot'],
|
||||
$options['symlinks']
|
||||
);
|
||||
}
|
||||
|
||||
return Minify_CSS_UriRewriter::prepend(
|
||||
$css
|
||||
,$options['prependRelativePath']
|
||||
$css,
|
||||
$options['prependRelativePath']
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -68,4 +68,3 @@ class Minify_Controller_Files extends Minify_Controller_Base
|
||||
return new Minify_ServeConfiguration($options, $sources);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -73,4 +73,3 @@ class Minify_Controller_Groups extends Minify_Controller_Files
|
||||
return parent::createConfiguration($options);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -66,4 +66,3 @@ class Minify_Controller_Page extends Minify_Controller_Base
|
||||
return new Minify_ServeConfiguration($options, $sources, $selectionId);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -99,32 +99,34 @@ class Minify_HTML
|
||||
|
||||
// replace SCRIPTs (and minify) with placeholders
|
||||
$this->_html = preg_replace_callback(
|
||||
'/(\\s*)<script(\\b[^>]*?>)([\\s\\S]*?)<\\/script>(\\s*)/iu'
|
||||
,array($this, '_removeScriptCB')
|
||||
,$this->_html);
|
||||
'/(\\s*)<script(\\b[^>]*?>)([\\s\\S]*?)<\\/script>(\\s*)/iu',
|
||||
array($this, '_removeScriptCB'),
|
||||
$this->_html
|
||||
);
|
||||
|
||||
// replace STYLEs (and minify) with placeholders
|
||||
$this->_html = preg_replace_callback(
|
||||
'/\\s*<style(\\b[^>]*>)([\\s\\S]*?)<\\/style>\\s*/iu'
|
||||
,array($this, '_removeStyleCB')
|
||||
,$this->_html);
|
||||
'/\\s*<style(\\b[^>]*>)([\\s\\S]*?)<\\/style>\\s*/iu',
|
||||
array($this, '_removeStyleCB'),
|
||||
$this->_html
|
||||
);
|
||||
|
||||
// remove HTML comments (not containing IE conditional comments).
|
||||
$this->_html = preg_replace_callback(
|
||||
'/<!--([\\s\\S]*?)-->/u'
|
||||
,array($this, '_commentCB')
|
||||
,$this->_html);
|
||||
'/<!--([\\s\\S]*?)-->/u',
|
||||
array($this, '_commentCB'),
|
||||
$this->_html
|
||||
);
|
||||
|
||||
// replace PREs with placeholders
|
||||
$this->_html = preg_replace_callback('/\\s*<pre(\\b[^>]*?>[\\s\\S]*?<\\/pre>)\\s*/iu'
|
||||
,array($this, '_removePreCB')
|
||||
,$this->_html);
|
||||
$this->_html = preg_replace_callback('/\\s*<pre(\\b[^>]*?>[\\s\\S]*?<\\/pre>)\\s*/iu', array($this, '_removePreCB'), $this->_html);
|
||||
|
||||
// replace TEXTAREAs with placeholders
|
||||
$this->_html = preg_replace_callback(
|
||||
'/\\s*<textarea(\\b[^>]*?>[\\s\\S]*?<\\/textarea>)\\s*/iu'
|
||||
,array($this, '_removeTextareaCB')
|
||||
,$this->_html);
|
||||
'/\\s*<textarea(\\b[^>]*?>[\\s\\S]*?<\\/textarea>)\\s*/iu',
|
||||
array($this, '_removeTextareaCB'),
|
||||
$this->_html
|
||||
);
|
||||
|
||||
// trim each line.
|
||||
// @todo take into account attribute values that span multiple lines.
|
||||
@ -139,24 +141,25 @@ class Minify_HTML
|
||||
|
||||
// remove ws outside of all elements
|
||||
$this->_html = preg_replace(
|
||||
'/>(\\s(?:\\s*))?([^<]+)(\\s(?:\s*))?</u'
|
||||
,'>$1$2$3<'
|
||||
,$this->_html);
|
||||
'/>(\\s(?:\\s*))?([^<]+)(\\s(?:\s*))?</u',
|
||||
'>$1$2$3<',
|
||||
$this->_html
|
||||
);
|
||||
|
||||
// use newlines before 1st attribute in open tags (to limit line lengths)
|
||||
$this->_html = preg_replace('/(<[a-z\\-]+)\\s+([^>]+>)/iu', "$1\n$2", $this->_html);
|
||||
|
||||
// fill placeholders
|
||||
$this->_html = str_replace(
|
||||
array_keys($this->_placeholders)
|
||||
,array_values($this->_placeholders)
|
||||
,$this->_html
|
||||
array_keys($this->_placeholders),
|
||||
array_values($this->_placeholders),
|
||||
$this->_html
|
||||
);
|
||||
// issue 229: multi-pass to catch scripts that didn't get replaced in textareas
|
||||
$this->_html = str_replace(
|
||||
array_keys($this->_placeholders)
|
||||
,array_values($this->_placeholders)
|
||||
,$this->_html
|
||||
array_keys($this->_placeholders),
|
||||
array_values($this->_placeholders),
|
||||
$this->_html
|
||||
);
|
||||
|
||||
return $this->_html;
|
||||
@ -164,7 +167,7 @@ class Minify_HTML
|
||||
|
||||
protected function _commentCB($m)
|
||||
{
|
||||
return (0 === strpos($m[1], '[') || false !== strpos($m[1], '<!['))
|
||||
return (0 === strpos($m[1], '[') || false !== strpos($m[1], '<![') || 0 === strpos($m[1], '#'))
|
||||
? $m[0]
|
||||
: '';
|
||||
}
|
||||
@ -209,7 +212,8 @@ class Minify_HTML
|
||||
: 'trim';
|
||||
$css = call_user_func($minifier, $css);
|
||||
|
||||
return $this->_reservePlace($this->_needsCdata($css)
|
||||
return $this->_reservePlace(
|
||||
$this->_needsCdata($css)
|
||||
? "{$openStyle}/*<![CDATA[*/{$css}/*]]>*/</style>"
|
||||
: "{$openStyle}{$css}</style>"
|
||||
);
|
||||
@ -238,7 +242,8 @@ class Minify_HTML
|
||||
: 'trim';
|
||||
$js = call_user_func($minifier, $js);
|
||||
|
||||
return $this->_reservePlace($this->_needsCdata($js)
|
||||
return $this->_reservePlace(
|
||||
$this->_needsCdata($js)
|
||||
? "{$ws1}{$openScript}/*<![CDATA[*/{$js}/*]]>*/</script>{$ws2}"
|
||||
: "{$ws1}{$openScript}{$js}</script>{$ws2}"
|
||||
);
|
||||
|
@ -182,7 +182,7 @@ class Minify_ImportProcessor
|
||||
private function truepath($path)
|
||||
{
|
||||
// whether $path is unix or not
|
||||
$unipath = ('' === $path) || ($path{0} !== '/');
|
||||
$unipath = ('' === $path) || ($path[0] !== '/');
|
||||
|
||||
// attempts to detect if path is relative in which case, add cwd
|
||||
if (strpos($path, ':') === false && $unipath) {
|
||||
|
@ -154,4 +154,3 @@ class Minify_YUICompressor
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -390,4 +390,3 @@ class Cli
|
||||
$this->errors[$letter][] = sprintf($msg, $value);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!-- http://phpunit.de/manual/current/en/appendixes.configuration.html -->
|
||||
<!-- https://phpunit.readthedocs.io/en/latest/configuration.html -->
|
||||
<phpunit
|
||||
backupGlobals="false"
|
||||
backupStaticAttributes="false"
|
||||
@ -10,7 +10,6 @@
|
||||
convertWarningsToExceptions="true"
|
||||
processIsolation="false"
|
||||
stopOnFailure="false"
|
||||
syntaxCheck="false"
|
||||
bootstrap="vendor/autoload.php">
|
||||
|
||||
<testsuites>
|
||||
@ -32,6 +31,7 @@
|
||||
<directory>.</directory>
|
||||
<exclude>
|
||||
<directory>tests</directory>
|
||||
<directory>vendor</directory>
|
||||
</exclude>
|
||||
</whitelist>
|
||||
</filter>
|
||||
|
@ -13,7 +13,8 @@ if (!$enabled) {
|
||||
die('Set $enabled to true to see server info.');
|
||||
}
|
||||
|
||||
function assertTrue($test, $message) {
|
||||
function assertTrue($test, $message)
|
||||
{
|
||||
if (!$test) {
|
||||
echo "Warning: $message\n";
|
||||
}
|
||||
|
@ -10,7 +10,8 @@ namespace Minify\StaticService;
|
||||
* @param string $type "css" or "js"
|
||||
* @return string
|
||||
*/
|
||||
function build_uri($static_uri, $query, $type) {
|
||||
function build_uri($static_uri, $query, $type)
|
||||
{
|
||||
$static_uri = rtrim($static_uri, '/');
|
||||
$query = ltrim($query, '?');
|
||||
|
||||
@ -30,7 +31,8 @@ function build_uri($static_uri, $query, $type) {
|
||||
* @param bool $auto_create Automatically create the directory if missing?
|
||||
* @return null|string null if missing or can't create
|
||||
*/
|
||||
function get_cache_time($auto_create = true) {
|
||||
function get_cache_time($auto_create = true)
|
||||
{
|
||||
foreach (scandir(__DIR__) as $entry) {
|
||||
if (ctype_digit($entry)) {
|
||||
return $entry;
|
||||
@ -50,14 +52,16 @@ function get_cache_time($auto_create = true) {
|
||||
return $time;
|
||||
}
|
||||
|
||||
function flush_cache() {
|
||||
function flush_cache()
|
||||
{
|
||||
$time = get_cache_time(false);
|
||||
if ($time) {
|
||||
remove_tree(__DIR__ . "/$time");
|
||||
}
|
||||
}
|
||||
|
||||
function remove_tree($dir) {
|
||||
function remove_tree($dir)
|
||||
{
|
||||
$files = array_diff(scandir($dir), array('.', '..'));
|
||||
|
||||
foreach ($files as $file) {
|
||||
|
235
composer.lock
generated
235
composer.lock
generated
@ -8,16 +8,16 @@
|
||||
"packages": [
|
||||
{
|
||||
"name": "composer/ca-bundle",
|
||||
"version": "1.2.10",
|
||||
"version": "1.3.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/composer/ca-bundle.git",
|
||||
"reference": "9fdb22c2e97a614657716178093cd1da90a64aa8"
|
||||
"reference": "4c679186f2aca4ab6a0f1b0b9cf9252decb44d0b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/composer/ca-bundle/zipball/9fdb22c2e97a614657716178093cd1da90a64aa8",
|
||||
"reference": "9fdb22c2e97a614657716178093cd1da90a64aa8",
|
||||
"url": "https://api.github.com/repos/composer/ca-bundle/zipball/4c679186f2aca4ab6a0f1b0b9cf9252decb44d0b",
|
||||
"reference": "4c679186f2aca4ab6a0f1b0b9cf9252decb44d0b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -29,7 +29,7 @@
|
||||
"phpstan/phpstan": "^0.12.55",
|
||||
"psr/log": "^1.0",
|
||||
"symfony/phpunit-bridge": "^4.2 || ^5",
|
||||
"symfony/process": "^2.5 || ^3.0 || ^4.0 || ^5.0"
|
||||
"symfony/process": "^2.5 || ^3.0 || ^4.0 || ^5.0 || ^6.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
@ -64,7 +64,7 @@
|
||||
"support": {
|
||||
"irc": "irc://irc.freenode.org/composer",
|
||||
"issues": "https://github.com/composer/ca-bundle/issues",
|
||||
"source": "https://github.com/composer/ca-bundle/tree/1.2.10"
|
||||
"source": "https://github.com/composer/ca-bundle/tree/1.3.1"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -80,7 +80,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-06-07T13:58:28+00:00"
|
||||
"time": "2021-10-28T20:44:15+00:00"
|
||||
},
|
||||
{
|
||||
"name": "fgrosse/phpasn1",
|
||||
@ -159,16 +159,16 @@
|
||||
},
|
||||
{
|
||||
"name": "geoip2/geoip2",
|
||||
"version": "v2.11.0",
|
||||
"version": "v2.12.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/maxmind/GeoIP2-php.git",
|
||||
"reference": "d01be5894a5c1a3381c58c9b1795cd07f96c30f7"
|
||||
"reference": "83adb44ac4b9553d36b579a14673ed124583082f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/maxmind/GeoIP2-php/zipball/d01be5894a5c1a3381c58c9b1795cd07f96c30f7",
|
||||
"reference": "d01be5894a5c1a3381c58c9b1795cd07f96c30f7",
|
||||
"url": "https://api.github.com/repos/maxmind/GeoIP2-php/zipball/83adb44ac4b9553d36b579a14673ed124583082f",
|
||||
"reference": "83adb44ac4b9553d36b579a14673ed124583082f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -178,7 +178,8 @@
|
||||
"php": ">=7.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"friendsofphp/php-cs-fixer": "2.*",
|
||||
"friendsofphp/php-cs-fixer": "3.*",
|
||||
"phpstan/phpstan": "*",
|
||||
"phpunit/phpunit": "^8.0 || ^9.0",
|
||||
"squizlabs/php_codesniffer": "3.*"
|
||||
},
|
||||
@ -210,9 +211,9 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/maxmind/GeoIP2-php/issues",
|
||||
"source": "https://github.com/maxmind/GeoIP2-php/tree/v2.11.0"
|
||||
"source": "https://github.com/maxmind/GeoIP2-php/tree/v2.12.2"
|
||||
},
|
||||
"time": "2020-10-01T18:48:34+00:00"
|
||||
"time": "2021-11-30T18:15:25+00:00"
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/guzzle",
|
||||
@ -287,16 +288,16 @@
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/promises",
|
||||
"version": "1.4.1",
|
||||
"version": "1.5.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/promises.git",
|
||||
"reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d"
|
||||
"reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/promises/zipball/8e7d04f1f6450fef59366c399cfad4b9383aa30d",
|
||||
"reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d",
|
||||
"url": "https://api.github.com/repos/guzzle/promises/zipball/fe752aedc9fd8fcca3fe7ad05d419d32998a06da",
|
||||
"reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -308,7 +309,7 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.4-dev"
|
||||
"dev-master": "1.5-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@ -324,10 +325,25 @@
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Graham Campbell",
|
||||
"email": "hello@gjcampbell.co.uk",
|
||||
"homepage": "https://github.com/GrahamCampbell"
|
||||
},
|
||||
{
|
||||
"name": "Michael Dowling",
|
||||
"email": "mtdowling@gmail.com",
|
||||
"homepage": "https://github.com/mtdowling"
|
||||
},
|
||||
{
|
||||
"name": "Tobias Nyholm",
|
||||
"email": "tobias.nyholm@gmail.com",
|
||||
"homepage": "https://github.com/Nyholm"
|
||||
},
|
||||
{
|
||||
"name": "Tobias Schultze",
|
||||
"email": "webmaster@tubo-world.de",
|
||||
"homepage": "https://github.com/Tobion"
|
||||
}
|
||||
],
|
||||
"description": "Guzzle promises library",
|
||||
@ -336,22 +352,36 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/guzzle/promises/issues",
|
||||
"source": "https://github.com/guzzle/promises/tree/1.4.1"
|
||||
"source": "https://github.com/guzzle/promises/tree/1.5.1"
|
||||
},
|
||||
"time": "2021-03-07T09:25:29+00:00"
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/GrahamCampbell",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/Nyholm",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-10-22T20:56:57+00:00"
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/psr7",
|
||||
"version": "1.8.2",
|
||||
"version": "1.8.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/psr7.git",
|
||||
"reference": "dc960a912984efb74d0a90222870c72c87f10c91"
|
||||
"reference": "1afdd860a2566ed3c2b0b4a3de6e23434a79ec85"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/psr7/zipball/dc960a912984efb74d0a90222870c72c87f10c91",
|
||||
"reference": "dc960a912984efb74d0a90222870c72c87f10c91",
|
||||
"url": "https://api.github.com/repos/guzzle/psr7/zipball/1afdd860a2566ed3c2b0b4a3de6e23434a79ec85",
|
||||
"reference": "1afdd860a2566ed3c2b0b4a3de6e23434a79ec85",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -388,13 +418,34 @@
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Graham Campbell",
|
||||
"email": "hello@gjcampbell.co.uk",
|
||||
"homepage": "https://github.com/GrahamCampbell"
|
||||
},
|
||||
{
|
||||
"name": "Michael Dowling",
|
||||
"email": "mtdowling@gmail.com",
|
||||
"homepage": "https://github.com/mtdowling"
|
||||
},
|
||||
{
|
||||
"name": "George Mponos",
|
||||
"email": "gmponos@gmail.com",
|
||||
"homepage": "https://github.com/gmponos"
|
||||
},
|
||||
{
|
||||
"name": "Tobias Nyholm",
|
||||
"email": "tobias.nyholm@gmail.com",
|
||||
"homepage": "https://github.com/Nyholm"
|
||||
},
|
||||
{
|
||||
"name": "Márk Sági-Kazár",
|
||||
"email": "mark.sagikazar@gmail.com",
|
||||
"homepage": "https://github.com/sagikazarmark"
|
||||
},
|
||||
{
|
||||
"name": "Tobias Schultze",
|
||||
"email": "webmaster@tubo-world.de",
|
||||
"homepage": "https://github.com/Tobion"
|
||||
}
|
||||
],
|
||||
@ -411,22 +462,36 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/guzzle/psr7/issues",
|
||||
"source": "https://github.com/guzzle/psr7/tree/1.8.2"
|
||||
"source": "https://github.com/guzzle/psr7/tree/1.8.3"
|
||||
},
|
||||
"time": "2021-04-26T09:17:50+00:00"
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/GrahamCampbell",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/Nyholm",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-10-05T13:56:00+00:00"
|
||||
},
|
||||
{
|
||||
"name": "maxmind-db/reader",
|
||||
"version": "v1.10.1",
|
||||
"version": "v1.11.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/maxmind/MaxMind-DB-Reader-php.git",
|
||||
"reference": "569bd44d97d30a4ec12c7793a33004a76d4caf18"
|
||||
"reference": "b1f3c0699525336d09cc5161a2861268d9f2ae5b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/maxmind/MaxMind-DB-Reader-php/zipball/569bd44d97d30a4ec12c7793a33004a76d4caf18",
|
||||
"reference": "569bd44d97d30a4ec12c7793a33004a76d4caf18",
|
||||
"url": "https://api.github.com/repos/maxmind/MaxMind-DB-Reader-php/zipball/b1f3c0699525336d09cc5161a2861268d9f2ae5b",
|
||||
"reference": "b1f3c0699525336d09cc5161a2861268d9f2ae5b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -436,7 +501,7 @@
|
||||
"ext-maxminddb": "<1.10.1,>=2.0.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"friendsofphp/php-cs-fixer": "*",
|
||||
"friendsofphp/php-cs-fixer": "3.*",
|
||||
"php-coveralls/php-coveralls": "^2.1",
|
||||
"phpstan/phpstan": "*",
|
||||
"phpunit/phpcov": ">=6.0.0",
|
||||
@ -476,9 +541,9 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/maxmind/MaxMind-DB-Reader-php/issues",
|
||||
"source": "https://github.com/maxmind/MaxMind-DB-Reader-php/tree/v1.10.1"
|
||||
"source": "https://github.com/maxmind/MaxMind-DB-Reader-php/tree/v1.11.0"
|
||||
},
|
||||
"time": "2021-04-14T17:49:35+00:00"
|
||||
"time": "2021-10-18T15:23:10+00:00"
|
||||
},
|
||||
{
|
||||
"name": "maxmind/web-service-common",
|
||||
@ -728,20 +793,20 @@
|
||||
},
|
||||
{
|
||||
"name": "paypal/paypal-checkout-sdk",
|
||||
"version": "1.0.1",
|
||||
"version": "1.0.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/paypal/Checkout-PHP-SDK.git",
|
||||
"reference": "ed6a55075448308b87a8b59dcb7fedf04a048cb1"
|
||||
"reference": "19992ce7051ff9e47e643f28abb8cc1b3e5f1812"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/paypal/Checkout-PHP-SDK/zipball/ed6a55075448308b87a8b59dcb7fedf04a048cb1",
|
||||
"reference": "ed6a55075448308b87a8b59dcb7fedf04a048cb1",
|
||||
"url": "https://api.github.com/repos/paypal/Checkout-PHP-SDK/zipball/19992ce7051ff9e47e643f28abb8cc1b3e5f1812",
|
||||
"reference": "19992ce7051ff9e47e643f28abb8cc1b3e5f1812",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"paypal/paypalhttp": "1.0.0"
|
||||
"paypal/paypalhttp": "1.0.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^5.7"
|
||||
@ -774,23 +839,22 @@
|
||||
"sdk"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/paypal/Checkout-PHP-SDK/issues",
|
||||
"source": "https://github.com/paypal/Checkout-PHP-SDK/tree/1.0.1"
|
||||
"source": "https://github.com/paypal/Checkout-PHP-SDK/tree/1.0.2"
|
||||
},
|
||||
"time": "2019-11-07T23:16:44+00:00"
|
||||
"time": "2021-09-21T20:57:38+00:00"
|
||||
},
|
||||
{
|
||||
"name": "paypal/paypalhttp",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/paypal/paypalhttp_php.git",
|
||||
"reference": "1ad9b846a046f09d6135cbf2cbaa7701bbc630a3"
|
||||
"reference": "7b09c89c80828e842c79230e7f156b61fbb68d25"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/paypal/paypalhttp_php/zipball/1ad9b846a046f09d6135cbf2cbaa7701bbc630a3",
|
||||
"reference": "1ad9b846a046f09d6135cbf2cbaa7701bbc630a3",
|
||||
"url": "https://api.github.com/repos/paypal/paypalhttp_php/zipball/7b09c89c80828e842c79230e7f156b61fbb68d25",
|
||||
"reference": "7b09c89c80828e842c79230e7f156b61fbb68d25",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -818,23 +882,22 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/paypal/paypalhttp_php/issues",
|
||||
"source": "https://github.com/paypal/paypalhttp_php/tree/1.0.0"
|
||||
"source": "https://github.com/paypal/paypalhttp_php/tree/1.0.1"
|
||||
},
|
||||
"abandoned": true,
|
||||
"time": "2019-11-06T21:27:12+00:00"
|
||||
"time": "2021-09-14T21:35:26+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpmailer/phpmailer",
|
||||
"version": "v6.5.1",
|
||||
"version": "v6.5.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/PHPMailer/PHPMailer.git",
|
||||
"reference": "dd803df5ad7492e1b40637f7ebd258fee5ca7355"
|
||||
"reference": "baeb7cde6b60b1286912690ab0693c7789a31e71"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/dd803df5ad7492e1b40637f7ebd258fee5ca7355",
|
||||
"reference": "dd803df5ad7492e1b40637f7ebd258fee5ca7355",
|
||||
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/baeb7cde6b60b1286912690ab0693c7789a31e71",
|
||||
"reference": "baeb7cde6b60b1286912690ab0693c7789a31e71",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -891,7 +954,7 @@
|
||||
"description": "PHPMailer is a full-featured email creation and transfer class for PHP",
|
||||
"support": {
|
||||
"issues": "https://github.com/PHPMailer/PHPMailer/issues",
|
||||
"source": "https://github.com/PHPMailer/PHPMailer/tree/v6.5.1"
|
||||
"source": "https://github.com/PHPMailer/PHPMailer/tree/v6.5.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -899,7 +962,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2021-08-18T09:14:16+00:00"
|
||||
"time": "2021-11-25T16:34:11+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/http-message",
|
||||
@ -1075,6 +1138,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"abandoned": true,
|
||||
"time": "2021-02-15T19:23:18+00:00"
|
||||
},
|
||||
{
|
||||
@ -1144,16 +1208,16 @@
|
||||
},
|
||||
{
|
||||
"name": "stripe/stripe-php",
|
||||
"version": "v7.94.0",
|
||||
"version": "v7.105.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/stripe/stripe-php.git",
|
||||
"reference": "03cd6b5c1c4fc9087ddd1dd046457bff274294d6"
|
||||
"reference": "3a926610ca772aa7519fb132c88a6e7472788d90"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/stripe/stripe-php/zipball/03cd6b5c1c4fc9087ddd1dd046457bff274294d6",
|
||||
"reference": "03cd6b5c1c4fc9087ddd1dd046457bff274294d6",
|
||||
"url": "https://api.github.com/repos/stripe/stripe-php/zipball/3a926610ca772aa7519fb132c88a6e7472788d90",
|
||||
"reference": "3a926610ca772aa7519fb132c88a6e7472788d90",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -1163,11 +1227,10 @@
|
||||
"php": ">=5.6.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"friendsofphp/php-cs-fixer": "2.17.1",
|
||||
"php-coveralls/php-coveralls": "^2.1",
|
||||
"phpunit/phpunit": "^5.7",
|
||||
"squizlabs/php_codesniffer": "^3.3",
|
||||
"symfony/process": "~3.4"
|
||||
"friendsofphp/php-cs-fixer": "3.2.1",
|
||||
"phpstan/phpstan": "^1.2",
|
||||
"phpunit/phpunit": "^5.7 || ^9.0",
|
||||
"squizlabs/php_codesniffer": "^3.3"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
@ -1199,9 +1262,9 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/stripe/stripe-php/issues",
|
||||
"source": "https://github.com/stripe/stripe-php/tree/v7.94.0"
|
||||
"source": "https://github.com/stripe/stripe-php/tree/v7.105.0"
|
||||
},
|
||||
"time": "2021-08-19T14:15:27+00:00"
|
||||
"time": "2021-12-06T22:51:55+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-intl-idn",
|
||||
@ -2171,21 +2234,21 @@
|
||||
"packages-dev": [
|
||||
{
|
||||
"name": "filp/whoops",
|
||||
"version": "2.14.0",
|
||||
"version": "2.14.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/filp/whoops.git",
|
||||
"reference": "fdf92f03e150ed84d5967a833ae93abffac0315b"
|
||||
"reference": "f056f1fe935d9ed86e698905a957334029899895"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/filp/whoops/zipball/fdf92f03e150ed84d5967a833ae93abffac0315b",
|
||||
"reference": "fdf92f03e150ed84d5967a833ae93abffac0315b",
|
||||
"url": "https://api.github.com/repos/filp/whoops/zipball/f056f1fe935d9ed86e698905a957334029899895",
|
||||
"reference": "f056f1fe935d9ed86e698905a957334029899895",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^5.5.9 || ^7.0 || ^8.0",
|
||||
"psr/log": "^1.0.1"
|
||||
"psr/log": "^1.0.1 || ^2.0 || ^3.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"mockery/mockery": "^0.9 || ^1.0",
|
||||
@ -2230,7 +2293,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/filp/whoops/issues",
|
||||
"source": "https://github.com/filp/whoops/tree/2.14.0"
|
||||
"source": "https://github.com/filp/whoops/tree/2.14.4"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -2238,7 +2301,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2021-07-13T12:00:00+00:00"
|
||||
"time": "2021-10-03T12:00:00+00:00"
|
||||
},
|
||||
{
|
||||
"name": "kint-php/kint",
|
||||
@ -2297,21 +2360,21 @@
|
||||
},
|
||||
{
|
||||
"name": "maximebf/debugbar",
|
||||
"version": "v1.17.1",
|
||||
"version": "v1.17.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/maximebf/php-debugbar.git",
|
||||
"reference": "0a3532556be0145603f8a9de23e76dc28eed7054"
|
||||
"reference": "e8ac3499af0ea5b440908e06cc0abe5898008b3c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/0a3532556be0145603f8a9de23e76dc28eed7054",
|
||||
"reference": "0a3532556be0145603f8a9de23e76dc28eed7054",
|
||||
"url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/e8ac3499af0ea5b440908e06cc0abe5898008b3c",
|
||||
"reference": "e8ac3499af0ea5b440908e06cc0abe5898008b3c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.1|^8",
|
||||
"psr/log": "^1.0",
|
||||
"psr/log": "^1|^2|^3",
|
||||
"symfony/var-dumper": "^2.6|^3|^4|^5"
|
||||
},
|
||||
"require-dev": {
|
||||
@ -2356,9 +2419,9 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/maximebf/php-debugbar/issues",
|
||||
"source": "https://github.com/maximebf/php-debugbar/tree/v1.17.1"
|
||||
"source": "https://github.com/maximebf/php-debugbar/tree/v1.17.3"
|
||||
},
|
||||
"time": "2021-08-01T09:19:02+00:00"
|
||||
"time": "2021-10-19T12:33:27+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/log",
|
||||
@ -2575,16 +2638,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/var-dumper",
|
||||
"version": "v4.4.27",
|
||||
"version": "v4.4.34",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/var-dumper.git",
|
||||
"reference": "391d6d0e7a06ab54eb7c38fab29b8d174471b3ba"
|
||||
"reference": "2d0c056b2faaa3d785bdbd5adecc593a5be9c16e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/391d6d0e7a06ab54eb7c38fab29b8d174471b3ba",
|
||||
"reference": "391d6d0e7a06ab54eb7c38fab29b8d174471b3ba",
|
||||
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/2d0c056b2faaa3d785bdbd5adecc593a5be9c16e",
|
||||
"reference": "2d0c056b2faaa3d785bdbd5adecc593a5be9c16e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -2644,7 +2707,7 @@
|
||||
"dump"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/var-dumper/tree/v4.4.27"
|
||||
"source": "https://github.com/symfony/var-dumper/tree/v4.4.34"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -2660,7 +2723,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-07-23T15:41:52+00:00"
|
||||
"time": "2021-11-12T10:50:54+00:00"
|
||||
}
|
||||
],
|
||||
"aliases": [],
|
||||
|
3
vendor/composer/autoload_classmap.php
vendored
3
vendor/composer/autoload_classmap.php
vendored
@ -19,6 +19,7 @@ return array(
|
||||
'ApiController' => $baseDir . '/admin/survey/api/class.ApiController.php',
|
||||
'ApiNarocilaController' => $baseDir . '/frontend/payments/classes/class.ApiNarocilaController.php',
|
||||
'ApiSurvey' => $baseDir . '/admin/survey/api/class.ApiSurvey.php',
|
||||
'AppSettings' => $baseDir . '/admin/survey/classes/class.AppSettings.php',
|
||||
'App\\Controllers\\AjaxController' => $baseDir . '/main/survey/app/Controllers/AjaxController.php',
|
||||
'App\\Controllers\\BodyController' => $baseDir . '/main/survey/app/Controllers/BodyController.php',
|
||||
'App\\Controllers\\CheckController' => $baseDir . '/main/survey/app/Controllers/CheckController.php',
|
||||
@ -855,6 +856,7 @@ return array(
|
||||
'Stripe\\Service\\ReviewService' => $vendorDir . '/stripe/stripe-php/lib/Service/ReviewService.php',
|
||||
'Stripe\\Service\\SetupAttemptService' => $vendorDir . '/stripe/stripe-php/lib/Service/SetupAttemptService.php',
|
||||
'Stripe\\Service\\SetupIntentService' => $vendorDir . '/stripe/stripe-php/lib/Service/SetupIntentService.php',
|
||||
'Stripe\\Service\\ShippingRateService' => $vendorDir . '/stripe/stripe-php/lib/Service/ShippingRateService.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',
|
||||
'Stripe\\Service\\SkuService' => $vendorDir . '/stripe/stripe-php/lib/Service/SkuService.php',
|
||||
@ -874,6 +876,7 @@ return array(
|
||||
'Stripe\\Service\\WebhookEndpointService' => $vendorDir . '/stripe/stripe-php/lib/Service/WebhookEndpointService.php',
|
||||
'Stripe\\SetupAttempt' => $vendorDir . '/stripe/stripe-php/lib/SetupAttempt.php',
|
||||
'Stripe\\SetupIntent' => $vendorDir . '/stripe/stripe-php/lib/SetupIntent.php',
|
||||
'Stripe\\ShippingRate' => $vendorDir . '/stripe/stripe-php/lib/ShippingRate.php',
|
||||
'Stripe\\Sigma\\ScheduledQueryRun' => $vendorDir . '/stripe/stripe-php/lib/Sigma/ScheduledQueryRun.php',
|
||||
'Stripe\\SingletonApiResource' => $vendorDir . '/stripe/stripe-php/lib/SingletonApiResource.php',
|
||||
'Stripe\\Source' => $vendorDir . '/stripe/stripe-php/lib/Source.php',
|
||||
|
3
vendor/composer/autoload_static.php
vendored
3
vendor/composer/autoload_static.php
vendored
@ -223,6 +223,7 @@ class ComposerStaticInit6b03163c371c5541881b55b762b8c779
|
||||
'ApiController' => __DIR__ . '/../..' . '/admin/survey/api/class.ApiController.php',
|
||||
'ApiNarocilaController' => __DIR__ . '/../..' . '/frontend/payments/classes/class.ApiNarocilaController.php',
|
||||
'ApiSurvey' => __DIR__ . '/../..' . '/admin/survey/api/class.ApiSurvey.php',
|
||||
'AppSettings' => __DIR__ . '/../..' . '/admin/survey/classes/class.AppSettings.php',
|
||||
'App\\Controllers\\AjaxController' => __DIR__ . '/../..' . '/main/survey/app/Controllers/AjaxController.php',
|
||||
'App\\Controllers\\BodyController' => __DIR__ . '/../..' . '/main/survey/app/Controllers/BodyController.php',
|
||||
'App\\Controllers\\CheckController' => __DIR__ . '/../..' . '/main/survey/app/Controllers/CheckController.php',
|
||||
@ -1059,6 +1060,7 @@ class ComposerStaticInit6b03163c371c5541881b55b762b8c779
|
||||
'Stripe\\Service\\ReviewService' => __DIR__ . '/..' . '/stripe/stripe-php/lib/Service/ReviewService.php',
|
||||
'Stripe\\Service\\SetupAttemptService' => __DIR__ . '/..' . '/stripe/stripe-php/lib/Service/SetupAttemptService.php',
|
||||
'Stripe\\Service\\SetupIntentService' => __DIR__ . '/..' . '/stripe/stripe-php/lib/Service/SetupIntentService.php',
|
||||
'Stripe\\Service\\ShippingRateService' => __DIR__ . '/..' . '/stripe/stripe-php/lib/Service/ShippingRateService.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',
|
||||
'Stripe\\Service\\SkuService' => __DIR__ . '/..' . '/stripe/stripe-php/lib/Service/SkuService.php',
|
||||
@ -1078,6 +1080,7 @@ class ComposerStaticInit6b03163c371c5541881b55b762b8c779
|
||||
'Stripe\\Service\\WebhookEndpointService' => __DIR__ . '/..' . '/stripe/stripe-php/lib/Service/WebhookEndpointService.php',
|
||||
'Stripe\\SetupAttempt' => __DIR__ . '/..' . '/stripe/stripe-php/lib/SetupAttempt.php',
|
||||
'Stripe\\SetupIntent' => __DIR__ . '/..' . '/stripe/stripe-php/lib/SetupIntent.php',
|
||||
'Stripe\\ShippingRate' => __DIR__ . '/..' . '/stripe/stripe-php/lib/ShippingRate.php',
|
||||
'Stripe\\Sigma\\ScheduledQueryRun' => __DIR__ . '/..' . '/stripe/stripe-php/lib/Sigma/ScheduledQueryRun.php',
|
||||
'Stripe\\SingletonApiResource' => __DIR__ . '/..' . '/stripe/stripe-php/lib/SingletonApiResource.php',
|
||||
'Stripe\\Source' => __DIR__ . '/..' . '/stripe/stripe-php/lib/Source.php',
|
||||
|
2
vendor/composer/ca-bundle/composer.json
vendored
2
vendor/composer/ca-bundle/composer.json
vendored
@ -30,7 +30,7 @@
|
||||
"symfony/phpunit-bridge": "^4.2 || ^5",
|
||||
"phpstan/phpstan": "^0.12.55",
|
||||
"psr/log": "^1.0",
|
||||
"symfony/process": "^2.5 || ^3.0 || ^4.0 || ^5.0"
|
||||
"symfony/process": "^2.5 || ^3.0 || ^4.0 || ^5.0 || ^6.0"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
|
284
vendor/composer/ca-bundle/res/cacert.pem
vendored
284
vendor/composer/ca-bundle/res/cacert.pem
vendored
@ -1,7 +1,7 @@
|
||||
##
|
||||
## Bundle of CA Root Certificates
|
||||
##
|
||||
## Certificate data from Mozilla as of: Tue May 25 03:12:05 2021 GMT
|
||||
## Certificate data from Mozilla as of: Tue Oct 26 03:12:05 2021 GMT
|
||||
##
|
||||
## This is a bundle of X.509 certificates of public Certificate Authorities
|
||||
## (CA). These were automatically extracted from Mozilla's root certificates
|
||||
@ -14,7 +14,7 @@
|
||||
## Just configure this file as the SSLCACertificateFile.
|
||||
##
|
||||
## Conversion done with mk-ca-bundle.pl version 1.28.
|
||||
## SHA256: e292bd4e2d500c86df45b830d89417be5c42ee670408f1d2c454c63d8a782865
|
||||
## SHA256: bb36818a81feaa4cca61101e6d6276cd09e972efcb08112dfed846918ca41d7f
|
||||
##
|
||||
|
||||
|
||||
@ -156,38 +156,6 @@ Rt0vxuBqw8M0Ayx9lt1awg6nCpnBBYurDC/zXDrPbDdVCYfeU0BsWO/8tqtlbgT2G9w84FoVxp7Z
|
||||
12yxow+ev+to51byrvLjKzg6CYG1a4XXvi3tPxq3smPi9WIsgtRqAEFQ8TmDn5XpNpaYbg==
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
QuoVadis Root CA
|
||||
================
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIF0DCCBLigAwIBAgIEOrZQizANBgkqhkiG9w0BAQUFADB/MQswCQYDVQQGEwJCTTEZMBcGA1UE
|
||||
ChMQUXVvVmFkaXMgTGltaXRlZDElMCMGA1UECxMcUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0
|
||||
eTEuMCwGA1UEAxMlUXVvVmFkaXMgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wMTAz
|
||||
MTkxODMzMzNaFw0yMTAzMTcxODMzMzNaMH8xCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRp
|
||||
cyBMaW1pdGVkMSUwIwYDVQQLExxSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MS4wLAYDVQQD
|
||||
EyVRdW9WYWRpcyBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEF
|
||||
AAOCAQ8AMIIBCgKCAQEAv2G1lVO6V/z68mcLOhrfEYBklbTRvM16z/Ypli4kVEAkOPcahdxYTMuk
|
||||
J0KX0J+DisPkBgNbAKVRHnAEdOLB1Dqr1607BxgFjv2DrOpm2RgbaIr1VxqYuvXtdj182d6UajtL
|
||||
F8HVj71lODqV0D1VNk7feVcxKh7YWWVJWCCYfqtffp/p1k3sg3Spx2zY7ilKhSoGFPlU5tPaZQeL
|
||||
YzcS19Dsw3sgQUSj7cugF+FxZc4dZjH3dgEZyH0DWLaVSR2mEiboxgx24ONmy+pdpibu5cxfvWen
|
||||
AScOospUxbF6lR1xHkopigPcakXBpBlebzbNw6Kwt/5cOOJSvPhEQ+aQuwIDAQABo4ICUjCCAk4w
|
||||
PQYIKwYBBQUHAQEEMTAvMC0GCCsGAQUFBzABhiFodHRwczovL29jc3AucXVvdmFkaXNvZmZzaG9y
|
||||
ZS5jb20wDwYDVR0TAQH/BAUwAwEB/zCCARoGA1UdIASCAREwggENMIIBCQYJKwYBBAG+WAABMIH7
|
||||
MIHUBggrBgEFBQcCAjCBxxqBxFJlbGlhbmNlIG9uIHRoZSBRdW9WYWRpcyBSb290IENlcnRpZmlj
|
||||
YXRlIGJ5IGFueSBwYXJ0eSBhc3N1bWVzIGFjY2VwdGFuY2Ugb2YgdGhlIHRoZW4gYXBwbGljYWJs
|
||||
ZSBzdGFuZGFyZCB0ZXJtcyBhbmQgY29uZGl0aW9ucyBvZiB1c2UsIGNlcnRpZmljYXRpb24gcHJh
|
||||
Y3RpY2VzLCBhbmQgdGhlIFF1b1ZhZGlzIENlcnRpZmljYXRlIFBvbGljeS4wIgYIKwYBBQUHAgEW
|
||||
Fmh0dHA6Ly93d3cucXVvdmFkaXMuYm0wHQYDVR0OBBYEFItLbe3TKbkGGew5Oanwl4Rqy+/fMIGu
|
||||
BgNVHSMEgaYwgaOAFItLbe3TKbkGGew5Oanwl4Rqy+/foYGEpIGBMH8xCzAJBgNVBAYTAkJNMRkw
|
||||
FwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMSUwIwYDVQQLExxSb290IENlcnRpZmljYXRpb24gQXV0
|
||||
aG9yaXR5MS4wLAYDVQQDEyVRdW9WYWRpcyBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5ggQ6
|
||||
tlCLMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQUFAAOCAQEAitQUtf70mpKnGdSkfnIYj9lo
|
||||
fFIk3WdvOXrEql494liwTXCYhGHoG+NpGA7O+0dQoE7/8CQfvbLO9Sf87C9TqnN7Az10buYWnuul
|
||||
LsS/VidQK2K6vkscPFVcQR0kvoIgR13VRH56FmjffU1RcHhXHTMe/QKZnAzNCgVPx7uOpHX6Sm2x
|
||||
gI4JVrmcGmD+XcHXetwReNDWXcG31a0ymQM6isxUJTkxgXsTIlG6Rmyhu576BGxJJnSP0nPrzDCi
|
||||
5upZIof4l/UO/erMkqQWxFIY6iHOsfHmhIHluqmGKPJDWl0Snawe2ajlCmqnf6CHKc/yiU3U7MXi
|
||||
5nrQNiOKSnQ2+Q==
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
QuoVadis Root CA 2
|
||||
==================
|
||||
-----BEGIN CERTIFICATE-----
|
||||
@ -275,26 +243,6 @@ s58+OmJYxUmtYg5xpTKqL8aJdkNAExNnPaJUJRDL8Try2frbSVa7pv6nQTXD4IhhyYjH3zYQIphZ
|
||||
FL39vmwLAw==
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
Sonera Class 2 Root CA
|
||||
======================
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIDIDCCAgigAwIBAgIBHTANBgkqhkiG9w0BAQUFADA5MQswCQYDVQQGEwJGSTEPMA0GA1UEChMG
|
||||
U29uZXJhMRkwFwYDVQQDExBTb25lcmEgQ2xhc3MyIENBMB4XDTAxMDQwNjA3Mjk0MFoXDTIxMDQw
|
||||
NjA3Mjk0MFowOTELMAkGA1UEBhMCRkkxDzANBgNVBAoTBlNvbmVyYTEZMBcGA1UEAxMQU29uZXJh
|
||||
IENsYXNzMiBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJAXSjWdyvANlsdE+hY3
|
||||
/Ei9vX+ALTU74W+oZ6m/AxxNjG8yR9VBaKQTBME1DJqEQ/xcHf+Js+gXGM2RX/uJ4+q/Tl18GybT
|
||||
dXnt5oTjV+WtKcT0OijnpXuENmmz/V52vaMtmdOQTiMofRhj8VQ7Jp12W5dCsv+u8E7s3TmVToMG
|
||||
f+dJQMjFAbJUWmYdPfz56TwKnoG4cPABi+QjVHzIrviQHgCWctRUz2EjvOr7nQKV0ba5cTppCD8P
|
||||
tOFCx4j1P5iop7oc4HFx71hXgVB6XGt0Rg6DA5jDjqhu8nYybieDwnPz3BjotJPqdURrBGAgcVeH
|
||||
nfO+oJAjPYok4doh28MCAwEAAaMzMDEwDwYDVR0TAQH/BAUwAwEB/zARBgNVHQ4ECgQISqCqWITT
|
||||
XjwwCwYDVR0PBAQDAgEGMA0GCSqGSIb3DQEBBQUAA4IBAQBazof5FnIVV0sd2ZvnoiYw7JNn39Yt
|
||||
0jSv9zilzqsWuasvfDXLrNAPtEwr/IDva4yRXzZ299uzGxnq9LIR/WFxRL8oszodv7ND6J+/3DEI
|
||||
cbCdjdY0RzKQxmUk96BKfARzjzlvF4xytb1LyHr4e4PDKE6cCepnP7JnBBvDFNr450kkkdAdavph
|
||||
Oe9r5yF1BgfYErQhIHBCcYHaPJo2vqZbDWpsmh+Re/n570K6Tk6ezAyNlNzZRZxe7EJQY670XcSx
|
||||
EtzKO6gunRRaBXW37Ndj4ro1tgQIkejanZz2ZrUYrAqmVCY0M9IbwdR/GjqOC6oybtv8TyWf2TLH
|
||||
llpwrN9M
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
XRamp Global CA Root
|
||||
====================
|
||||
-----BEGIN CERTIFICATE-----
|
||||
@ -433,26 +381,6 @@ mNEVX58Svnw2Yzi9RKR/5CYrCsSXaQ3pjOLAEFe4yHYSkVXySGnYvCoCWw9E1CAx2/S6cCZdkGCe
|
||||
vEsXCS+0yx5DaMkHJ8HSXPfqIbloEpw8nL+e/IBcm2PN7EeqJSdnoDfzAIJ9VNep+OkuE6N36B9K
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
DST Root CA X3
|
||||
==============
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIDSjCCAjKgAwIBAgIQRK+wgNajJ7qJMDmGLvhAazANBgkqhkiG9w0BAQUFADA/MSQwIgYDVQQK
|
||||
ExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMTDkRTVCBSb290IENBIFgzMB4X
|
||||
DTAwMDkzMDIxMTIxOVoXDTIxMDkzMDE0MDExNVowPzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1
|
||||
cmUgVHJ1c3QgQ28uMRcwFQYDVQQDEw5EU1QgUm9vdCBDQSBYMzCCASIwDQYJKoZIhvcNAQEBBQAD
|
||||
ggEPADCCAQoCggEBAN+v6ZdQCINXtMxiZfaQguzH0yxrMMpb7NnDfcdAwRgUi+DoM3ZJKuM/IUmT
|
||||
rE4Orz5Iy2Xu/NMhD2XSKtkyj4zl93ewEnu1lcCJo6m67XMuegwGMoOifooUMM0RoOEqOLl5CjH9
|
||||
UL2AZd+3UWODyOKIYepLYYHsUmu5ouJLGiifSKOeDNoJjj4XLh7dIN9bxiqKqy69cK3FCxolkHRy
|
||||
xXtqqzTWMIn/5WgTe1QLyNau7Fqckh49ZLOMxt+/yUFw7BZy1SbsOFU5Q9D8/RhcQPGX69Wam40d
|
||||
utolucbY38EVAjqr2m7xPi71XAicPNaDaeQQmxkqtilX4+U9m5/wAl0CAwEAAaNCMEAwDwYDVR0T
|
||||
AQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFMSnsaR7LHH62+FLkHX/xBVghYkQ
|
||||
MA0GCSqGSIb3DQEBBQUAA4IBAQCjGiybFwBcqR7uKGY3Or+Dxz9LwwmglSBd49lZRNI+DT69ikug
|
||||
dB/OEIKcdBodfpga3csTS7MgROSR6cz8faXbauX+5v3gTt23ADq1cEmv8uXrAvHRAosZy5Q6XkjE
|
||||
GB5YGV8eAlrwDPGxrancWYaLbumR9YbK+rlmM6pZW87ipxZzR8srzJmwN0jP41ZL9c8PDHIyh8bw
|
||||
RLtTcm1D9SZImlJnt1ir/md2cXjbDaJWFBM5JDGFoqgCWjBH4d1QB7wCCZAA62RjYJsWvIjJEubS
|
||||
fZGL+T0yjWW06XyxV3bqxbYoOb8VZRzI9neWagqNdwvYkQsEjgfbKbYK7p2CNTUQ
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
SwissSign Gold CA - G2
|
||||
======================
|
||||
-----BEGIN CERTIFICATE-----
|
||||
@ -1194,27 +1122,6 @@ OR/qnuOf0GZvBeyqdn6/axag67XH/JJULysRJyU3eExRarDzzFhdFPFqSBX/wge2sY0PjlxQRrM9
|
||||
vwGYT7JZVEc+NHt4bVaTLnPqZih4zR0Uv6CPLy64Lo7yFIrM6bV8+2ydDKXhlg==
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
Trustis FPS Root CA
|
||||
===================
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIDZzCCAk+gAwIBAgIQGx+ttiD5JNM2a/fH8YygWTANBgkqhkiG9w0BAQUFADBFMQswCQYDVQQG
|
||||
EwJHQjEYMBYGA1UEChMPVHJ1c3RpcyBMaW1pdGVkMRwwGgYDVQQLExNUcnVzdGlzIEZQUyBSb290
|
||||
IENBMB4XDTAzMTIyMzEyMTQwNloXDTI0MDEyMTExMzY1NFowRTELMAkGA1UEBhMCR0IxGDAWBgNV
|
||||
BAoTD1RydXN0aXMgTGltaXRlZDEcMBoGA1UECxMTVHJ1c3RpcyBGUFMgUm9vdCBDQTCCASIwDQYJ
|
||||
KoZIhvcNAQEBBQADggEPADCCAQoCggEBAMVQe547NdDfxIzNjpvto8A2mfRC6qc+gIMPpqdZh8mQ
|
||||
RUN+AOqGeSoDvT03mYlmt+WKVoaTnGhLaASMk5MCPjDSNzoiYYkchU59j9WvezX2fihHiTHcDnlk
|
||||
H5nSW7r+f2C/revnPDgpai/lkQtV/+xvWNUtyd5MZnGPDNcE2gfmHhjjvSkCqPoc4Vu5g6hBSLwa
|
||||
cY3nYuUtsuvffM/bq1rKMfFMIvMFE/eC+XN5DL7XSxzA0RU8k0Fk0ea+IxciAIleH2ulrG6nS4zt
|
||||
o3Lmr2NNL4XSFDWaLk6M6jKYKIahkQlBOrTh4/L68MkKokHdqeMDx4gVOxzUGpTXn2RZEm0CAwEA
|
||||
AaNTMFEwDwYDVR0TAQH/BAUwAwEB/zAfBgNVHSMEGDAWgBS6+nEleYtXQSUhhgtx67JkDoshZzAd
|
||||
BgNVHQ4EFgQUuvpxJXmLV0ElIYYLceuyZA6LIWcwDQYJKoZIhvcNAQEFBQADggEBAH5Y//01GX2c
|
||||
GE+esCu8jowU/yyg2kdbw++BLa8F6nRIW/M+TgfHbcWzk88iNVy2P3UnXwmWzaD+vkAMXBJV+JOC
|
||||
yinpXj9WV4s4NvdFGkwozZ5BuO1WTISkQMi4sKUraXAEasP41BIy+Q7DsdwyhEQsb8tGD+pmQQ9P
|
||||
8Vilpg0ND2HepZ5dfWWhPBfnqFVO76DH7cZEf1T1o+CP8HxVIo8ptoGj4W1OLBuAZ+ytIJ8MYmHV
|
||||
l/9D7S3B2l0pKoU/rGXuhg8FjZBf3+6f9L/uHfuY5H+QK4R4EA5sSVPvFVtlRkpdr7r7OnIdzfYl
|
||||
iB6XzCGcKQENZetX2fNXlrtIzYE=
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
Buypass Class 2 Root CA
|
||||
=======================
|
||||
-----BEGIN CERTIFICATE-----
|
||||
@ -3136,3 +3043,190 @@ gLWi5h+xEk8blTAKBggqhkjOPQQDAwNoADBlAjEA31SQ7Zvvi5QCkxeCmb6zniz2C5GMn0oUsfZk
|
||||
vLtoURMMA/cVi4RguYv/Uo7njLwcAjA8+RHUjE7AwWHCFUyqqx0LMV87HOIAl0Qx5v5zli/altP+
|
||||
CAezNIm8BZ/3Hobui3A=
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
GLOBALTRUST 2020
|
||||
================
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIFgjCCA2qgAwIBAgILWku9WvtPilv6ZeUwDQYJKoZIhvcNAQELBQAwTTELMAkGA1UEBhMCQVQx
|
||||
IzAhBgNVBAoTGmUtY29tbWVyY2UgbW9uaXRvcmluZyBHbWJIMRkwFwYDVQQDExBHTE9CQUxUUlVT
|
||||
VCAyMDIwMB4XDTIwMDIxMDAwMDAwMFoXDTQwMDYxMDAwMDAwMFowTTELMAkGA1UEBhMCQVQxIzAh
|
||||
BgNVBAoTGmUtY29tbWVyY2UgbW9uaXRvcmluZyBHbWJIMRkwFwYDVQQDExBHTE9CQUxUUlVTVCAy
|
||||
MDIwMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAri5WrRsc7/aVj6B3GyvTY4+ETUWi
|
||||
D59bRatZe1E0+eyLinjF3WuvvcTfk0Uev5E4C64OFudBc/jbu9G4UeDLgztzOG53ig9ZYybNpyrO
|
||||
VPu44sB8R85gfD+yc/LAGbaKkoc1DZAoouQVBGM+uq/ufF7MpotQsjj3QWPKzv9pj2gOlTblzLmM
|
||||
CcpL3TGQlsjMH/1WljTbjhzqLL6FLmPdqqmV0/0plRPwyJiT2S0WR5ARg6I6IqIoV6Lr/sCMKKCm
|
||||
fecqQjuCgGOlYx8ZzHyyZqjC0203b+J+BlHZRYQfEs4kUmSFC0iAToexIiIwquuuvuAC4EDosEKA
|
||||
A1GqtH6qRNdDYfOiaxaJSaSjpCuKAsR49GiKweR6NrFvG5Ybd0mN1MkGco/PU+PcF4UgStyYJ9OR
|
||||
JitHHmkHr96i5OTUawuzXnzUJIBHKWk7buis/UDr2O1xcSvy6Fgd60GXIsUf1DnQJ4+H4xj04KlG
|
||||
DfV0OoIu0G4skaMxXDtG6nsEEFZegB31pWXogvziB4xiRfUg3kZwhqG8k9MedKZssCz3AwyIDMvU
|
||||
clOGvGBG85hqwvG/Q/lwIHfKN0F5VVJjjVsSn8VoxIidrPIwq7ejMZdnrY8XD2zHc+0klGvIg5rQ
|
||||
mjdJBKuxFshsSUktq6HQjJLyQUp5ISXbY9e2nKd+Qmn7OmMCAwEAAaNjMGEwDwYDVR0TAQH/BAUw
|
||||
AwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFNwuH9FhN3nkq9XVsxJxaD1qaJwiMB8GA1Ud
|
||||
IwQYMBaAFNwuH9FhN3nkq9XVsxJxaD1qaJwiMA0GCSqGSIb3DQEBCwUAA4ICAQCR8EICaEDuw2jA
|
||||
VC/f7GLDw56KoDEoqoOOpFaWEhCGVrqXctJUMHytGdUdaG/7FELYjQ7ztdGl4wJCXtzoRlgHNQIw
|
||||
4Lx0SsFDKv/bGtCwr2zD/cuz9X9tAy5ZVp0tLTWMstZDFyySCstd6IwPS3BD0IL/qMy/pJTAvoe9
|
||||
iuOTe8aPmxadJ2W8esVCgmxcB9CpwYhgROmYhRZf+I/KARDOJcP5YBugxZfD0yyIMaK9MOzQ0MAS
|
||||
8cE54+X1+NZK3TTN+2/BT+MAi1bikvcoskJ3ciNnxz8RFbLEAwW+uxF7Cr+obuf/WEPPm2eggAe2
|
||||
HcqtbepBEX4tdJP7wry+UUTF72glJ4DjyKDUEuzZpTcdN3y0kcra1LGWge9oXHYQSa9+pTeAsRxS
|
||||
vTOBTI/53WXZFM2KJVj04sWDpQmQ1GwUY7VA3+vA/MRYfg0UFodUJ25W5HCEuGwyEn6CMUO+1918
|
||||
oa2u1qsgEu8KwxCMSZY13At1XrFP1U80DhEgB3VDRemjEdqso5nCtnkn4rnvyOL2NSl6dPrFf4IF
|
||||
YqYK6miyeUcGbvJXqBUzxvd4Sj1Ce2t+/vdG6tHrju+IaFvowdlxfv1k7/9nR4hYJS8+hge9+6jl
|
||||
gqispdNpQ80xiEmEU5LAsTkbOYMBMMTyqfrQA71yN2BWHzZ8vTmR9W0Nv3vXkg==
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
ANF Secure Server Root CA
|
||||
=========================
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIF7zCCA9egAwIBAgIIDdPjvGz5a7EwDQYJKoZIhvcNAQELBQAwgYQxEjAQBgNVBAUTCUc2MzI4
|
||||
NzUxMDELMAkGA1UEBhMCRVMxJzAlBgNVBAoTHkFORiBBdXRvcmlkYWQgZGUgQ2VydGlmaWNhY2lv
|
||||
bjEUMBIGA1UECxMLQU5GIENBIFJhaXoxIjAgBgNVBAMTGUFORiBTZWN1cmUgU2VydmVyIFJvb3Qg
|
||||
Q0EwHhcNMTkwOTA0MTAwMDM4WhcNMzkwODMwMTAwMDM4WjCBhDESMBAGA1UEBRMJRzYzMjg3NTEw
|
||||
MQswCQYDVQQGEwJFUzEnMCUGA1UEChMeQU5GIEF1dG9yaWRhZCBkZSBDZXJ0aWZpY2FjaW9uMRQw
|
||||
EgYDVQQLEwtBTkYgQ0EgUmFpejEiMCAGA1UEAxMZQU5GIFNlY3VyZSBTZXJ2ZXIgUm9vdCBDQTCC
|
||||
AiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANvrayvmZFSVgpCjcqQZAZ2cC4Ffc0m6p6zz
|
||||
BE57lgvsEeBbphzOG9INgxwruJ4dfkUyYA8H6XdYfp9qyGFOtibBTI3/TO80sh9l2Ll49a2pcbnv
|
||||
T1gdpd50IJeh7WhM3pIXS7yr/2WanvtH2Vdy8wmhrnZEE26cLUQ5vPnHO6RYPUG9tMJJo8gN0pcv
|
||||
B2VSAKduyK9o7PQUlrZXH1bDOZ8rbeTzPvY1ZNoMHKGESy9LS+IsJJ1tk0DrtSOOMspvRdOoiXse
|
||||
zx76W0OLzc2oD2rKDF65nkeP8Nm2CgtYZRczuSPkdxl9y0oukntPLxB3sY0vaJxizOBQ+OyRp1RM
|
||||
VwnVdmPF6GUe7m1qzwmd+nxPrWAI/VaZDxUse6mAq4xhj0oHdkLePfTdsiQzW7i1o0TJrH93PB0j
|
||||
7IKppuLIBkwC/qxcmZkLLxCKpvR/1Yd0DVlJRfbwcVw5Kda/SiOL9V8BY9KHcyi1Swr1+KuCLH5z
|
||||
JTIdC2MKF4EA/7Z2Xue0sUDKIbvVgFHlSFJnLNJhiQcND85Cd8BEc5xEUKDbEAotlRyBr+Qc5RQe
|
||||
8TZBAQIvfXOn3kLMTOmJDVb3n5HUA8ZsyY/b2BzgQJhdZpmYgG4t/wHFzstGH6wCxkPmrqKEPMVO
|
||||
Hj1tyRRM4y5Bu8o5vzY8KhmqQYdOpc5LMnndkEl/AgMBAAGjYzBhMB8GA1UdIwQYMBaAFJxf0Gxj
|
||||
o1+TypOYCK2Mh6UsXME3MB0GA1UdDgQWBBScX9BsY6Nfk8qTmAitjIelLFzBNzAOBgNVHQ8BAf8E
|
||||
BAMCAYYwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAgEATh65isagmD9uw2nAalxJ
|
||||
UqzLK114OMHVVISfk/CHGT0sZonrDUL8zPB1hT+L9IBdeeUXZ701guLyPI59WzbLWoAAKfLOKyzx
|
||||
j6ptBZNscsdW699QIyjlRRA96Gejrw5VD5AJYu9LWaL2U/HANeQvwSS9eS9OICI7/RogsKQOLHDt
|
||||
dD+4E5UGUcjohybKpFtqFiGS3XNgnhAY3jyB6ugYw3yJ8otQPr0R4hUDqDZ9MwFsSBXXiJCZBMXM
|
||||
5gf0vPSQ7RPi6ovDj6MzD8EpTBNO2hVWcXNyglD2mjN8orGoGjR0ZVzO0eurU+AagNjqOknkJjCb
|
||||
5RyKqKkVMoaZkgoQI1YS4PbOTOK7vtuNknMBZi9iPrJyJ0U27U1W45eZ/zo1PqVUSlJZS2Db7v54
|
||||
EX9K3BR5YLZrZAPbFYPhor72I5dQ8AkzNqdxliXzuUJ92zg/LFis6ELhDtjTO0wugumDLmsx2d1H
|
||||
hk9tl5EuT+IocTUW0fJz/iUrB0ckYyfI+PbZa/wSMVYIwFNCr5zQM378BvAxRAMU8Vjq8moNqRGy
|
||||
g77FGr8H6lnco4g175x2MjxNBiLOFeXdntiP2t7SxDnlF4HPOEfrf4htWRvfn0IUrn7PqLBmZdo3
|
||||
r5+qPeoott7VMVgWglvquxl1AnMaykgaIZOQCo6ThKd9OyMYkomgjaw=
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
Certum EC-384 CA
|
||||
================
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICZTCCAeugAwIBAgIQeI8nXIESUiClBNAt3bpz9DAKBggqhkjOPQQDAzB0MQswCQYDVQQGEwJQ
|
||||
TDEhMB8GA1UEChMYQXNzZWNvIERhdGEgU3lzdGVtcyBTLkEuMScwJQYDVQQLEx5DZXJ0dW0gQ2Vy
|
||||
dGlmaWNhdGlvbiBBdXRob3JpdHkxGTAXBgNVBAMTEENlcnR1bSBFQy0zODQgQ0EwHhcNMTgwMzI2
|
||||
MDcyNDU0WhcNNDMwMzI2MDcyNDU0WjB0MQswCQYDVQQGEwJQTDEhMB8GA1UEChMYQXNzZWNvIERh
|
||||
dGEgU3lzdGVtcyBTLkEuMScwJQYDVQQLEx5DZXJ0dW0gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkx
|
||||
GTAXBgNVBAMTEENlcnR1bSBFQy0zODQgQ0EwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAATEKI6rGFtq
|
||||
vm5kN2PkzeyrOvfMobgOgknXhimfoZTy42B4mIF4Bk3y7JoOV2CDn7TmFy8as10CW4kjPMIRBSqn
|
||||
iBMY81CE1700LCeJVf/OTOffph8oxPBUw7l8t1Ot68KjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYD
|
||||
VR0OBBYEFI0GZnQkdjrzife81r1HfS+8EF9LMA4GA1UdDwEB/wQEAwIBBjAKBggqhkjOPQQDAwNo
|
||||
ADBlAjADVS2m5hjEfO/JUG7BJw+ch69u1RsIGL2SKcHvlJF40jocVYli5RsJHrpka/F2tNQCMQC0
|
||||
QoSZ/6vnnvuRlydd3LBbMHHOXjgaatkl5+r3YZJW+OraNsKHZZYuciUvf9/DE8k=
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
Certum Trusted Root CA
|
||||
======================
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIFwDCCA6igAwIBAgIQHr9ZULjJgDdMBvfrVU+17TANBgkqhkiG9w0BAQ0FADB6MQswCQYDVQQG
|
||||
EwJQTDEhMB8GA1UEChMYQXNzZWNvIERhdGEgU3lzdGVtcyBTLkEuMScwJQYDVQQLEx5DZXJ0dW0g
|
||||
Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkxHzAdBgNVBAMTFkNlcnR1bSBUcnVzdGVkIFJvb3QgQ0Ew
|
||||
HhcNMTgwMzE2MTIxMDEzWhcNNDMwMzE2MTIxMDEzWjB6MQswCQYDVQQGEwJQTDEhMB8GA1UEChMY
|
||||
QXNzZWNvIERhdGEgU3lzdGVtcyBTLkEuMScwJQYDVQQLEx5DZXJ0dW0gQ2VydGlmaWNhdGlvbiBB
|
||||
dXRob3JpdHkxHzAdBgNVBAMTFkNlcnR1bSBUcnVzdGVkIFJvb3QgQ0EwggIiMA0GCSqGSIb3DQEB
|
||||
AQUAA4ICDwAwggIKAoICAQDRLY67tzbqbTeRn06TpwXkKQMlzhyC93yZn0EGze2jusDbCSzBfN8p
|
||||
fktlL5On1AFrAygYo9idBcEq2EXxkd7fO9CAAozPOA/qp1x4EaTByIVcJdPTsuclzxFUl6s1wB52
|
||||
HO8AU5853BSlLCIls3Jy/I2z5T4IHhQqNwuIPMqw9MjCoa68wb4pZ1Xi/K1ZXP69VyywkI3C7Te2
|
||||
fJmItdUDmj0VDT06qKhF8JVOJVkdzZhpu9PMMsmN74H+rX2Ju7pgE8pllWeg8xn2A1bUatMn4qGt
|
||||
g/BKEiJ3HAVz4hlxQsDsdUaakFjgao4rpUYwBI4Zshfjvqm6f1bxJAPXsiEodg42MEx51UGamqi4
|
||||
NboMOvJEGyCI98Ul1z3G4z5D3Yf+xOr1Uz5MZf87Sst4WmsXXw3Hw09Omiqi7VdNIuJGmj8PkTQk
|
||||
fVXjjJU30xrwCSss0smNtA0Aq2cpKNgB9RkEth2+dv5yXMSFytKAQd8FqKPVhJBPC/PgP5sZ0jeJ
|
||||
P/J7UhyM9uH3PAeXjA6iWYEMspA90+NZRu0PqafegGtaqge2Gcu8V/OXIXoMsSt0Puvap2ctTMSY
|
||||
njYJdmZm/Bo/6khUHL4wvYBQv3y1zgD2DGHZ5yQD4OMBgQ692IU0iL2yNqh7XAjlRICMb/gv1SHK
|
||||
HRzQ+8S1h9E6Tsd2tTVItQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBSM+xx1
|
||||
vALTn04uSNn5YFSqxLNP+jAOBgNVHQ8BAf8EBAMCAQYwDQYJKoZIhvcNAQENBQADggIBAEii1QAL
|
||||
LtA/vBzVtVRJHlpr9OTy4EA34MwUe7nJ+jW1dReTagVphZzNTxl4WxmB82M+w85bj/UvXgF2Ez8s
|
||||
ALnNllI5SW0ETsXpD4YN4fqzX4IS8TrOZgYkNCvozMrnadyHncI013nR03e4qllY/p0m+jiGPp2K
|
||||
h2RX5Rc64vmNueMzeMGQ2Ljdt4NR5MTMI9UGfOZR0800McD2RrsLrfw9EAUqO0qRJe6M1ISHgCq8
|
||||
CYyqOhNf6DR5UMEQGfnTKB7U0VEwKbOukGfWHwpjscWpxkIxYxeU72nLL/qMFH3EQxiJ2fAyQOaA
|
||||
4kZf5ePBAFmo+eggvIksDkc0C+pXwlM2/KfUrzHN/gLldfq5Jwn58/U7yn2fqSLLiMmq0Uc9Nneo
|
||||
WWRrJ8/vJ8HjJLWG965+Mk2weWjROeiQWMODvA8s1pfrzgzhIMfatz7DP78v3DSk+yshzWePS/Tj
|
||||
6tQ/50+6uaWTRRxmHyH6ZF5v4HaUMst19W7l9o/HuKTMqJZ9ZPskWkoDbGs4xugDQ5r3V7mzKWmT
|
||||
OPQD8rv7gmsHINFSH5pkAnuYZttcTVoP0ISVoDwUQwbKytu4QTbaakRnh6+v40URFWkIsr4WOZck
|
||||
bxJF0WddCajJFdr60qZfE2Efv4WstK2tBZQIgx51F9NxO5NQI1mg7TyRVJ12AMXDuDjb
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
TunTrust Root CA
|
||||
================
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIFszCCA5ugAwIBAgIUEwLV4kBMkkaGFmddtLu7sms+/BMwDQYJKoZIhvcNAQELBQAwYTELMAkG
|
||||
A1UEBhMCVE4xNzA1BgNVBAoMLkFnZW5jZSBOYXRpb25hbGUgZGUgQ2VydGlmaWNhdGlvbiBFbGVj
|
||||
dHJvbmlxdWUxGTAXBgNVBAMMEFR1blRydXN0IFJvb3QgQ0EwHhcNMTkwNDI2MDg1NzU2WhcNNDQw
|
||||
NDI2MDg1NzU2WjBhMQswCQYDVQQGEwJUTjE3MDUGA1UECgwuQWdlbmNlIE5hdGlvbmFsZSBkZSBD
|
||||
ZXJ0aWZpY2F0aW9uIEVsZWN0cm9uaXF1ZTEZMBcGA1UEAwwQVHVuVHJ1c3QgUm9vdCBDQTCCAiIw
|
||||
DQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMPN0/y9BFPdDCA61YguBUtB9YOCfvdZn56eY+hz
|
||||
2vYGqU8ftPkLHzmMmiDQfgbU7DTZhrx1W4eI8NLZ1KMKsmwb60ksPqxd2JQDoOw05TDENX37Jk0b
|
||||
bjBU2PWARZw5rZzJJQRNmpA+TkBuimvNKWfGzC3gdOgFVwpIUPp6Q9p+7FuaDmJ2/uqdHYVy7BG7
|
||||
NegfJ7/Boce7SBbdVtfMTqDhuazb1YMZGoXRlJfXyqNlC/M4+QKu3fZnz8k/9YosRxqZbwUN/dAd
|
||||
gjH8KcwAWJeRTIAAHDOFli/LQcKLEITDCSSJH7UP2dl3RxiSlGBcx5kDPP73lad9UKGAwqmDrViW
|
||||
VSHbhlnUr8a83YFuB9tgYv7sEG7aaAH0gxupPqJbI9dkxt/con3YS7qC0lH4Zr8GRuR5KiY2eY8f
|
||||
Tpkdso8MDhz/yV3A/ZAQprE38806JG60hZC/gLkMjNWb1sjxVj8agIl6qeIbMlEsPvLfe/ZdeikZ
|
||||
juXIvTZxi11Mwh0/rViizz1wTaZQmCXcI/m4WEEIcb9PuISgjwBUFfyRbVinljvrS5YnzWuioYas
|
||||
DXxU5mZMZl+QviGaAkYt5IPCgLnPSz7ofzwB7I9ezX/SKEIBlYrilz0QIX32nRzFNKHsLA4KUiwS
|
||||
VXAkPcvCFDVDXSdOvsC9qnyW5/yeYa1E0wCXAgMBAAGjYzBhMB0GA1UdDgQWBBQGmpsfU33x9aTI
|
||||
04Y+oXNZtPdEITAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFAaamx9TffH1pMjThj6hc1m0
|
||||
90QhMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQsFAAOCAgEAqgVutt0Vyb+zxiD2BkewhpMl
|
||||
0425yAA/l/VSJ4hxyXT968pk21vvHl26v9Hr7lxpuhbI87mP0zYuQEkHDVneixCwSQXi/5E/S7fd
|
||||
Ao74gShczNxtr18UnH1YeA32gAm56Q6XKRm4t+v4FstVEuTGfbvE7Pi1HE4+Z7/FXxttbUcoqgRY
|
||||
YdZ2vyJ/0Adqp2RT8JeNnYA/u8EH22Wv5psymsNUk8QcCMNE+3tjEUPRahphanltkE8pjkcFwRJp
|
||||
adbGNjHh/PqAulxPxOu3Mqz4dWEX1xAZufHSCe96Qp1bWgvUxpVOKs7/B9dPfhgGiPEZtdmYu65x
|
||||
xBzndFlY7wyJz4sfdZMaBBSSSFCp61cpABbjNhzI+L/wM9VBD8TMPN3pM0MBkRArHtG5Xc0yGYuP
|
||||
jCB31yLEQtyEFpslbei0VXF/sHyz03FJuc9SpAQ/3D2gu68zngowYI7bnV2UqL1g52KAdoGDDIzM
|
||||
MEZJ4gzSqK/rYXHv5yJiqfdcZGyfFoxnNidF9Ql7v/YQCvGwjVRDjAS6oz/v4jXH+XTgbzRB0L9z
|
||||
ZVcg+ZtnemZoJE6AZb0QmQZZ8mWvuMZHu/2QeItBcy6vVR/cO5JyboTT0GFMDcx2V+IthSIVNg3r
|
||||
AZ3r2OvEhJn7wAzMMujjd9qDRIueVSjAi1jTkD5OGwDxFa2DK5o=
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
HARICA TLS RSA Root CA 2021
|
||||
===========================
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIFpDCCA4ygAwIBAgIQOcqTHO9D88aOk8f0ZIk4fjANBgkqhkiG9w0BAQsFADBsMQswCQYDVQQG
|
||||
EwJHUjE3MDUGA1UECgwuSGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJlc2VhcmNoIEluc3RpdHV0aW9u
|
||||
cyBDQTEkMCIGA1UEAwwbSEFSSUNBIFRMUyBSU0EgUm9vdCBDQSAyMDIxMB4XDTIxMDIxOTEwNTUz
|
||||
OFoXDTQ1MDIxMzEwNTUzN1owbDELMAkGA1UEBhMCR1IxNzA1BgNVBAoMLkhlbGxlbmljIEFjYWRl
|
||||
bWljIGFuZCBSZXNlYXJjaCBJbnN0aXR1dGlvbnMgQ0ExJDAiBgNVBAMMG0hBUklDQSBUTFMgUlNB
|
||||
IFJvb3QgQ0EgMjAyMTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAIvC569lmwVnlskN
|
||||
JLnQDmT8zuIkGCyEf3dRywQRNrhe7Wlxp57kJQmXZ8FHws+RFjZiPTgE4VGC/6zStGndLuwRo0Xu
|
||||
a2s7TL+MjaQenRG56Tj5eg4MmOIjHdFOY9TnuEFE+2uva9of08WRiFukiZLRgeaMOVig1mlDqa2Y
|
||||
Ulhu2wr7a89o+uOkXjpFc5gH6l8Cct4MpbOfrqkdtx2z/IpZ525yZa31MJQjB/OCFks1mJxTuy/K
|
||||
5FrZx40d/JiZ+yykgmvwKh+OC19xXFyuQnspiYHLA6OZyoieC0AJQTPb5lh6/a6ZcMBaD9YThnEv
|
||||
dmn8kN3bLW7R8pv1GmuebxWMevBLKKAiOIAkbDakO/IwkfN4E8/BPzWr8R0RI7VDIp4BkrcYAuUR
|
||||
0YLbFQDMYTfBKnya4dC6s1BG7oKsnTH4+yPiAwBIcKMJJnkVU2DzOFytOOqBAGMUuTNe3QvboEUH
|
||||
GjMJ+E20pwKmafTCWQWIZYVWrkvL4N48fS0ayOn7H6NhStYqE613TBoYm5EPWNgGVMWX+Ko/IIqm
|
||||
haZ39qb8HOLubpQzKoNQhArlT4b4UEV4AIHrW2jjJo3Me1xR9BQsQL4aYB16cmEdH2MtiKrOokWQ
|
||||
CPxrvrNQKlr9qEgYRtaQQJKQCoReaDH46+0N0x3GfZkYVVYnZS6NRcUk7M7jAgMBAAGjQjBAMA8G
|
||||
A1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFApII6ZgpJIKM+qTW8VX6iVNvRLuMA4GA1UdDwEB/wQE
|
||||
AwIBhjANBgkqhkiG9w0BAQsFAAOCAgEAPpBIqm5iFSVmewzVjIuJndftTgfvnNAUX15QvWiWkKQU
|
||||
EapobQk1OUAJ2vQJLDSle1mESSmXdMgHHkdt8s4cUCbjnj1AUz/3f5Z2EMVGpdAgS1D0NTsY9FVq
|
||||
QRtHBmg8uwkIYtlfVUKqrFOFrJVWNlar5AWMxajaH6NpvVMPxP/cyuN+8kyIhkdGGvMA9YCRotxD
|
||||
QpSbIPDRzbLrLFPCU3hKTwSUQZqPJzLB5UkZv/HywouoCjkxKLR9YjYsTewfM7Z+d21+UPCfDtcR
|
||||
j88YxeMn/ibvBZ3PzzfF0HvaO7AWhAw6k9a+F9sPPg4ZeAnHqQJyIkv3N3a6dcSFA1pj1bF1BcK5
|
||||
vZStjBWZp5N99sXzqnTPBIWUmAD04vnKJGW/4GKvyMX6ssmeVkjaef2WdhW+o45WxLM0/L5H9MG0
|
||||
qPzVMIho7suuyWPEdr6sOBjhXlzPrjoiUevRi7PzKzMHVIf6tLITe7pTBGIBnfHAT+7hOtSLIBD6
|
||||
Alfm78ELt5BGnBkpjNxvoEppaZS3JGWg/6w/zgH7IS79aPib8qXPMThcFarmlwDB31qlpzmq6YR/
|
||||
PFGoOtmUW4y/Twhx5duoXNTSpv4Ao8YWxw/ogM4cKGR0GQjTQuPOAF1/sdwTsOEFy9EgqoZ0njnn
|
||||
kf3/W9b3raYvAwtt41dU63ZTGI0RmLo=
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
HARICA TLS ECC Root CA 2021
|
||||
===========================
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICVDCCAdugAwIBAgIQZ3SdjXfYO2rbIvT/WeK/zjAKBggqhkjOPQQDAzBsMQswCQYDVQQGEwJH
|
||||
UjE3MDUGA1UECgwuSGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJlc2VhcmNoIEluc3RpdHV0aW9ucyBD
|
||||
QTEkMCIGA1UEAwwbSEFSSUNBIFRMUyBFQ0MgUm9vdCBDQSAyMDIxMB4XDTIxMDIxOTExMDExMFoX
|
||||
DTQ1MDIxMzExMDEwOVowbDELMAkGA1UEBhMCR1IxNzA1BgNVBAoMLkhlbGxlbmljIEFjYWRlbWlj
|
||||
IGFuZCBSZXNlYXJjaCBJbnN0aXR1dGlvbnMgQ0ExJDAiBgNVBAMMG0hBUklDQSBUTFMgRUNDIFJv
|
||||
b3QgQ0EgMjAyMTB2MBAGByqGSM49AgEGBSuBBAAiA2IABDgI/rGgltJ6rK9JOtDA4MM7KKrxcm1l
|
||||
AEeIhPyaJmuqS7psBAqIXhfyVYf8MLA04jRYVxqEU+kw2anylnTDUR9YSTHMmE5gEYd103KUkE+b
|
||||
ECUqqHgtvpBBWJAVcqeht6NCMEAwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUyRtTgRL+BNUW
|
||||
0aq8mm+3oJUZbsowDgYDVR0PAQH/BAQDAgGGMAoGCCqGSM49BAMDA2cAMGQCMBHervjcToiwqfAi
|
||||
rcJRQO9gcS3ujwLEXQNwSaSS6sUUiHCm0w2wqsosQJz76YJumgIwK0eaB8bRwoF8yguWGEEbo/Qw
|
||||
CZ61IygNnxS2PFOiTAZpffpskcYqSUXm7LcT4Tps
|
||||
-----END CERTIFICATE-----
|
||||
|
86
vendor/composer/ca-bundle/src/CaBundle.php
vendored
86
vendor/composer/ca-bundle/src/CaBundle.php
vendored
@ -108,7 +108,7 @@ class CaBundle
|
||||
return self::$caPath = $caBundle;
|
||||
}
|
||||
|
||||
if ($caBundle && self::caDirUsable($caBundle)) {
|
||||
if ($caBundle && self::caDirUsable($caBundle, $logger)) {
|
||||
return self::$caPath = $caBundle;
|
||||
}
|
||||
}
|
||||
@ -335,19 +335,97 @@ EOT;
|
||||
|
||||
/**
|
||||
* @param string|false $certFile
|
||||
* @param LoggerInterface|null $logger
|
||||
* @return bool
|
||||
*/
|
||||
private static function caFileUsable($certFile, LoggerInterface $logger = null)
|
||||
{
|
||||
return $certFile && @is_file($certFile) && @is_readable($certFile) && static::validateCaFile($certFile, $logger);
|
||||
return $certFile
|
||||
&& static::isFile($certFile, $logger)
|
||||
&& static::isReadable($certFile, $logger)
|
||||
&& static::validateCaFile($certFile, $logger);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string|false $certDir
|
||||
* @param LoggerInterface|null $logger
|
||||
* @return bool
|
||||
*/
|
||||
private static function caDirUsable($certDir)
|
||||
private static function caDirUsable($certDir, LoggerInterface $logger = null)
|
||||
{
|
||||
return $certDir && @is_dir($certDir) && @is_readable($certDir) && glob($certDir . '/*');
|
||||
return $certDir
|
||||
&& static::isDir($certDir, $logger)
|
||||
&& static::isReadable($certDir, $logger)
|
||||
&& static::glob($certDir . '/*', $logger);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $certFile
|
||||
* @param LoggerInterface|null $logger
|
||||
* @return bool
|
||||
*/
|
||||
private static function isFile($certFile, LoggerInterface $logger = null)
|
||||
{
|
||||
$isFile = @is_file($certFile);
|
||||
if (!$isFile && $logger) {
|
||||
$logger->debug(sprintf('Checked CA file %s does not exist or it is not a file.', $certFile));
|
||||
}
|
||||
|
||||
return $isFile;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $certDir
|
||||
* @param LoggerInterface|null $logger
|
||||
* @return bool
|
||||
*/
|
||||
private static function isDir($certDir, LoggerInterface $logger = null)
|
||||
{
|
||||
$isDir = @is_dir($certDir);
|
||||
if (!$isDir && $logger) {
|
||||
$logger->debug(sprintf('Checked directory %s does not exist or it is not a directory.', $certDir));
|
||||
}
|
||||
|
||||
return $isDir;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $certFileOrDir
|
||||
* @param LoggerInterface|null $logger
|
||||
* @return bool
|
||||
*/
|
||||
private static function isReadable($certFileOrDir, LoggerInterface $logger = null)
|
||||
{
|
||||
$isReadable = @is_readable($certFileOrDir);
|
||||
if (!$isReadable && $logger) {
|
||||
$logger->debug(sprintf('Checked file or directory %s is not readable.', $certFileOrDir));
|
||||
}
|
||||
|
||||
return $isReadable;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $pattern
|
||||
* @param LoggerInterface|null $logger
|
||||
* @return bool
|
||||
*/
|
||||
private static function glob($pattern, LoggerInterface $logger = null)
|
||||
{
|
||||
$certs = glob($pattern);
|
||||
if ($certs === false) {
|
||||
if ($logger) {
|
||||
$logger->debug(sprintf("An error occurred while trying to find certificates for pattern: %s", $pattern));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
if (count($certs) === 0) {
|
||||
if ($logger) {
|
||||
$logger->debug(sprintf("No CA files found for pattern: %s", $pattern));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
221
vendor/composer/installed.json
vendored
221
vendor/composer/installed.json
vendored
@ -2,17 +2,17 @@
|
||||
"packages": [
|
||||
{
|
||||
"name": "composer/ca-bundle",
|
||||
"version": "1.2.10",
|
||||
"version_normalized": "1.2.10.0",
|
||||
"version": "1.3.1",
|
||||
"version_normalized": "1.3.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/composer/ca-bundle.git",
|
||||
"reference": "9fdb22c2e97a614657716178093cd1da90a64aa8"
|
||||
"reference": "4c679186f2aca4ab6a0f1b0b9cf9252decb44d0b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/composer/ca-bundle/zipball/9fdb22c2e97a614657716178093cd1da90a64aa8",
|
||||
"reference": "9fdb22c2e97a614657716178093cd1da90a64aa8",
|
||||
"url": "https://api.github.com/repos/composer/ca-bundle/zipball/4c679186f2aca4ab6a0f1b0b9cf9252decb44d0b",
|
||||
"reference": "4c679186f2aca4ab6a0f1b0b9cf9252decb44d0b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -24,9 +24,9 @@
|
||||
"phpstan/phpstan": "^0.12.55",
|
||||
"psr/log": "^1.0",
|
||||
"symfony/phpunit-bridge": "^4.2 || ^5",
|
||||
"symfony/process": "^2.5 || ^3.0 || ^4.0 || ^5.0"
|
||||
"symfony/process": "^2.5 || ^3.0 || ^4.0 || ^5.0 || ^6.0"
|
||||
},
|
||||
"time": "2021-06-07T13:58:28+00:00",
|
||||
"time": "2021-10-28T20:44:15+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
@ -61,7 +61,7 @@
|
||||
"support": {
|
||||
"irc": "irc://irc.freenode.org/composer",
|
||||
"issues": "https://github.com/composer/ca-bundle/issues",
|
||||
"source": "https://github.com/composer/ca-bundle/tree/1.2.10"
|
||||
"source": "https://github.com/composer/ca-bundle/tree/1.3.1"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -155,17 +155,17 @@
|
||||
},
|
||||
{
|
||||
"name": "geoip2/geoip2",
|
||||
"version": "v2.11.0",
|
||||
"version_normalized": "2.11.0.0",
|
||||
"version": "v2.12.2",
|
||||
"version_normalized": "2.12.2.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/maxmind/GeoIP2-php.git",
|
||||
"reference": "d01be5894a5c1a3381c58c9b1795cd07f96c30f7"
|
||||
"reference": "83adb44ac4b9553d36b579a14673ed124583082f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/maxmind/GeoIP2-php/zipball/d01be5894a5c1a3381c58c9b1795cd07f96c30f7",
|
||||
"reference": "d01be5894a5c1a3381c58c9b1795cd07f96c30f7",
|
||||
"url": "https://api.github.com/repos/maxmind/GeoIP2-php/zipball/83adb44ac4b9553d36b579a14673ed124583082f",
|
||||
"reference": "83adb44ac4b9553d36b579a14673ed124583082f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -175,11 +175,12 @@
|
||||
"php": ">=7.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"friendsofphp/php-cs-fixer": "2.*",
|
||||
"friendsofphp/php-cs-fixer": "3.*",
|
||||
"phpstan/phpstan": "*",
|
||||
"phpunit/phpunit": "^8.0 || ^9.0",
|
||||
"squizlabs/php_codesniffer": "3.*"
|
||||
},
|
||||
"time": "2020-10-01T18:48:34+00:00",
|
||||
"time": "2021-11-30T18:15:25+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
@ -207,6 +208,10 @@
|
||||
"geolocation",
|
||||
"maxmind"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/maxmind/GeoIP2-php/issues",
|
||||
"source": "https://github.com/maxmind/GeoIP2-php/tree/v2.12.2"
|
||||
},
|
||||
"install-path": "../geoip2/geoip2"
|
||||
},
|
||||
{
|
||||
@ -281,17 +286,17 @@
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/promises",
|
||||
"version": "1.4.1",
|
||||
"version_normalized": "1.4.1.0",
|
||||
"version": "1.5.1",
|
||||
"version_normalized": "1.5.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/promises.git",
|
||||
"reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d"
|
||||
"reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/promises/zipball/8e7d04f1f6450fef59366c399cfad4b9383aa30d",
|
||||
"reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d",
|
||||
"url": "https://api.github.com/repos/guzzle/promises/zipball/fe752aedc9fd8fcca3fe7ad05d419d32998a06da",
|
||||
"reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -300,11 +305,11 @@
|
||||
"require-dev": {
|
||||
"symfony/phpunit-bridge": "^4.4 || ^5.1"
|
||||
},
|
||||
"time": "2021-03-07T09:25:29+00:00",
|
||||
"time": "2021-10-22T20:56:57+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.4-dev"
|
||||
"dev-master": "1.5-dev"
|
||||
}
|
||||
},
|
||||
"installation-source": "dist",
|
||||
@ -321,31 +326,64 @@
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Graham Campbell",
|
||||
"email": "hello@gjcampbell.co.uk",
|
||||
"homepage": "https://github.com/GrahamCampbell"
|
||||
},
|
||||
{
|
||||
"name": "Michael Dowling",
|
||||
"email": "mtdowling@gmail.com",
|
||||
"homepage": "https://github.com/mtdowling"
|
||||
},
|
||||
{
|
||||
"name": "Tobias Nyholm",
|
||||
"email": "tobias.nyholm@gmail.com",
|
||||
"homepage": "https://github.com/Nyholm"
|
||||
},
|
||||
{
|
||||
"name": "Tobias Schultze",
|
||||
"email": "webmaster@tubo-world.de",
|
||||
"homepage": "https://github.com/Tobion"
|
||||
}
|
||||
],
|
||||
"description": "Guzzle promises library",
|
||||
"keywords": [
|
||||
"promise"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/guzzle/promises/issues",
|
||||
"source": "https://github.com/guzzle/promises/tree/1.5.1"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/GrahamCampbell",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/Nyholm",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"install-path": "../guzzlehttp/promises"
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/psr7",
|
||||
"version": "1.8.2",
|
||||
"version_normalized": "1.8.2.0",
|
||||
"version": "1.8.3",
|
||||
"version_normalized": "1.8.3.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/psr7.git",
|
||||
"reference": "dc960a912984efb74d0a90222870c72c87f10c91"
|
||||
"reference": "1afdd860a2566ed3c2b0b4a3de6e23434a79ec85"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/psr7/zipball/dc960a912984efb74d0a90222870c72c87f10c91",
|
||||
"reference": "dc960a912984efb74d0a90222870c72c87f10c91",
|
||||
"url": "https://api.github.com/repos/guzzle/psr7/zipball/1afdd860a2566ed3c2b0b4a3de6e23434a79ec85",
|
||||
"reference": "1afdd860a2566ed3c2b0b4a3de6e23434a79ec85",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -363,7 +401,7 @@
|
||||
"suggest": {
|
||||
"laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
|
||||
},
|
||||
"time": "2021-04-26T09:17:50+00:00",
|
||||
"time": "2021-10-05T13:56:00+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
@ -384,13 +422,34 @@
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Graham Campbell",
|
||||
"email": "hello@gjcampbell.co.uk",
|
||||
"homepage": "https://github.com/GrahamCampbell"
|
||||
},
|
||||
{
|
||||
"name": "Michael Dowling",
|
||||
"email": "mtdowling@gmail.com",
|
||||
"homepage": "https://github.com/mtdowling"
|
||||
},
|
||||
{
|
||||
"name": "George Mponos",
|
||||
"email": "gmponos@gmail.com",
|
||||
"homepage": "https://github.com/gmponos"
|
||||
},
|
||||
{
|
||||
"name": "Tobias Nyholm",
|
||||
"email": "tobias.nyholm@gmail.com",
|
||||
"homepage": "https://github.com/Nyholm"
|
||||
},
|
||||
{
|
||||
"name": "Márk Sági-Kazár",
|
||||
"email": "mark.sagikazar@gmail.com",
|
||||
"homepage": "https://github.com/sagikazarmark"
|
||||
},
|
||||
{
|
||||
"name": "Tobias Schultze",
|
||||
"email": "webmaster@tubo-world.de",
|
||||
"homepage": "https://github.com/Tobion"
|
||||
}
|
||||
],
|
||||
@ -405,21 +464,39 @@
|
||||
"uri",
|
||||
"url"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/guzzle/psr7/issues",
|
||||
"source": "https://github.com/guzzle/psr7/tree/1.8.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/GrahamCampbell",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/Nyholm",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"install-path": "../guzzlehttp/psr7"
|
||||
},
|
||||
{
|
||||
"name": "maxmind-db/reader",
|
||||
"version": "v1.10.1",
|
||||
"version_normalized": "1.10.1.0",
|
||||
"version": "v1.11.0",
|
||||
"version_normalized": "1.11.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/maxmind/MaxMind-DB-Reader-php.git",
|
||||
"reference": "569bd44d97d30a4ec12c7793a33004a76d4caf18"
|
||||
"reference": "b1f3c0699525336d09cc5161a2861268d9f2ae5b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/maxmind/MaxMind-DB-Reader-php/zipball/569bd44d97d30a4ec12c7793a33004a76d4caf18",
|
||||
"reference": "569bd44d97d30a4ec12c7793a33004a76d4caf18",
|
||||
"url": "https://api.github.com/repos/maxmind/MaxMind-DB-Reader-php/zipball/b1f3c0699525336d09cc5161a2861268d9f2ae5b",
|
||||
"reference": "b1f3c0699525336d09cc5161a2861268d9f2ae5b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -429,7 +506,7 @@
|
||||
"ext-maxminddb": "<1.10.1,>=2.0.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"friendsofphp/php-cs-fixer": "*",
|
||||
"friendsofphp/php-cs-fixer": "3.*",
|
||||
"php-coveralls/php-coveralls": "^2.1",
|
||||
"phpstan/phpstan": "*",
|
||||
"phpunit/phpcov": ">=6.0.0",
|
||||
@ -441,7 +518,7 @@
|
||||
"ext-gmp": "bcmath or gmp is required for decoding larger integers with the pure PHP decoder",
|
||||
"ext-maxminddb": "A C-based database decoder that provides significantly faster lookups"
|
||||
},
|
||||
"time": "2021-04-14T17:49:35+00:00",
|
||||
"time": "2021-10-18T15:23:10+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
@ -469,6 +546,10 @@
|
||||
"geolocation",
|
||||
"maxmind"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/maxmind/MaxMind-DB-Reader-php/issues",
|
||||
"source": "https://github.com/maxmind/MaxMind-DB-Reader-php/tree/v1.11.0"
|
||||
},
|
||||
"install-path": "../maxmind-db/reader"
|
||||
},
|
||||
{
|
||||
@ -718,26 +799,26 @@
|
||||
},
|
||||
{
|
||||
"name": "paypal/paypal-checkout-sdk",
|
||||
"version": "1.0.1",
|
||||
"version_normalized": "1.0.1.0",
|
||||
"version": "1.0.2",
|
||||
"version_normalized": "1.0.2.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/paypal/Checkout-PHP-SDK.git",
|
||||
"reference": "ed6a55075448308b87a8b59dcb7fedf04a048cb1"
|
||||
"reference": "19992ce7051ff9e47e643f28abb8cc1b3e5f1812"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/paypal/Checkout-PHP-SDK/zipball/ed6a55075448308b87a8b59dcb7fedf04a048cb1",
|
||||
"reference": "ed6a55075448308b87a8b59dcb7fedf04a048cb1",
|
||||
"url": "https://api.github.com/repos/paypal/Checkout-PHP-SDK/zipball/19992ce7051ff9e47e643f28abb8cc1b3e5f1812",
|
||||
"reference": "19992ce7051ff9e47e643f28abb8cc1b3e5f1812",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"paypal/paypalhttp": "1.0.0"
|
||||
"paypal/paypalhttp": "1.0.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^5.7"
|
||||
},
|
||||
"time": "2019-11-07T23:16:44+00:00",
|
||||
"time": "2021-09-21T20:57:38+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
@ -766,21 +847,24 @@
|
||||
"rest",
|
||||
"sdk"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/paypal/Checkout-PHP-SDK/tree/1.0.2"
|
||||
},
|
||||
"install-path": "../paypal/paypal-checkout-sdk"
|
||||
},
|
||||
{
|
||||
"name": "paypal/paypalhttp",
|
||||
"version": "1.0.0",
|
||||
"version_normalized": "1.0.0.0",
|
||||
"version": "1.0.1",
|
||||
"version_normalized": "1.0.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/paypal/paypalhttp_php.git",
|
||||
"reference": "1ad9b846a046f09d6135cbf2cbaa7701bbc630a3"
|
||||
"reference": "7b09c89c80828e842c79230e7f156b61fbb68d25"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/paypal/paypalhttp_php/zipball/1ad9b846a046f09d6135cbf2cbaa7701bbc630a3",
|
||||
"reference": "1ad9b846a046f09d6135cbf2cbaa7701bbc630a3",
|
||||
"url": "https://api.github.com/repos/paypal/paypalhttp_php/zipball/7b09c89c80828e842c79230e7f156b61fbb68d25",
|
||||
"reference": "7b09c89c80828e842c79230e7f156b61fbb68d25",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -790,7 +874,7 @@
|
||||
"phpunit/phpunit": "^5.7",
|
||||
"wiremock-php/wiremock-php": "1.43.2"
|
||||
},
|
||||
"time": "2019-11-06T21:27:12+00:00",
|
||||
"time": "2021-09-14T21:35:26+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
@ -808,21 +892,25 @@
|
||||
"homepage": "https://github.com/paypal/paypalhttp_php/contributors"
|
||||
}
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/paypal/paypalhttp_php/issues",
|
||||
"source": "https://github.com/paypal/paypalhttp_php/tree/1.0.1"
|
||||
},
|
||||
"install-path": "../paypal/paypalhttp"
|
||||
},
|
||||
{
|
||||
"name": "phpmailer/phpmailer",
|
||||
"version": "v6.5.1",
|
||||
"version_normalized": "6.5.1.0",
|
||||
"version": "v6.5.3",
|
||||
"version_normalized": "6.5.3.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/PHPMailer/PHPMailer.git",
|
||||
"reference": "dd803df5ad7492e1b40637f7ebd258fee5ca7355"
|
||||
"reference": "baeb7cde6b60b1286912690ab0693c7789a31e71"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/dd803df5ad7492e1b40637f7ebd258fee5ca7355",
|
||||
"reference": "dd803df5ad7492e1b40637f7ebd258fee5ca7355",
|
||||
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/baeb7cde6b60b1286912690ab0693c7789a31e71",
|
||||
"reference": "baeb7cde6b60b1286912690ab0693c7789a31e71",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -849,7 +937,7 @@
|
||||
"stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication",
|
||||
"symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)"
|
||||
},
|
||||
"time": "2021-08-18T09:14:16+00:00",
|
||||
"time": "2021-11-25T16:34:11+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
@ -881,7 +969,7 @@
|
||||
"description": "PHPMailer is a full-featured email creation and transfer class for PHP",
|
||||
"support": {
|
||||
"issues": "https://github.com/PHPMailer/PHPMailer/issues",
|
||||
"source": "https://github.com/PHPMailer/PHPMailer/tree/v6.5.1"
|
||||
"source": "https://github.com/PHPMailer/PHPMailer/tree/v6.5.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -1125,17 +1213,17 @@
|
||||
},
|
||||
{
|
||||
"name": "stripe/stripe-php",
|
||||
"version": "v7.94.0",
|
||||
"version_normalized": "7.94.0.0",
|
||||
"version": "v7.105.0",
|
||||
"version_normalized": "7.105.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/stripe/stripe-php.git",
|
||||
"reference": "03cd6b5c1c4fc9087ddd1dd046457bff274294d6"
|
||||
"reference": "3a926610ca772aa7519fb132c88a6e7472788d90"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/stripe/stripe-php/zipball/03cd6b5c1c4fc9087ddd1dd046457bff274294d6",
|
||||
"reference": "03cd6b5c1c4fc9087ddd1dd046457bff274294d6",
|
||||
"url": "https://api.github.com/repos/stripe/stripe-php/zipball/3a926610ca772aa7519fb132c88a6e7472788d90",
|
||||
"reference": "3a926610ca772aa7519fb132c88a6e7472788d90",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -1145,13 +1233,12 @@
|
||||
"php": ">=5.6.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"friendsofphp/php-cs-fixer": "2.17.1",
|
||||
"php-coveralls/php-coveralls": "^2.1",
|
||||
"phpunit/phpunit": "^5.7",
|
||||
"squizlabs/php_codesniffer": "^3.3",
|
||||
"symfony/process": "~3.4"
|
||||
"friendsofphp/php-cs-fixer": "3.2.1",
|
||||
"phpstan/phpstan": "^1.2",
|
||||
"phpunit/phpunit": "^5.7 || ^9.0",
|
||||
"squizlabs/php_codesniffer": "^3.3"
|
||||
},
|
||||
"time": "2021-08-19T14:15:27+00:00",
|
||||
"time": "2021-12-06T22:51:55+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
@ -1183,7 +1270,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/stripe/stripe-php/issues",
|
||||
"source": "https://github.com/stripe/stripe-php/tree/v7.94.0"
|
||||
"source": "https://github.com/stripe/stripe-php/tree/v7.105.0"
|
||||
},
|
||||
"install-path": "../stripe/stripe-php"
|
||||
},
|
||||
|
58
vendor/composer/installed.php
vendored
58
vendor/composer/installed.php
vendored
@ -5,7 +5,7 @@
|
||||
'type' => 'project',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
'reference' => '7dadd6ede285708f874a020c0152511e73fbf4b2',
|
||||
'reference' => '01747093b15bd2fd1afc5757a1466d4c4bf1dd3d',
|
||||
'name' => '1ka/1ka.si',
|
||||
'dev' => false,
|
||||
),
|
||||
@ -16,16 +16,16 @@
|
||||
'type' => 'project',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
'reference' => '7dadd6ede285708f874a020c0152511e73fbf4b2',
|
||||
'reference' => '01747093b15bd2fd1afc5757a1466d4c4bf1dd3d',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'composer/ca-bundle' => array(
|
||||
'pretty_version' => '1.2.10',
|
||||
'version' => '1.2.10.0',
|
||||
'pretty_version' => '1.3.1',
|
||||
'version' => '1.3.1.0',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/./ca-bundle',
|
||||
'aliases' => array(),
|
||||
'reference' => '9fdb22c2e97a614657716178093cd1da90a64aa8',
|
||||
'reference' => '4c679186f2aca4ab6a0f1b0b9cf9252decb44d0b',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'fgrosse/phpasn1' => array(
|
||||
@ -38,12 +38,12 @@
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'geoip2/geoip2' => array(
|
||||
'pretty_version' => 'v2.11.0',
|
||||
'version' => '2.11.0.0',
|
||||
'pretty_version' => 'v2.12.2',
|
||||
'version' => '2.12.2.0',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../geoip2/geoip2',
|
||||
'aliases' => array(),
|
||||
'reference' => 'd01be5894a5c1a3381c58c9b1795cd07f96c30f7',
|
||||
'reference' => '83adb44ac4b9553d36b579a14673ed124583082f',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'guzzlehttp/guzzle' => array(
|
||||
@ -56,30 +56,30 @@
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'guzzlehttp/promises' => array(
|
||||
'pretty_version' => '1.4.1',
|
||||
'version' => '1.4.1.0',
|
||||
'pretty_version' => '1.5.1',
|
||||
'version' => '1.5.1.0',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../guzzlehttp/promises',
|
||||
'aliases' => array(),
|
||||
'reference' => '8e7d04f1f6450fef59366c399cfad4b9383aa30d',
|
||||
'reference' => 'fe752aedc9fd8fcca3fe7ad05d419d32998a06da',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'guzzlehttp/psr7' => array(
|
||||
'pretty_version' => '1.8.2',
|
||||
'version' => '1.8.2.0',
|
||||
'pretty_version' => '1.8.3',
|
||||
'version' => '1.8.3.0',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../guzzlehttp/psr7',
|
||||
'aliases' => array(),
|
||||
'reference' => 'dc960a912984efb74d0a90222870c72c87f10c91',
|
||||
'reference' => '1afdd860a2566ed3c2b0b4a3de6e23434a79ec85',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'maxmind-db/reader' => array(
|
||||
'pretty_version' => 'v1.10.1',
|
||||
'version' => '1.10.1.0',
|
||||
'pretty_version' => 'v1.11.0',
|
||||
'version' => '1.11.0.0',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../maxmind-db/reader',
|
||||
'aliases' => array(),
|
||||
'reference' => '569bd44d97d30a4ec12c7793a33004a76d4caf18',
|
||||
'reference' => 'b1f3c0699525336d09cc5161a2861268d9f2ae5b',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'maxmind/web-service-common' => array(
|
||||
@ -119,30 +119,30 @@
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'paypal/paypal-checkout-sdk' => array(
|
||||
'pretty_version' => '1.0.1',
|
||||
'version' => '1.0.1.0',
|
||||
'pretty_version' => '1.0.2',
|
||||
'version' => '1.0.2.0',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../paypal/paypal-checkout-sdk',
|
||||
'aliases' => array(),
|
||||
'reference' => 'ed6a55075448308b87a8b59dcb7fedf04a048cb1',
|
||||
'reference' => '19992ce7051ff9e47e643f28abb8cc1b3e5f1812',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'paypal/paypalhttp' => array(
|
||||
'pretty_version' => '1.0.0',
|
||||
'version' => '1.0.0.0',
|
||||
'pretty_version' => '1.0.1',
|
||||
'version' => '1.0.1.0',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../paypal/paypalhttp',
|
||||
'aliases' => array(),
|
||||
'reference' => '1ad9b846a046f09d6135cbf2cbaa7701bbc630a3',
|
||||
'reference' => '7b09c89c80828e842c79230e7f156b61fbb68d25',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'phpmailer/phpmailer' => array(
|
||||
'pretty_version' => 'v6.5.1',
|
||||
'version' => '6.5.1.0',
|
||||
'pretty_version' => 'v6.5.3',
|
||||
'version' => '6.5.3.0',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../phpmailer/phpmailer',
|
||||
'aliases' => array(),
|
||||
'reference' => 'dd803df5ad7492e1b40637f7ebd258fee5ca7355',
|
||||
'reference' => 'baeb7cde6b60b1286912690ab0693c7789a31e71',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'psr/http-message' => array(
|
||||
@ -188,12 +188,12 @@
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'stripe/stripe-php' => array(
|
||||
'pretty_version' => 'v7.94.0',
|
||||
'version' => '7.94.0.0',
|
||||
'pretty_version' => 'v7.105.0',
|
||||
'version' => '7.105.0.0',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../stripe/stripe-php',
|
||||
'aliases' => array(),
|
||||
'reference' => '03cd6b5c1c4fc9087ddd1dd046457bff274294d6',
|
||||
'reference' => '3a926610ca772aa7519fb132c88a6e7472788d90',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'symfony/polyfill-intl-idn' => array(
|
||||
|
7
vendor/geoip2/geoip2/.github/dependabot.yml
vendored
Normal file
7
vendor/geoip2/geoip2/.github/dependabot.yml
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: composer
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
32
vendor/geoip2/geoip2/.github/workflows/lint.yml
vendored
Normal file
32
vendor/geoip2/geoip2/.github/workflows/lint.yml
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
name: PHP Lints
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
schedule:
|
||||
- cron: '55 3 * * SUN'
|
||||
|
||||
jobs:
|
||||
run:
|
||||
runs-on: ubuntu-latest
|
||||
name: "PHP Lints"
|
||||
steps:
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: 7.4
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install dependencies
|
||||
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
||||
|
||||
- name: Lint with php-cs-fixer
|
||||
run: vendor/bin/php-cs-fixer fix --verbose --diff --dry-run
|
||||
|
||||
- name: Lint with phpcs
|
||||
run: vendor/bin/phpcs --standard=PSR2 src/
|
||||
|
||||
- name: Lint with phpstan
|
||||
run: vendor/bin/phpstan analyze
|
36
vendor/geoip2/geoip2/.github/workflows/test.yml
vendored
Normal file
36
vendor/geoip2/geoip2/.github/workflows/test.yml
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
name: PHPUnit
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
schedule:
|
||||
- cron: '55 3 * * SUN'
|
||||
|
||||
jobs:
|
||||
run:
|
||||
runs-on: ${{ matrix.operating-system }}
|
||||
strategy:
|
||||
matrix:
|
||||
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
||||
php-versions: ['7.2', '7.3', '7.4', '8.0']
|
||||
name: "PHP ${{ matrix.php-versions }} test on ${{ matrix.operating-system }}"
|
||||
steps:
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
tools: composer
|
||||
|
||||
- name: Setup problem matchers for PHPUnit
|
||||
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Install dependencies
|
||||
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
||||
|
||||
- name: Test with phpunit
|
||||
run: vendor/bin/phpunit --coverage-text
|
45
vendor/geoip2/geoip2/.php-cs-fixer.php
vendored
Normal file
45
vendor/geoip2/geoip2/.php-cs-fixer.php
vendored
Normal file
@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
$config = new PhpCsFixer\Config();
|
||||
|
||||
return $config
|
||||
->setRiskyAllowed(true)
|
||||
->setRules([
|
||||
'@Symfony' => true,
|
||||
'@Symfony:risky' => true,
|
||||
'@PhpCsFixer' => true,
|
||||
'@PSR1' => true,
|
||||
'@PSR2' => true,
|
||||
'@PSR12' => true,
|
||||
'@PSR12:risky' => true,
|
||||
'array_syntax' => ['syntax' => 'short'],
|
||||
'combine_consecutive_unsets' => true,
|
||||
'concat_space' => [ 'spacing' => 'one'],
|
||||
'explicit_string_variable' => false,
|
||||
'fopen_flags' => ['b_mode' => true],
|
||||
'heredoc_to_nowdoc' => true,
|
||||
'increment_style' => false,
|
||||
'list_syntax' => ['syntax' => 'short'],
|
||||
'multiline_whitespace_before_semicolons' => false,
|
||||
'no_unreachable_default_argument_value' => true,
|
||||
'no_useless_else' => true,
|
||||
'no_useless_return' => true,
|
||||
'ordered_imports' => true,
|
||||
'php_unit_strict' => true,
|
||||
'php_unit_test_class_requires_covers' => true,
|
||||
'phpdoc_add_missing_param_annotation' => true,
|
||||
'phpdoc_no_alias_tag' => false,
|
||||
'phpdoc_order' => true,
|
||||
'phpdoc_types_order' => ['sort_algorithm' => 'alpha', 'null_adjustment' => 'always_last'],
|
||||
'semicolon_after_instruction' => true,
|
||||
'single_line_throw' => false,
|
||||
'strict_comparison' => true,
|
||||
'strict_param' => true,
|
||||
'yoda_style' => false,
|
||||
])
|
||||
->setFinder(
|
||||
PhpCsFixer\Finder::create()
|
||||
->exclude('ext')
|
||||
->in(__DIR__)
|
||||
)
|
||||
;
|
33
vendor/geoip2/geoip2/CHANGELOG.md
vendored
33
vendor/geoip2/geoip2/CHANGELOG.md
vendored
@ -1,6 +1,39 @@
|
||||
CHANGELOG
|
||||
=========
|
||||
|
||||
2.12.2 (2021-11-30)
|
||||
-------------------
|
||||
|
||||
* The `geoip2.phar` now works when included from another directory.
|
||||
Reported by Eduardo Ruiz. GitHub #179.
|
||||
|
||||
2.12.1 (2021-11-23)
|
||||
-------------------
|
||||
|
||||
* The `geoip2.phar` included in 2.12.0 would only work in CLI applications.
|
||||
This was due to a change in Box 3.x. The Phar should now work in all
|
||||
applications. This release only affects users of the Phar file.
|
||||
|
||||
2.12.0 (2021-11-18)
|
||||
-------------------
|
||||
|
||||
* Support for mobile country code (MCC) and mobile network codes (MNC) was
|
||||
added for the GeoIP2 ISP and Enterprise databases as well as the GeoIP2
|
||||
City and Insights web services. `$mobileCountryCode` and
|
||||
`$mobileNetworkCode` properties were added to `GeoIp2\Model\Isp`
|
||||
for the GeoIP2 ISP database and `GeoIp2\Record\Traits` for the Enterprise
|
||||
database and the GeoIP2 City and Insights web services. We expect this data
|
||||
to be available by late January, 2022.
|
||||
* `geoip2.phar` is now generated with Box 3.x.
|
||||
|
||||
2.11.0 (2020-10-01)
|
||||
-------------------
|
||||
|
||||
* IMPORTANT: PHP 7.2 or greater is now required.
|
||||
* Added the `isResidentialProxy` property to `GeoIp2\Model\AnonymousIP` and
|
||||
`GeoIp2\Record\Traits`.
|
||||
* Additional type hints have been added.
|
||||
|
||||
2.10.0 (2019-12-12)
|
||||
-------------------
|
||||
|
||||
|
51
vendor/geoip2/geoip2/README.md
vendored
51
vendor/geoip2/geoip2/README.md
vendored
@ -2,11 +2,9 @@
|
||||
|
||||
## Description ##
|
||||
|
||||
This package provides an API for the GeoIP2
|
||||
[web services](https://dev.maxmind.com/geoip/geoip2/web-services) and
|
||||
[databases](https://dev.maxmind.com/geoip/geoip2/downloadable). The API also
|
||||
works with the free
|
||||
[GeoLite2 databases](https://dev.maxmind.com/geoip/geoip2/geolite2/).
|
||||
This package provides an API for the GeoIP2 and GeoLite2
|
||||
[web services](https://dev.maxmind.com/geoip/docs/web-services?lang=en) and
|
||||
[databases](https://dev.maxmind.com/geoip/docs/databases?lang=en).
|
||||
|
||||
## Install via Composer ##
|
||||
|
||||
@ -26,7 +24,7 @@ You should now have the file `composer.phar` in your project directory.
|
||||
|
||||
Run in your project root:
|
||||
|
||||
```
|
||||
```sh
|
||||
php composer.phar require geoip2/geoip2:~2.0
|
||||
```
|
||||
|
||||
@ -265,13 +263,33 @@ print($record->network . "\n"); // '128.101.101.101/32'
|
||||
### Usage ###
|
||||
|
||||
To use this API, you must create a new `\GeoIp2\WebService\Client`
|
||||
object with your `$accountId` and `$licenseKey`, then you call the method
|
||||
corresponding to a specific end point, passing it the IP address you want to
|
||||
look up.
|
||||
object with your `$accountId` and `$licenseKey`:
|
||||
|
||||
If the request succeeds, the method call will return a model class for the end
|
||||
point you called. This model in turn contains multiple record classes, each of
|
||||
which represents part of the data returned by the web service.
|
||||
```php
|
||||
$client = new Client(42, 'abcdef123456');
|
||||
```
|
||||
|
||||
You may also call the constructor with additional arguments. The third argument
|
||||
specifies the language preferences when using the `->name` method on the model
|
||||
classes that this client creates. The fourth argument is additional options
|
||||
such as `host` and `timeout`.
|
||||
|
||||
For instance, to call the GeoLite2 web service instead of GeoIP2 Precision:
|
||||
|
||||
```php
|
||||
$client = new Client(42, 'abcdef123456', ['en'], ['host' => 'geolite.info']);
|
||||
```
|
||||
|
||||
After creating the client, you may now call the method corresponding to a
|
||||
specific endpoint with the IP address to look up, e.g.:
|
||||
|
||||
```php
|
||||
$record = $client->city('128.101.101.101');
|
||||
```
|
||||
|
||||
If the request succeeds, the method call will return a model class for the
|
||||
endpoint you called. This model in turn contains multiple record classes, each
|
||||
of which represents part of the data returned by the web service.
|
||||
|
||||
If there is an error, a structured exception is thrown.
|
||||
|
||||
@ -286,7 +304,8 @@ use GeoIp2\WebService\Client;
|
||||
|
||||
// This creates a Client object that can be reused across requests.
|
||||
// Replace "42" with your account ID and "license_key" with your license
|
||||
// key.
|
||||
// key. Set the "host" to "geolite.info" in the fourth argument options
|
||||
// array to use the GeoLite2 web service instead of GeoIP2 Precision.
|
||||
$client = new Client(42, 'abcdef123456');
|
||||
|
||||
// Replace "city" with the method corresponding to the web service that
|
||||
@ -336,7 +355,7 @@ Because of these factors, it is possible for any end point to return a record
|
||||
where some or all of the attributes are unpopulated.
|
||||
|
||||
See the
|
||||
[GeoIP2 Precision web service docs](https://dev.maxmind.com/geoip/geoip2/web-services)
|
||||
[GeoIP2 Precision web service docs](https://dev.maxmind.com/geoip/docs/web-services?lang=en)
|
||||
for details on what data each end point may return.
|
||||
|
||||
The only piece of data which is always returned is the `ipAddress`
|
||||
@ -386,7 +405,7 @@ to the client API, please see
|
||||
|
||||
## Requirements ##
|
||||
|
||||
This library requires PHP 5.6 or greater.
|
||||
This library requires PHP 7.2 or greater.
|
||||
|
||||
This library also relies on the [MaxMind DB Reader](https://github.com/maxmind/MaxMind-DB-Reader-php).
|
||||
|
||||
@ -404,6 +423,6 @@ The GeoIP2 PHP API uses [Semantic Versioning](https://semver.org/).
|
||||
|
||||
## Copyright and License ##
|
||||
|
||||
This software is Copyright (c) 2013-2019 by MaxMind, Inc.
|
||||
This software is Copyright (c) 2013-2020 by MaxMind, Inc.
|
||||
|
||||
This is free software, licensed under the Apache License, Version 2.0.
|
||||
|
13
vendor/geoip2/geoip2/composer.json
vendored
13
vendor/geoip2/geoip2/composer.json
vendored
@ -13,15 +13,16 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"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",
|
||||
"ext-json": "*"
|
||||
},
|
||||
"require-dev": {
|
||||
"friendsofphp/php-cs-fixer": "2.*",
|
||||
"phpunit/phpunit": "5.*",
|
||||
"squizlabs/php_codesniffer": "3.*"
|
||||
"friendsofphp/php-cs-fixer": "3.*",
|
||||
"phpunit/phpunit": "^8.0 || ^9.0",
|
||||
"squizlabs/php_codesniffer": "3.*",
|
||||
"phpstan/phpstan": "*"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
|
3
vendor/geoip2/geoip2/examples/benchmark.php
vendored
3
vendor/geoip2/geoip2/examples/benchmark.php
vendored
@ -10,7 +10,8 @@ $reader = new Reader('GeoIP2-City.mmdb');
|
||||
$count = 500000;
|
||||
$startTime = microtime(true);
|
||||
for ($i = 0; $i < $count; ++$i) {
|
||||
$ip = long2ip(rand(0, pow(2, 32) - 1));
|
||||
$ip = long2ip(rand(0, 2 ** 32 - 1));
|
||||
|
||||
try {
|
||||
$t = $reader->city($ip);
|
||||
} catch (\GeoIp2\Exception\AddressNotFoundException $e) {
|
||||
|
7
vendor/geoip2/geoip2/phpstan.neon
vendored
Normal file
7
vendor/geoip2/geoip2/phpstan.neon
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
parameters:
|
||||
level: 6
|
||||
paths:
|
||||
- src
|
||||
- tests
|
||||
checkMissingIterableValueType: false
|
||||
|
73
vendor/geoip2/geoip2/src/Database/Reader.php
vendored
73
vendor/geoip2/geoip2/src/Database/Reader.php
vendored
@ -1,8 +1,11 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace GeoIp2\Database;
|
||||
|
||||
use GeoIp2\Exception\AddressNotFoundException;
|
||||
use GeoIp2\Model\AbstractModel;
|
||||
use GeoIp2\ProviderInterface;
|
||||
use MaxMind\Db\Reader as DbReader;
|
||||
use MaxMind\Db\Reader\InvalidDatabaseException;
|
||||
@ -33,8 +36,17 @@ use MaxMind\Db\Reader\InvalidDatabaseException;
|
||||
*/
|
||||
class Reader implements ProviderInterface
|
||||
{
|
||||
/**
|
||||
* @var DbReader
|
||||
*/
|
||||
private $dbReader;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $dbType;
|
||||
/**
|
||||
* @var array<string>
|
||||
*/
|
||||
private $locales;
|
||||
|
||||
/**
|
||||
@ -48,8 +60,8 @@ class Reader implements ProviderInterface
|
||||
* is corrupt or invalid
|
||||
*/
|
||||
public function __construct(
|
||||
$filename,
|
||||
$locales = ['en']
|
||||
string $filename,
|
||||
array $locales = ['en']
|
||||
) {
|
||||
$this->dbReader = new DbReader($filename);
|
||||
$this->dbType = $this->dbReader->metadata()->databaseType;
|
||||
@ -65,11 +77,10 @@ class Reader implements ProviderInterface
|
||||
* not in the database
|
||||
* @throws \MaxMind\Db\Reader\InvalidDatabaseException if the database
|
||||
* is corrupt or invalid
|
||||
*
|
||||
* @return \GeoIp2\Model\City
|
||||
*/
|
||||
public function city($ipAddress)
|
||||
public function city(string $ipAddress): \GeoIp2\Model\City
|
||||
{
|
||||
// @phpstan-ignore-next-line
|
||||
return $this->modelFor('City', 'City', $ipAddress);
|
||||
}
|
||||
|
||||
@ -82,11 +93,10 @@ class Reader implements ProviderInterface
|
||||
* not in the database
|
||||
* @throws \MaxMind\Db\Reader\InvalidDatabaseException if the database
|
||||
* is corrupt or invalid
|
||||
*
|
||||
* @return \GeoIp2\Model\Country
|
||||
*/
|
||||
public function country($ipAddress)
|
||||
public function country(string $ipAddress): \GeoIp2\Model\Country
|
||||
{
|
||||
// @phpstan-ignore-next-line
|
||||
return $this->modelFor('Country', 'Country', $ipAddress);
|
||||
}
|
||||
|
||||
@ -99,11 +109,10 @@ class Reader implements ProviderInterface
|
||||
* not in the database
|
||||
* @throws \MaxMind\Db\Reader\InvalidDatabaseException if the database
|
||||
* is corrupt or invalid
|
||||
*
|
||||
* @return \GeoIp2\Model\AnonymousIp
|
||||
*/
|
||||
public function anonymousIp($ipAddress)
|
||||
public function anonymousIp(string $ipAddress): \GeoIp2\Model\AnonymousIp
|
||||
{
|
||||
// @phpstan-ignore-next-line
|
||||
return $this->flatModelFor(
|
||||
'AnonymousIp',
|
||||
'GeoIP2-Anonymous-IP',
|
||||
@ -120,11 +129,10 @@ class Reader implements ProviderInterface
|
||||
* not in the database
|
||||
* @throws \MaxMind\Db\Reader\InvalidDatabaseException if the database
|
||||
* is corrupt or invalid
|
||||
*
|
||||
* @return \GeoIp2\Model\Asn
|
||||
*/
|
||||
public function asn($ipAddress)
|
||||
public function asn(string $ipAddress): \GeoIp2\Model\Asn
|
||||
{
|
||||
// @phpstan-ignore-next-line
|
||||
return $this->flatModelFor(
|
||||
'Asn',
|
||||
'GeoLite2-ASN',
|
||||
@ -141,11 +149,10 @@ class Reader implements ProviderInterface
|
||||
* not in the database
|
||||
* @throws \MaxMind\Db\Reader\InvalidDatabaseException if the database
|
||||
* is corrupt or invalid
|
||||
*
|
||||
* @return \GeoIp2\Model\ConnectionType
|
||||
*/
|
||||
public function connectionType($ipAddress)
|
||||
public function connectionType(string $ipAddress): \GeoIp2\Model\ConnectionType
|
||||
{
|
||||
// @phpstan-ignore-next-line
|
||||
return $this->flatModelFor(
|
||||
'ConnectionType',
|
||||
'GeoIP2-Connection-Type',
|
||||
@ -162,11 +169,10 @@ class Reader implements ProviderInterface
|
||||
* not in the database
|
||||
* @throws \MaxMind\Db\Reader\InvalidDatabaseException if the database
|
||||
* is corrupt or invalid
|
||||
*
|
||||
* @return \GeoIp2\Model\Domain
|
||||
*/
|
||||
public function domain($ipAddress)
|
||||
public function domain(string $ipAddress): \GeoIp2\Model\Domain
|
||||
{
|
||||
// @phpstan-ignore-next-line
|
||||
return $this->flatModelFor(
|
||||
'Domain',
|
||||
'GeoIP2-Domain',
|
||||
@ -183,11 +189,10 @@ class Reader implements ProviderInterface
|
||||
* not in the database
|
||||
* @throws \MaxMind\Db\Reader\InvalidDatabaseException if the database
|
||||
* is corrupt or invalid
|
||||
*
|
||||
* @return \GeoIp2\Model\Enterprise
|
||||
*/
|
||||
public function enterprise($ipAddress)
|
||||
public function enterprise(string $ipAddress): \GeoIp2\Model\Enterprise
|
||||
{
|
||||
// @phpstan-ignore-next-line
|
||||
return $this->modelFor('Enterprise', 'Enterprise', $ipAddress);
|
||||
}
|
||||
|
||||
@ -200,11 +205,10 @@ class Reader implements ProviderInterface
|
||||
* not in the database
|
||||
* @throws \MaxMind\Db\Reader\InvalidDatabaseException if the database
|
||||
* is corrupt or invalid
|
||||
*
|
||||
* @return \GeoIp2\Model\Isp
|
||||
*/
|
||||
public function isp($ipAddress)
|
||||
public function isp(string $ipAddress): \GeoIp2\Model\Isp
|
||||
{
|
||||
// @phpstan-ignore-next-line
|
||||
return $this->flatModelFor(
|
||||
'Isp',
|
||||
'GeoIP2-ISP',
|
||||
@ -212,9 +216,9 @@ class Reader implements ProviderInterface
|
||||
);
|
||||
}
|
||||
|
||||
private function modelFor($class, $type, $ipAddress)
|
||||
private function modelFor(string $class, string $type, string $ipAddress): AbstractModel
|
||||
{
|
||||
list($record, $prefixLen) = $this->getRecord($class, $type, $ipAddress);
|
||||
[$record, $prefixLen] = $this->getRecord($class, $type, $ipAddress);
|
||||
|
||||
$record['traits']['ip_address'] = $ipAddress;
|
||||
$record['traits']['prefix_len'] = $prefixLen;
|
||||
@ -224,9 +228,9 @@ class Reader implements ProviderInterface
|
||||
return new $class($record, $this->locales);
|
||||
}
|
||||
|
||||
private function flatModelFor($class, $type, $ipAddress)
|
||||
private function flatModelFor(string $class, string $type, string $ipAddress): AbstractModel
|
||||
{
|
||||
list($record, $prefixLen) = $this->getRecord($class, $type, $ipAddress);
|
||||
[$record, $prefixLen] = $this->getRecord($class, $type, $ipAddress);
|
||||
|
||||
$record['ip_address'] = $ipAddress;
|
||||
$record['prefix_len'] = $prefixLen;
|
||||
@ -235,15 +239,16 @@ class Reader implements ProviderInterface
|
||||
return new $class($record);
|
||||
}
|
||||
|
||||
private function getRecord($class, $type, $ipAddress)
|
||||
private function getRecord(string $class, string $type, string $ipAddress): array
|
||||
{
|
||||
if (strpos($this->dbType, $type) === false) {
|
||||
$method = lcfirst($class);
|
||||
|
||||
throw new \BadMethodCallException(
|
||||
"The $method method cannot be used to open a {$this->dbType} database"
|
||||
);
|
||||
}
|
||||
list($record, $prefixLen) = $this->dbReader->getWithPrefixLen($ipAddress);
|
||||
[$record, $prefixLen] = $this->dbReader->getWithPrefixLen($ipAddress);
|
||||
if ($record === null) {
|
||||
throw new AddressNotFoundException(
|
||||
"The address $ipAddress is not in the database."
|
||||
@ -272,7 +277,7 @@ class Reader implements ProviderInterface
|
||||
*
|
||||
* @return \MaxMind\Db\Reader\Metadata object for the database
|
||||
*/
|
||||
public function metadata()
|
||||
public function metadata(): DbReader\Metadata
|
||||
{
|
||||
return $this->dbReader->metadata();
|
||||
}
|
||||
@ -280,7 +285,7 @@ class Reader implements ProviderInterface
|
||||
/**
|
||||
* Closes the GeoIP2 database and returns the resources to the system.
|
||||
*/
|
||||
public function close()
|
||||
public function close(): void
|
||||
{
|
||||
$this->dbReader->close();
|
||||
}
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace GeoIp2\Exception;
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace GeoIp2\Exception;
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace GeoIp2\Exception;
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace GeoIp2\Exception;
|
||||
|
||||
/**
|
||||
@ -9,13 +11,15 @@ class HttpException extends GeoIp2Exception
|
||||
{
|
||||
/**
|
||||
* The URI queried.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $uri;
|
||||
|
||||
public function __construct(
|
||||
$message,
|
||||
$httpStatus,
|
||||
$uri,
|
||||
string $message,
|
||||
int $httpStatus,
|
||||
string $uri,
|
||||
\Exception $previous = null
|
||||
) {
|
||||
$this->uri = $uri;
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace GeoIp2\Exception;
|
||||
|
||||
/**
|
||||
@ -10,14 +12,16 @@ class InvalidRequestException extends HttpException
|
||||
{
|
||||
/**
|
||||
* The code returned by the MaxMind web service.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $error;
|
||||
|
||||
public function __construct(
|
||||
$message,
|
||||
$error,
|
||||
$httpStatus,
|
||||
$uri,
|
||||
string $message,
|
||||
string $error,
|
||||
int $httpStatus,
|
||||
string $uri,
|
||||
\Exception $previous = null
|
||||
) {
|
||||
$this->error = $error;
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace GeoIp2\Exception;
|
||||
|
||||
/**
|
||||
|
27
vendor/geoip2/geoip2/src/Model/AbstractModel.php
vendored
27
vendor/geoip2/geoip2/src/Model/AbstractModel.php
vendored
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace GeoIp2\Model;
|
||||
|
||||
/**
|
||||
@ -7,14 +9,15 @@ namespace GeoIp2\Model;
|
||||
*/
|
||||
abstract class AbstractModel implements \JsonSerializable
|
||||
{
|
||||
/**
|
||||
* @var array<string, mixed>
|
||||
*/
|
||||
protected $raw;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*
|
||||
* @param mixed $raw
|
||||
*/
|
||||
public function __construct($raw)
|
||||
public function __construct(array $raw)
|
||||
{
|
||||
$this->raw = $raw;
|
||||
}
|
||||
@ -22,9 +25,9 @@ abstract class AbstractModel implements \JsonSerializable
|
||||
/**
|
||||
* @ignore
|
||||
*
|
||||
* @param mixed $field
|
||||
* @return mixed
|
||||
*/
|
||||
protected function get($field)
|
||||
protected function get(string $field)
|
||||
{
|
||||
if (isset($this->raw[$field])) {
|
||||
return $this->raw[$field];
|
||||
@ -39,12 +42,12 @@ abstract class AbstractModel implements \JsonSerializable
|
||||
/**
|
||||
* @ignore
|
||||
*
|
||||
* @param mixed $attr
|
||||
* @return mixed
|
||||
*/
|
||||
public function __get($attr)
|
||||
public function __get(string $attr)
|
||||
{
|
||||
if ($attr !== 'instance' && property_exists($this, $attr)) {
|
||||
return $this->$attr;
|
||||
return $this->{$attr};
|
||||
}
|
||||
|
||||
throw new \RuntimeException("Unknown attribute: $attr");
|
||||
@ -52,15 +55,13 @@ abstract class AbstractModel implements \JsonSerializable
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*
|
||||
* @param mixed $attr
|
||||
*/
|
||||
public function __isset($attr)
|
||||
public function __isset(string $attr): bool
|
||||
{
|
||||
return $attr !== 'instance' && isset($this->$attr);
|
||||
return $attr !== 'instance' && isset($this->{$attr});
|
||||
}
|
||||
|
||||
public function jsonSerialize()
|
||||
public function jsonSerialize(): array
|
||||
{
|
||||
return $this->raw;
|
||||
}
|
||||
|
34
vendor/geoip2/geoip2/src/Model/AnonymousIp.php
vendored
34
vendor/geoip2/geoip2/src/Model/AnonymousIp.php
vendored
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace GeoIp2\Model;
|
||||
|
||||
use GeoIp2\Util;
|
||||
@ -17,6 +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.
|
||||
* @property-read bool $isResidentialProxy This is true if the IP address is
|
||||
* on a suspected anonymizing network and belongs to a residential ISP.
|
||||
* @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
|
||||
@ -27,20 +31,43 @@ use GeoIp2\Util;
|
||||
*/
|
||||
class AnonymousIp extends AbstractModel
|
||||
{
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
protected $isAnonymous;
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
protected $isAnonymousVpn;
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
protected $isHostingProvider;
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
protected $isPublicProxy;
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
protected $isResidentialProxy;
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
protected $isTorExitNode;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $ipAddress;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $network;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*
|
||||
* @param mixed $raw
|
||||
*/
|
||||
public function __construct($raw)
|
||||
public function __construct(array $raw)
|
||||
{
|
||||
parent::__construct($raw);
|
||||
|
||||
@ -48,6 +75,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');
|
||||
$this->isResidentialProxy = $this->get('is_residential_proxy');
|
||||
$this->isTorExitNode = $this->get('is_tor_exit_node');
|
||||
$ipAddress = $this->get('ip_address');
|
||||
$this->ipAddress = $ipAddress;
|
||||
|
18
vendor/geoip2/geoip2/src/Model/Asn.php
vendored
18
vendor/geoip2/geoip2/src/Model/Asn.php
vendored
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace GeoIp2\Model;
|
||||
|
||||
use GeoIp2\Util;
|
||||
@ -20,17 +22,27 @@ use GeoIp2\Util;
|
||||
*/
|
||||
class Asn extends AbstractModel
|
||||
{
|
||||
/**
|
||||
* @var int|null
|
||||
*/
|
||||
protected $autonomousSystemNumber;
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
protected $autonomousSystemOrganization;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $ipAddress;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $network;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*
|
||||
* @param mixed $raw
|
||||
*/
|
||||
public function __construct($raw)
|
||||
public function __construct(array $raw)
|
||||
{
|
||||
parent::__construct($raw);
|
||||
$this->autonomousSystemNumber = $this->get('autonomous_system_number');
|
||||
|
36
vendor/geoip2/geoip2/src/Model/City.php
vendored
36
vendor/geoip2/geoip2/src/Model/City.php
vendored
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace GeoIp2\Model;
|
||||
|
||||
/**
|
||||
@ -7,7 +9,7 @@ namespace GeoIp2\Model;
|
||||
*
|
||||
* The only difference between the City and Insights model classes is which
|
||||
* fields in each record may be populated. See
|
||||
* https://dev.maxmind.com/geoip/geoip2/web-services for more details.
|
||||
* https://dev.maxmind.com/geoip/docs/web-services?lang=en for more details.
|
||||
*
|
||||
* @property-read \GeoIp2\Record\City $city City data for the requested IP
|
||||
* address.
|
||||
@ -31,28 +33,33 @@ class City extends Country
|
||||
{
|
||||
/**
|
||||
* @ignore
|
||||
*
|
||||
* @var \GeoIp2\Record\City
|
||||
*/
|
||||
protected $city;
|
||||
/**
|
||||
* @ignore
|
||||
*
|
||||
* @var \GeoIp2\Record\Location
|
||||
*/
|
||||
protected $location;
|
||||
/**
|
||||
* @ignore
|
||||
*
|
||||
* @var \GeoIp2\Record\Postal
|
||||
*/
|
||||
protected $postal;
|
||||
/**
|
||||
* @ignore
|
||||
*
|
||||
* @var array<\GeoIp2\Record\Subdivision>
|
||||
*/
|
||||
protected $subdivisions = [];
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*
|
||||
* @param mixed $raw
|
||||
* @param mixed $locales
|
||||
*/
|
||||
public function __construct($raw, $locales = ['en'])
|
||||
public function __construct(array $raw, array $locales = ['en'])
|
||||
{
|
||||
parent::__construct($raw, $locales);
|
||||
|
||||
@ -63,29 +70,28 @@ class City extends Country
|
||||
$this->createSubdivisions($raw, $locales);
|
||||
}
|
||||
|
||||
private function createSubdivisions($raw, $locales)
|
||||
private function createSubdivisions(array $raw, array $locales): void
|
||||
{
|
||||
if (!isset($raw['subdivisions'])) {
|
||||
return;
|
||||
}
|
||||
|
||||
foreach ($raw['subdivisions'] as $sub) {
|
||||
array_push(
|
||||
$this->subdivisions,
|
||||
$this->subdivisions[] =
|
||||
new \GeoIp2\Record\Subdivision($sub, $locales)
|
||||
);
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*
|
||||
* @param mixed $attr
|
||||
* @return mixed
|
||||
*/
|
||||
public function __get($attr)
|
||||
public function __get(string $attr)
|
||||
{
|
||||
if ($attr === 'mostSpecificSubdivision') {
|
||||
return $this->$attr();
|
||||
return $this->{$attr}();
|
||||
}
|
||||
|
||||
return parent::__get($attr);
|
||||
@ -93,10 +99,8 @@ class City extends Country
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*
|
||||
* @param mixed $attr
|
||||
*/
|
||||
public function __isset($attr)
|
||||
public function __isset(string $attr): bool
|
||||
{
|
||||
if ($attr === 'mostSpecificSubdivision') {
|
||||
// We always return a mostSpecificSubdivision, even if it is the
|
||||
@ -107,7 +111,7 @@ class City extends Country
|
||||
return parent::__isset($attr);
|
||||
}
|
||||
|
||||
private function mostSpecificSubdivision()
|
||||
private function mostSpecificSubdivision(): \GeoIp2\Record\Subdivision
|
||||
{
|
||||
return empty($this->subdivisions) ?
|
||||
new \GeoIp2\Record\Subdivision([], $this->locales) :
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace GeoIp2\Model;
|
||||
|
||||
use GeoIp2\Util;
|
||||
@ -18,16 +20,23 @@ use GeoIp2\Util;
|
||||
*/
|
||||
class ConnectionType extends AbstractModel
|
||||
{
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
protected $connectionType;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $ipAddress;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $network;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*
|
||||
* @param mixed $raw
|
||||
*/
|
||||
public function __construct($raw)
|
||||
public function __construct(array $raw)
|
||||
{
|
||||
parent::__construct($raw);
|
||||
|
||||
|
31
vendor/geoip2/geoip2/src/Model/Country.php
vendored
31
vendor/geoip2/geoip2/src/Model/Country.php
vendored
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace GeoIp2\Model;
|
||||
|
||||
/**
|
||||
@ -7,7 +9,7 @@ namespace GeoIp2\Model;
|
||||
*
|
||||
* The only difference between the City and Insights model classes is which
|
||||
* fields in each record may be populated. See
|
||||
* https://dev.maxmind.com/geoip/geoip2/web-services for more details.
|
||||
* https://dev.maxmind.com/geoip/docs/web-services?lang=en for more details.
|
||||
*
|
||||
* @property-read \GeoIp2\Record\Continent $continent Continent data for the
|
||||
* requested IP address.
|
||||
@ -26,24 +28,43 @@ namespace GeoIp2\Model;
|
||||
* the represented country differs from the country.
|
||||
* @property-read \GeoIp2\Record\Traits $traits Data for the traits of the
|
||||
* requested IP address.
|
||||
* @property-read array $raw The raw data from the web service.
|
||||
*/
|
||||
class Country extends AbstractModel
|
||||
{
|
||||
/**
|
||||
* @var \GeoIp2\Record\Continent
|
||||
*/
|
||||
protected $continent;
|
||||
/**
|
||||
* @var \GeoIp2\Record\Country
|
||||
*/
|
||||
protected $country;
|
||||
/**
|
||||
* @var array<string>
|
||||
*/
|
||||
protected $locales;
|
||||
/**
|
||||
* @var \GeoIp2\Record\MaxMind
|
||||
*/
|
||||
protected $maxmind;
|
||||
/**
|
||||
* @var \GeoIp2\Record\Country
|
||||
*/
|
||||
protected $registeredCountry;
|
||||
/**
|
||||
* @var \GeoIp2\Record\RepresentedCountry
|
||||
*/
|
||||
protected $representedCountry;
|
||||
/**
|
||||
* @var \GeoIp2\Record\Traits
|
||||
*/
|
||||
protected $traits;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*
|
||||
* @param mixed $raw
|
||||
* @param mixed $locales
|
||||
*/
|
||||
public function __construct($raw, $locales = ['en'])
|
||||
public function __construct(array $raw, array $locales = ['en'])
|
||||
{
|
||||
parent::__construct($raw);
|
||||
|
||||
|
15
vendor/geoip2/geoip2/src/Model/Domain.php
vendored
15
vendor/geoip2/geoip2/src/Model/Domain.php
vendored
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace GeoIp2\Model;
|
||||
|
||||
use GeoIp2\Util;
|
||||
@ -18,16 +20,23 @@ use GeoIp2\Util;
|
||||
*/
|
||||
class Domain extends AbstractModel
|
||||
{
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
protected $domain;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $ipAddress;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $network;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*
|
||||
* @param mixed $raw
|
||||
*/
|
||||
public function __construct($raw)
|
||||
public function __construct(array $raw)
|
||||
{
|
||||
parent::__construct($raw);
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace GeoIp2\Model;
|
||||
|
||||
/**
|
||||
@ -7,7 +9,7 @@ namespace GeoIp2\Model;
|
||||
*
|
||||
* The only difference between the City and Enterprise model classes is which
|
||||
* fields in each record may be populated. See
|
||||
* https://dev.maxmind.com/geoip/geoip2/web-services for more details.
|
||||
* https://dev.maxmind.com/geoip/docs/web-services?lang=en for more details.
|
||||
*/
|
||||
class Enterprise extends City
|
||||
{
|
||||
|
4
vendor/geoip2/geoip2/src/Model/Insights.php
vendored
4
vendor/geoip2/geoip2/src/Model/Insights.php
vendored
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace GeoIp2\Model;
|
||||
|
||||
/**
|
||||
@ -7,7 +9,7 @@ namespace GeoIp2\Model;
|
||||
*
|
||||
* The only difference between the City and Insights model classes is which
|
||||
* fields in each record may be populated. See
|
||||
* https://dev.maxmind.com/geoip/geoip2/web-services for more details.
|
||||
* https://dev.maxmind.com/geoip/docs/web-services?lang=en for more details.
|
||||
*/
|
||||
class Insights extends City
|
||||
{
|
||||
|
40
vendor/geoip2/geoip2/src/Model/Isp.php
vendored
40
vendor/geoip2/geoip2/src/Model/Isp.php
vendored
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace GeoIp2\Model;
|
||||
|
||||
use GeoIp2\Util;
|
||||
@ -14,6 +16,12 @@ use GeoIp2\Util;
|
||||
* address.
|
||||
* @property-read string|null $isp The name of the ISP associated with the IP
|
||||
* address.
|
||||
* @property-read string|null $mobileCountryCode The [mobile country code
|
||||
* (MCC)](https://en.wikipedia.org/wiki/Mobile_country_code) associated with
|
||||
* the IP address and ISP.
|
||||
* @property-read string|null $mobileNetworkCode The [mobile network code
|
||||
* (MNC)](https://en.wikipedia.org/wiki/Mobile_country_code) associated with
|
||||
* the IP address and ISP.
|
||||
* @property-read string|null $organization The name of the organization associated
|
||||
* with the IP address.
|
||||
* @property-read string $ipAddress The IP address that the data in the model is
|
||||
@ -24,25 +32,51 @@ use GeoIp2\Util;
|
||||
*/
|
||||
class Isp extends AbstractModel
|
||||
{
|
||||
/**
|
||||
* @var int|null
|
||||
*/
|
||||
protected $autonomousSystemNumber;
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
protected $autonomousSystemOrganization;
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
protected $isp;
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
protected $mobileCountryCode;
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
protected $mobileNetworkCode;
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
protected $organization;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $ipAddress;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $network;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*
|
||||
* @param mixed $raw
|
||||
*/
|
||||
public function __construct($raw)
|
||||
public function __construct(array $raw)
|
||||
{
|
||||
parent::__construct($raw);
|
||||
$this->autonomousSystemNumber = $this->get('autonomous_system_number');
|
||||
$this->autonomousSystemOrganization =
|
||||
$this->get('autonomous_system_organization');
|
||||
$this->isp = $this->get('isp');
|
||||
$this->mobileCountryCode = $this->get('mobile_country_code');
|
||||
$this->mobileNetworkCode = $this->get('mobile_network_code');
|
||||
$this->organization = $this->get('organization');
|
||||
|
||||
$ipAddress = $this->get('ip_address');
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace GeoIp2;
|
||||
|
||||
interface ProviderInterface
|
||||
@ -9,12 +11,12 @@ interface ProviderInterface
|
||||
*
|
||||
* @return \GeoIp2\Model\Country a Country model for the requested IP address
|
||||
*/
|
||||
public function country($ipAddress);
|
||||
public function country(string $ipAddress): Model\Country;
|
||||
|
||||
/**
|
||||
* @param string $ipAddress an IPv4 or IPv6 address to lookup
|
||||
*
|
||||
* @return \GeoIp2\Model\City a City model for the requested IP address
|
||||
*/
|
||||
public function city($ipAddress);
|
||||
public function city(string $ipAddress): Model\City;
|
||||
}
|
||||
|
@ -1,18 +1,20 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace GeoIp2\Record;
|
||||
|
||||
abstract class AbstractPlaceRecord extends AbstractRecord
|
||||
{
|
||||
/**
|
||||
* @var array<string>
|
||||
*/
|
||||
private $locales;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*
|
||||
* @param mixed $record
|
||||
* @param mixed $locales
|
||||
*/
|
||||
public function __construct($record, $locales = ['en'])
|
||||
public function __construct(?array $record, array $locales = ['en'])
|
||||
{
|
||||
$this->locales = $locales;
|
||||
parent::__construct($record);
|
||||
@ -21,9 +23,9 @@ abstract class AbstractPlaceRecord extends AbstractRecord
|
||||
/**
|
||||
* @ignore
|
||||
*
|
||||
* @param mixed $attr
|
||||
* @return mixed
|
||||
*/
|
||||
public function __get($attr)
|
||||
public function __get(string $attr)
|
||||
{
|
||||
if ($attr === 'name') {
|
||||
return $this->name();
|
||||
@ -34,28 +36,28 @@ abstract class AbstractPlaceRecord extends AbstractRecord
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*
|
||||
* @param mixed $attr
|
||||
*/
|
||||
public function __isset($attr)
|
||||
public function __isset(string $attr): bool
|
||||
{
|
||||
if ($attr === 'name') {
|
||||
return $this->firstSetNameLocale() === null ? false : true;
|
||||
return $this->firstSetNameLocale() !== null;
|
||||
}
|
||||
|
||||
return parent::__isset($attr);
|
||||
}
|
||||
|
||||
private function name()
|
||||
private function name(): ?string
|
||||
{
|
||||
$locale = $this->firstSetNameLocale();
|
||||
|
||||
// @phpstan-ignore-next-line
|
||||
return $locale === null ? null : $this->names[$locale];
|
||||
}
|
||||
|
||||
private function firstSetNameLocale()
|
||||
private function firstSetNameLocale(): ?string
|
||||
{
|
||||
foreach ($this->locales as $locale) {
|
||||
// @phpstan-ignore-next-line
|
||||
if (isset($this->names[$locale])) {
|
||||
return $locale;
|
||||
}
|
||||
|
@ -1,17 +1,20 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace GeoIp2\Record;
|
||||
|
||||
abstract class AbstractRecord implements \JsonSerializable
|
||||
{
|
||||
/**
|
||||
* @var array<string, mixed>
|
||||
*/
|
||||
private $record;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*
|
||||
* @param mixed $record
|
||||
*/
|
||||
public function __construct($record)
|
||||
public function __construct(?array $record)
|
||||
{
|
||||
$this->record = isset($record) ? $record : [];
|
||||
}
|
||||
@ -19,42 +22,45 @@ abstract class AbstractRecord implements \JsonSerializable
|
||||
/**
|
||||
* @ignore
|
||||
*
|
||||
* @param mixed $attr
|
||||
* @return mixed
|
||||
*/
|
||||
public function __get($attr)
|
||||
public function __get(string $attr)
|
||||
{
|
||||
// XXX - kind of ugly but greatly reduces boilerplate code
|
||||
$key = $this->attributeToKey($attr);
|
||||
|
||||
if ($this->__isset($attr)) {
|
||||
return $this->record[$key];
|
||||
} elseif ($this->validAttribute($attr)) {
|
||||
}
|
||||
if ($this->validAttribute($attr)) {
|
||||
if (preg_match('/^is_/', $key)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
throw new \RuntimeException("Unknown attribute: $attr");
|
||||
}
|
||||
|
||||
public function __isset($attr)
|
||||
public function __isset(string $attr): bool
|
||||
{
|
||||
return $this->validAttribute($attr) &&
|
||||
isset($this->record[$this->attributeToKey($attr)]);
|
||||
return $this->validAttribute($attr)
|
||||
&& isset($this->record[$this->attributeToKey($attr)]);
|
||||
}
|
||||
|
||||
private function attributeToKey($attr)
|
||||
private function attributeToKey(string $attr): string
|
||||
{
|
||||
return strtolower(preg_replace('/([A-Z])/', '_\1', $attr));
|
||||
}
|
||||
|
||||
private function validAttribute($attr)
|
||||
private function validAttribute(string $attr): bool
|
||||
{
|
||||
// @phpstan-ignore-next-line
|
||||
return \in_array($attr, $this->validAttributes, true);
|
||||
}
|
||||
|
||||
public function jsonSerialize()
|
||||
public function jsonSerialize(): ?array
|
||||
{
|
||||
return $this->record;
|
||||
}
|
||||
|
4
vendor/geoip2/geoip2/src/Record/City.php
vendored
4
vendor/geoip2/geoip2/src/Record/City.php
vendored
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace GeoIp2\Record;
|
||||
|
||||
/**
|
||||
@ -24,6 +26,8 @@ class City extends AbstractPlaceRecord
|
||||
{
|
||||
/**
|
||||
* @ignore
|
||||
*
|
||||
* @var array<string>
|
||||
*/
|
||||
protected $validAttributes = ['confidence', 'geonameId', 'names'];
|
||||
}
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace GeoIp2\Record;
|
||||
|
||||
/**
|
||||
@ -23,6 +25,8 @@ class Continent extends AbstractPlaceRecord
|
||||
{
|
||||
/**
|
||||
* @ignore
|
||||
*
|
||||
* @var array<string>
|
||||
*/
|
||||
protected $validAttributes = [
|
||||
'code',
|
||||
|
4
vendor/geoip2/geoip2/src/Record/Country.php
vendored
4
vendor/geoip2/geoip2/src/Record/Country.php
vendored
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace GeoIp2\Record;
|
||||
|
||||
/**
|
||||
@ -29,6 +31,8 @@ class Country extends AbstractPlaceRecord
|
||||
{
|
||||
/**
|
||||
* @ignore
|
||||
*
|
||||
* @var array<string>
|
||||
*/
|
||||
protected $validAttributes = [
|
||||
'confidence',
|
||||
|
4
vendor/geoip2/geoip2/src/Record/Location.php
vendored
4
vendor/geoip2/geoip2/src/Record/Location.php
vendored
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace GeoIp2\Record;
|
||||
|
||||
/**
|
||||
@ -37,6 +39,8 @@ class Location extends AbstractRecord
|
||||
{
|
||||
/**
|
||||
* @ignore
|
||||
*
|
||||
* @var array<string>
|
||||
*/
|
||||
protected $validAttributes = [
|
||||
'averageIncome',
|
||||
|
4
vendor/geoip2/geoip2/src/Record/MaxMind.php
vendored
4
vendor/geoip2/geoip2/src/Record/MaxMind.php
vendored
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace GeoIp2\Record;
|
||||
|
||||
/**
|
||||
@ -14,6 +16,8 @@ class MaxMind extends AbstractRecord
|
||||
{
|
||||
/**
|
||||
* @ignore
|
||||
*
|
||||
* @var array<string>
|
||||
*/
|
||||
protected $validAttributes = ['queriesRemaining'];
|
||||
}
|
||||
|
4
vendor/geoip2/geoip2/src/Record/Postal.php
vendored
4
vendor/geoip2/geoip2/src/Record/Postal.php
vendored
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace GeoIp2\Record;
|
||||
|
||||
/**
|
||||
@ -21,6 +23,8 @@ class Postal extends AbstractRecord
|
||||
{
|
||||
/**
|
||||
* @ignore
|
||||
*
|
||||
* @var array<string>
|
||||
*/
|
||||
protected $validAttributes = ['code', 'confidence'];
|
||||
}
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace GeoIp2\Record;
|
||||
|
||||
/**
|
||||
@ -15,6 +17,11 @@ namespace GeoIp2\Record;
|
||||
*/
|
||||
class RepresentedCountry extends Country
|
||||
{
|
||||
/**
|
||||
* @ignore
|
||||
*
|
||||
* @var array<string>
|
||||
*/
|
||||
protected $validAttributes = [
|
||||
'confidence',
|
||||
'geonameId',
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace GeoIp2\Record;
|
||||
|
||||
/**
|
||||
@ -30,6 +32,8 @@ class Subdivision extends AbstractPlaceRecord
|
||||
{
|
||||
/**
|
||||
* @ignore
|
||||
*
|
||||
* @var array<string>
|
||||
*/
|
||||
protected $validAttributes = [
|
||||
'confidence',
|
||||
|
24
vendor/geoip2/geoip2/src/Record/Traits.php
vendored
24
vendor/geoip2/geoip2/src/Record/Traits.php
vendored
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace GeoIp2\Record;
|
||||
|
||||
use GeoIp2\Util;
|
||||
@ -56,6 +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.
|
||||
* @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.
|
||||
* @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
|
||||
@ -71,7 +76,15 @@ use GeoIp2\Util;
|
||||
* @property-read string|null $organization The name of the organization associated
|
||||
* with the IP address. This attribute is only available from the City and
|
||||
* Insights web services and the GeoIP2 Enterprise database.
|
||||
* @property-read float|null $staticIPScore An indicator of how static or
|
||||
* @property-read string|null $mobileCountryCode The [mobile country code
|
||||
* (MCC)](https://en.wikipedia.org/wiki/Mobile_country_code) associated with
|
||||
* the IP address and ISP. This property is available from the City and
|
||||
* Insights web services and the GeoIP2 Enterprise database.
|
||||
* @property-read string|null $mobileNetworkCode The [mobile network code
|
||||
* (MNC)](https://en.wikipedia.org/wiki/Mobile_country_code) associated with
|
||||
* the IP address and ISP. This property is available from the City and
|
||||
* Insights web services and the GeoIP2 Enterprise database.
|
||||
* @property-read float|null $staticIpScore An indicator of how static or
|
||||
* dynamic an IP address is. This property is only available from GeoIP2
|
||||
* Precision Insights.
|
||||
* @property-read int|null $userCount The estimated number of users sharing
|
||||
@ -106,6 +119,8 @@ class Traits extends AbstractRecord
|
||||
{
|
||||
/**
|
||||
* @ignore
|
||||
*
|
||||
* @var array<string>
|
||||
*/
|
||||
protected $validAttributes = [
|
||||
'autonomousSystemNumber',
|
||||
@ -120,8 +135,11 @@ class Traits extends AbstractRecord
|
||||
'isLegitimateProxy',
|
||||
'isp',
|
||||
'isPublicProxy',
|
||||
'isResidentialProxy',
|
||||
'isSatelliteProvider',
|
||||
'isTorExitNode',
|
||||
'mobileCountryCode',
|
||||
'mobileNetworkCode',
|
||||
'network',
|
||||
'organization',
|
||||
'staticIpScore',
|
||||
@ -129,9 +147,9 @@ class Traits extends AbstractRecord
|
||||
'userType',
|
||||
];
|
||||
|
||||
public function __construct($record)
|
||||
public function __construct(?array $record)
|
||||
{
|
||||
if (!isset($record['network']) && isset($record['ip_address']) && isset($record['prefix_len'])) {
|
||||
if (!isset($record['network']) && isset($record['ip_address'], $record['prefix_len'])) {
|
||||
$record['network'] = Util::cidr($record['ip_address'], $record['prefix_len']);
|
||||
}
|
||||
|
||||
|
7
vendor/geoip2/geoip2/src/Util.php
vendored
7
vendor/geoip2/geoip2/src/Util.php
vendored
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace GeoIp2;
|
||||
|
||||
class Util
|
||||
@ -10,11 +12,8 @@ class Util
|
||||
*
|
||||
* @internal
|
||||
* @ignore
|
||||
*
|
||||
* @param mixed $ipAddress
|
||||
* @param mixed $prefixLen
|
||||
*/
|
||||
public static function cidr($ipAddress, $prefixLen)
|
||||
public static function cidr(string $ipAddress, int $prefixLen): string
|
||||
{
|
||||
$ipBytes = inet_pton($ipAddress);
|
||||
$networkBytes = str_repeat("\0", \strlen($ipBytes));
|
||||
|
54
vendor/geoip2/geoip2/src/WebService/Client.php
vendored
54
vendor/geoip2/geoip2/src/WebService/Client.php
vendored
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace GeoIp2\WebService;
|
||||
|
||||
use GeoIp2\Exception\AddressNotFoundException;
|
||||
@ -8,6 +10,9 @@ use GeoIp2\Exception\GeoIp2Exception;
|
||||
use GeoIp2\Exception\HttpException;
|
||||
use GeoIp2\Exception\InvalidRequestException;
|
||||
use GeoIp2\Exception\OutOfQueriesException;
|
||||
use GeoIp2\Model\City;
|
||||
use GeoIp2\Model\Country;
|
||||
use GeoIp2\Model\Insights;
|
||||
use GeoIp2\ProviderInterface;
|
||||
use MaxMind\WebService\Client as WsClient;
|
||||
|
||||
@ -43,11 +48,20 @@ use MaxMind\WebService\Client as WsClient;
|
||||
*/
|
||||
class Client implements ProviderInterface
|
||||
{
|
||||
/**
|
||||
* @var array<string>
|
||||
*/
|
||||
private $locales;
|
||||
/**
|
||||
* @var WsClient
|
||||
*/
|
||||
private $client;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private static $basePath = '/geoip/v2.1';
|
||||
|
||||
const VERSION = 'v2.10.0';
|
||||
public const VERSION = 'v2.12.2';
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
@ -57,7 +71,9 @@ class Client implements ProviderInterface
|
||||
* @param array $locales list of locale codes to use in name property
|
||||
* from most preferred to least preferred
|
||||
* @param array $options array of options. Valid options include:
|
||||
* * `host` - The host to use when querying the web service.
|
||||
* * `host` - The host to use when querying the web service. To
|
||||
* query the GeoLite2 web service instead of GeoIP2 Precision,
|
||||
* set the host to `geolite.info`.
|
||||
* * `timeout` - Timeout in seconds.
|
||||
* * `connectTimeout` - Initial connection timeout in seconds.
|
||||
* * `proxy` - The HTTP proxy to use. May include a schema, port,
|
||||
@ -65,15 +81,16 @@ class Client implements ProviderInterface
|
||||
* `http://username:password@127.0.0.1:10`.
|
||||
*/
|
||||
public function __construct(
|
||||
$accountId,
|
||||
$licenseKey,
|
||||
$locales = ['en'],
|
||||
$options = []
|
||||
int $accountId,
|
||||
string $licenseKey,
|
||||
array $locales = ['en'],
|
||||
array $options = []
|
||||
) {
|
||||
$this->locales = $locales;
|
||||
|
||||
// This is for backwards compatibility. Do not remove except for a
|
||||
// major version bump.
|
||||
// @phpstan-ignore-next-line
|
||||
if (\is_string($options)) {
|
||||
$options = ['host' => $options];
|
||||
}
|
||||
@ -87,13 +104,13 @@ class Client implements ProviderInterface
|
||||
$this->client = new WsClient($accountId, $licenseKey, $options);
|
||||
}
|
||||
|
||||
private function userAgent()
|
||||
private function userAgent(): string
|
||||
{
|
||||
return 'GeoIP2-API/' . self::VERSION;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method calls the GeoIP2 Precision: City service.
|
||||
* This method calls the City service.
|
||||
*
|
||||
* @param string $ipAddress IPv4 or IPv6 address as a string. If no
|
||||
* address is provided, the address that the web service is called
|
||||
@ -115,16 +132,15 @@ 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.
|
||||
*
|
||||
* @return \GeoIp2\Model\City
|
||||
*/
|
||||
public function city($ipAddress = 'me')
|
||||
public function city(string $ipAddress = 'me'): City
|
||||
{
|
||||
// @phpstan-ignore-next-line
|
||||
return $this->responseFor('city', 'City', $ipAddress);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method calls the GeoIP2 Precision: Country service.
|
||||
* This method calls the Country service.
|
||||
*
|
||||
* @param string $ipAddress IPv4 or IPv6 address as a string. If no
|
||||
* address is provided, the address that the web service is called
|
||||
@ -146,16 +162,15 @@ 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.
|
||||
*
|
||||
* @return \GeoIp2\Model\Country
|
||||
*/
|
||||
public function country($ipAddress = 'me')
|
||||
public function country(string $ipAddress = 'me'): Country
|
||||
{
|
||||
return $this->responseFor('country', 'Country', $ipAddress);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method calls the GeoIP2 Precision: Insights service.
|
||||
* This method calls the Insights service. Insights is only supported by GeoIP2
|
||||
* Precision. The GeoLite2 web service does not support it.
|
||||
*
|
||||
* @param string $ipAddress IPv4 or IPv6 address as a string. If no
|
||||
* address is provided, the address that the web service is called
|
||||
@ -177,15 +192,14 @@ 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.
|
||||
*
|
||||
* @return \GeoIp2\Model\Insights
|
||||
*/
|
||||
public function insights($ipAddress = 'me')
|
||||
public function insights(string $ipAddress = 'me'): Insights
|
||||
{
|
||||
// @phpstan-ignore-next-line
|
||||
return $this->responseFor('insights', 'Insights', $ipAddress);
|
||||
}
|
||||
|
||||
private function responseFor($endpoint, $class, $ipAddress)
|
||||
private function responseFor(string $endpoint, string $class, string $ipAddress): Country
|
||||
{
|
||||
$path = implode('/', [self::$basePath, $endpoint, $ipAddress]);
|
||||
|
||||
|
19
vendor/guzzlehttp/promises/CHANGELOG.md
vendored
19
vendor/guzzlehttp/promises/CHANGELOG.md
vendored
@ -1,7 +1,26 @@
|
||||
# CHANGELOG
|
||||
|
||||
## 1.5.1 - 2021-10-22
|
||||
|
||||
### Fixed
|
||||
|
||||
- Revert "Call handler when waiting on fulfilled/rejected Promise"
|
||||
- Fix pool memory leak when empty array of promises provided
|
||||
|
||||
## 1.5.0 - 2021-10-07
|
||||
|
||||
### Changed
|
||||
|
||||
- Call handler when waiting on fulfilled/rejected Promise
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix manually settle promises generated with Utils::task
|
||||
|
||||
## 1.4.1 - 2021-02-18
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed `each_limit` skipping promises and failing
|
||||
|
||||
## 1.4.0 - 2020-09-30
|
||||
|
7
vendor/guzzlehttp/promises/LICENSE
vendored
7
vendor/guzzlehttp/promises/LICENSE
vendored
@ -1,4 +1,9 @@
|
||||
Copyright (c) 2015-2016 Michael Dowling, https://github.com/mtdowling <mtdowling@gmail.com>
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015 Michael Dowling <mtdowling@gmail.com>
|
||||
Copyright (c) 2015 Graham Campbell <hello@gjcampbell.co.uk>
|
||||
Copyright (c) 2017 Tobias Schultze <webmaster@tubo-world.de>
|
||||
Copyright (c) 2020 Tobias Nyholm <tobias.nyholm@gmail.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
15
vendor/guzzlehttp/promises/README.md
vendored
15
vendor/guzzlehttp/promises/README.md
vendored
@ -530,3 +530,18 @@ 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` |
|
||||
|
||||
|
||||
## Security
|
||||
|
||||
If you discover a security vulnerability within this package, please send an email to security@tidelift.com. All security vulnerabilities will be promptly addressed. Please do not disclose security-related issues publicly until a fix has been announced. Please see [Security Policy](https://github.com/guzzle/promises/security/policy) for more information.
|
||||
|
||||
## License
|
||||
|
||||
Guzzle is made available under the MIT License (MIT). Please see [License File](LICENSE) for more information.
|
||||
|
||||
## For Enterprise
|
||||
|
||||
Available as part of the Tidelift Subscription
|
||||
|
||||
The maintainers of Guzzle and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/packagist-guzzlehttp-promises?utm_source=packagist-guzzlehttp-promises&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
|
||||
|
23
vendor/guzzlehttp/promises/composer.json
vendored
23
vendor/guzzlehttp/promises/composer.json
vendored
@ -4,10 +4,25 @@
|
||||
"keywords": ["promise"],
|
||||
"license": "MIT",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Graham Campbell",
|
||||
"email": "hello@gjcampbell.co.uk",
|
||||
"homepage": "https://github.com/GrahamCampbell"
|
||||
},
|
||||
{
|
||||
"name": "Michael Dowling",
|
||||
"email": "mtdowling@gmail.com",
|
||||
"homepage": "https://github.com/mtdowling"
|
||||
},
|
||||
{
|
||||
"name": "Tobias Nyholm",
|
||||
"email": "tobias.nyholm@gmail.com",
|
||||
"homepage": "https://github.com/Nyholm"
|
||||
},
|
||||
{
|
||||
"name": "Tobias Schultze",
|
||||
"email": "webmaster@tubo-world.de",
|
||||
"homepage": "https://github.com/Tobion"
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
@ -33,7 +48,11 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.4-dev"
|
||||
}
|
||||
"dev-master": "1.5-dev"
|
||||
}
|
||||
},
|
||||
"config": {
|
||||
"preferred-install": "dist",
|
||||
"sort-packages": true
|
||||
}
|
||||
}
|
||||
|
@ -79,9 +79,7 @@ class EachPromise implements PromisorInterface
|
||||
$this->createPromise();
|
||||
/** @psalm-assert Promise $this->aggregate */
|
||||
$this->iterable->rewind();
|
||||
if (!$this->checkIfFinished()) {
|
||||
$this->refillPending();
|
||||
}
|
||||
} catch (\Throwable $e) {
|
||||
/**
|
||||
* @psalm-suppress NullReference
|
||||
@ -107,6 +105,9 @@ class EachPromise implements PromisorInterface
|
||||
{
|
||||
$this->mutex = false;
|
||||
$this->aggregate = new Promise(function () {
|
||||
if ($this->checkIfFinished()) {
|
||||
return;
|
||||
}
|
||||
reset($this->pending);
|
||||
// Consume a potentially fluctuating list of promises while
|
||||
// ensuring that indexes are maintained (precluding array_shift).
|
||||
|
2
vendor/guzzlehttp/promises/src/Utils.php
vendored
2
vendor/guzzlehttp/promises/src/Utils.php
vendored
@ -48,7 +48,9 @@ final class Utils
|
||||
$promise = new Promise([$queue, 'run']);
|
||||
$queue->add(function () use ($task, $promise) {
|
||||
try {
|
||||
if (Is::pending($promise)) {
|
||||
$promise->resolve($task());
|
||||
}
|
||||
} catch (\Throwable $e) {
|
||||
$promise->reject($e);
|
||||
} catch (\Exception $e) {
|
||||
|
2
vendor/guzzlehttp/psr7/.github/FUNDING.yml
vendored
Normal file
2
vendor/guzzlehttp/psr7/.github/FUNDING.yml
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
github: [Nyholm, GrahamCampbell]
|
||||
tidelift: "packagist/guzzlehttp/psr7"
|
14
vendor/guzzlehttp/psr7/.github/stale.yml
vendored
Normal file
14
vendor/guzzlehttp/psr7/.github/stale.yml
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
daysUntilStale: 120
|
||||
daysUntilClose: 14
|
||||
exemptLabels:
|
||||
- lifecycle/keep-open
|
||||
- lifecycle/ready-for-merge
|
||||
# Label to use when marking an issue as stale
|
||||
staleLabel: lifecycle/stale
|
||||
# Comment to post when marking an issue as stale. Set to `false` to disable
|
||||
markComment: >
|
||||
This issue has been automatically marked as stale because it has not had
|
||||
recent activity. It will be closed after 2 weeks if no further activity occurs. Thank you
|
||||
for your contributions.
|
||||
# Comment to post when closing a stale issue. Set to `false` to disable
|
||||
closeComment: false
|
16
vendor/guzzlehttp/psr7/.github/workflows/bc.yml
vendored
16
vendor/guzzlehttp/psr7/.github/workflows/bc.yml
vendored
@ -1,16 +0,0 @@
|
||||
name: BC Check
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
roave-bc-check:
|
||||
name: Roave BC Check
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Roave BC Check
|
||||
uses: docker://nyholm/roave-bc-check-ga
|
@ -10,7 +10,7 @@ jobs:
|
||||
strategy:
|
||||
max-parallel: 10
|
||||
matrix:
|
||||
php: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4']
|
||||
php: ['5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1']
|
||||
|
||||
steps:
|
||||
- name: Set up PHP
|
||||
@ -23,8 +23,12 @@ jobs:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Mimic PHP 8.0
|
||||
run: composer config platform.php 8.0.999
|
||||
if: matrix.php > 8
|
||||
|
||||
- name: Install dependencies
|
||||
run: composer update --no-interaction --no-progress --prefer-dist
|
||||
run: composer update --no-interaction --no-progress
|
||||
|
||||
- name: Run tests
|
||||
run: make test
|
||||
|
@ -26,7 +26,7 @@ jobs:
|
||||
- name: Download dependencies
|
||||
uses: ramsey/composer-install@v1
|
||||
with:
|
||||
composer-options: --no-interaction --prefer-dist --optimize-autoloader
|
||||
composer-options: --no-interaction --optimize-autoloader
|
||||
|
||||
- name: Start server
|
||||
run: php -S 127.0.0.1:10002 tests/Integration/server.php &
|
||||
|
6
vendor/guzzlehttp/psr7/CHANGELOG.md
vendored
6
vendor/guzzlehttp/psr7/CHANGELOG.md
vendored
@ -9,6 +9,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
||||
|
||||
## Unreleased
|
||||
|
||||
## 1.8.3 - 2021-10-05
|
||||
|
||||
### Fixed
|
||||
|
||||
- Return `null` in caching stream size if remote size is `null`
|
||||
|
||||
## 1.8.2 - 2021-04-26
|
||||
|
||||
### Fixed
|
||||
|
9
vendor/guzzlehttp/psr7/LICENSE
vendored
9
vendor/guzzlehttp/psr7/LICENSE
vendored
@ -1,4 +1,11 @@
|
||||
Copyright (c) 2015 Michael Dowling, https://github.com/mtdowling <mtdowling@gmail.com>
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015 Michael Dowling <mtdowling@gmail.com>
|
||||
Copyright (c) 2015 Márk Sági-Kazár <mark.sagikazar@gmail.com>
|
||||
Copyright (c) 2015 Graham Campbell <hello@gjcampbell.co.uk>
|
||||
Copyright (c) 2016 Tobias Schultze <webmaster@tubo-world.de>
|
||||
Copyright (c) 2016 George Mponos <gmponos@gmail.com>
|
||||
Copyright (c) 2018 Tobias Nyholm <tobias.nyholm@gmail.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
15
vendor/guzzlehttp/psr7/README.md
vendored
15
vendor/guzzlehttp/psr7/README.md
vendored
@ -807,3 +807,18 @@ Whether two URIs can be considered equivalent. Both URIs are normalized automati
|
||||
`$normalizations` bitmask. The method also accepts relative URI references and returns true when they are equivalent.
|
||||
This of course assumes they will be resolved against the same base URI. If this is not the case, determination of
|
||||
equivalence or difference of relative references does not mean anything.
|
||||
|
||||
|
||||
## Security
|
||||
|
||||
If you discover a security vulnerability within this package, please send an email to security@tidelift.com. All security vulnerabilities will be promptly addressed. Please do not disclose security-related issues publicly until a fix has been announced. Please see [Security Policy](https://github.com/guzzle/psr7/security/policy) for more information.
|
||||
|
||||
## License
|
||||
|
||||
Guzzle is made available under the MIT License (MIT). Please see [License File](LICENSE) for more information.
|
||||
|
||||
## For Enterprise
|
||||
|
||||
Available as part of the Tidelift Subscription
|
||||
|
||||
The maintainers of Guzzle and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/packagist-guzzlehttp-psr7?utm_source=packagist-guzzlehttp-psr7&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
|
||||
|
26
vendor/guzzlehttp/psr7/composer.json
vendored
26
vendor/guzzlehttp/psr7/composer.json
vendored
@ -1,17 +1,37 @@
|
||||
{
|
||||
"name": "guzzlehttp/psr7",
|
||||
"type": "library",
|
||||
"description": "PSR-7 message implementation that also provides common utility methods",
|
||||
"keywords": ["request", "response", "message", "stream", "http", "uri", "url", "psr-7"],
|
||||
"license": "MIT",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Graham Campbell",
|
||||
"email": "hello@gjcampbell.co.uk",
|
||||
"homepage": "https://github.com/GrahamCampbell"
|
||||
},
|
||||
{
|
||||
"name": "Michael Dowling",
|
||||
"email": "mtdowling@gmail.com",
|
||||
"homepage": "https://github.com/mtdowling"
|
||||
},
|
||||
{
|
||||
"name": "George Mponos",
|
||||
"email": "gmponos@gmail.com",
|
||||
"homepage": "https://github.com/gmponos"
|
||||
},
|
||||
{
|
||||
"name": "Tobias Nyholm",
|
||||
"email": "tobias.nyholm@gmail.com",
|
||||
"homepage": "https://github.com/Nyholm"
|
||||
},
|
||||
{
|
||||
"name": "Márk Sági-Kazár",
|
||||
"email": "mark.sagikazar@gmail.com",
|
||||
"homepage": "https://github.com/sagikazarmark"
|
||||
},
|
||||
{
|
||||
"name": "Tobias Schultze",
|
||||
"email": "webmaster@tubo-world.de",
|
||||
"homepage": "https://github.com/Tobion"
|
||||
}
|
||||
],
|
||||
@ -45,5 +65,9 @@
|
||||
"branch-alias": {
|
||||
"dev-master": "1.7-dev"
|
||||
}
|
||||
},
|
||||
"config": {
|
||||
"preferred-install": "dist",
|
||||
"sort-packages": true
|
||||
}
|
||||
}
|
||||
|
8
vendor/guzzlehttp/psr7/src/CachingStream.php
vendored
8
vendor/guzzlehttp/psr7/src/CachingStream.php
vendored
@ -36,7 +36,13 @@ class CachingStream implements StreamInterface
|
||||
|
||||
public function getSize()
|
||||
{
|
||||
return max($this->stream->getSize(), $this->remoteStream->getSize());
|
||||
$remoteSize = $this->remoteStream->getSize();
|
||||
|
||||
if (null === $remoteSize) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return max($this->stream->getSize(), $remoteSize);
|
||||
}
|
||||
|
||||
public function rewind()
|
||||
|
8
vendor/maxmind-db/reader/CHANGELOG.md
vendored
8
vendor/maxmind-db/reader/CHANGELOG.md
vendored
@ -1,6 +1,14 @@
|
||||
CHANGELOG
|
||||
=========
|
||||
|
||||
1.11.0
|
||||
-------------------
|
||||
|
||||
* Replace runtime define of a constant to facilitate opcache preloading.
|
||||
Reported by vedadkajtaz. GitHub #134.
|
||||
* Resolve minor issue found by the Clang static analyzer in the C
|
||||
extension.
|
||||
|
||||
1.10.1 (2021-04-14)
|
||||
-------------------
|
||||
|
||||
|
17
vendor/maxmind-db/reader/README.md
vendored
17
vendor/maxmind-db/reader/README.md
vendored
@ -112,9 +112,16 @@ you are using an autoloader, no changes to your code should be necessary.
|
||||
|
||||
First install [libmaxminddb](https://github.com/maxmind/libmaxminddb) as
|
||||
described in its [README.md
|
||||
file](https://github.com/maxmind/libmaxminddb/blob/master/README.md#installing-from-a-tarball).
|
||||
After successfully installing libmaxmindb, run the following commands from the
|
||||
top-level directory of this distribution:
|
||||
file](https://github.com/maxmind/libmaxminddb/blob/main/README.md#installing-from-a-tarball).
|
||||
After successfully installing libmaxmindb, you may install the extension
|
||||
from [pecl](https://pecl.php.net/package/maxminddb):
|
||||
|
||||
```
|
||||
pecl install maxminddb
|
||||
```
|
||||
|
||||
Alternatively, you may install it from the source. To do so, run the following
|
||||
commands from the top-level directory of this distribution:
|
||||
|
||||
```
|
||||
cd ext
|
||||
@ -157,7 +164,7 @@ client API, please see [our support page](https://www.maxmind.com/en/support).
|
||||
|
||||
## Requirements ##
|
||||
|
||||
This library requires PHP 5.6 or greater.
|
||||
This library requires PHP 7.2 or greater.
|
||||
|
||||
The GMP or BCMath extension may be required to read some databases
|
||||
using the pure PHP API.
|
||||
@ -173,6 +180,6 @@ The MaxMind DB Reader PHP API uses [Semantic Versioning](https://semver.org/).
|
||||
|
||||
## Copyright and License ##
|
||||
|
||||
This software is Copyright (c) 2014-2019 by MaxMind, Inc.
|
||||
This software is Copyright (c) 2014-2020 by MaxMind, Inc.
|
||||
|
||||
This is free software, licensed under the Apache License, Version 2.0.
|
||||
|
12
vendor/maxmind-db/reader/autoload.php
vendored
12
vendor/maxmind-db/reader/autoload.php
vendored
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* PSR-4 autoloader implementation for the MaxMind\DB namespace.
|
||||
* First we define the 'mmdb_autoload' function, and then we register
|
||||
@ -14,7 +16,7 @@
|
||||
* @param string $class
|
||||
* the name of the class to load
|
||||
*/
|
||||
function mmdb_autoload($class)
|
||||
function mmdb_autoload($class): void
|
||||
{
|
||||
/*
|
||||
* A project-specific mapping between the namespaces and where
|
||||
@ -26,16 +28,16 @@ function mmdb_autoload($class)
|
||||
$namespace_map = ['MaxMind\\Db\\' => __DIR__ . '/src/MaxMind/Db/'];
|
||||
|
||||
foreach ($namespace_map as $prefix => $dir) {
|
||||
/* First swap out the namespace prefix with a directory... */
|
||||
// First swap out the namespace prefix with a directory...
|
||||
$path = str_replace($prefix, $dir, $class);
|
||||
|
||||
/* replace the namespace separator with a directory separator... */
|
||||
// replace the namespace separator with a directory separator...
|
||||
$path = str_replace('\\', '/', $path);
|
||||
|
||||
/* and finally, add the PHP file extension to the result. */
|
||||
// and finally, add the PHP file extension to the result.
|
||||
$path = $path . '.php';
|
||||
|
||||
/* $path should now contain the path to a PHP file defining $class */
|
||||
// $path should now contain the path to a PHP file defining $class
|
||||
if (file_exists($path)) {
|
||||
include $path;
|
||||
}
|
||||
|
2
vendor/maxmind-db/reader/composer.json
vendored
2
vendor/maxmind-db/reader/composer.json
vendored
@ -24,7 +24,7 @@
|
||||
"ext-maxminddb": "<1.10.1,>=2.0.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"friendsofphp/php-cs-fixer": "*",
|
||||
"friendsofphp/php-cs-fixer": "3.*",
|
||||
"phpunit/phpunit": ">=8.0.0,<10.0.0",
|
||||
"php-coveralls/php-coveralls": "^2.1",
|
||||
"phpunit/phpcov": ">=6.0.0",
|
||||
|
10
vendor/maxmind-db/reader/ext/config.w32
vendored
Normal file
10
vendor/maxmind-db/reader/ext/config.w32
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
ARG_WITH("maxminddb", "Enable MaxMind DB Reader extension support", "no");
|
||||
|
||||
if (PHP_MAXMINDDB == "yes") {
|
||||
if (CHECK_HEADER_ADD_INCLUDE("maxminddb.h", "CFLAGS_MAXMINDDB", PHP_MAXMINDDB + ";" + PHP_PHP_BUILD + "\\include\\maxminddb") &&
|
||||
CHECK_LIB("libmaxminddb.lib", "maxminddb", PHP_MAXMINDDB)) {
|
||||
EXTENSION("maxminddb", "maxminddb.c");
|
||||
} else {
|
||||
WARNING('Could not find maxminddb.h or libmaxminddb.lib; skipping');
|
||||
}
|
||||
}
|
537
vendor/maxmind-db/reader/ext/maxminddb.c
vendored
537
vendor/maxmind-db/reader/ext/maxminddb.c
vendored
@ -21,6 +21,8 @@
|
||||
#include <zend.h>
|
||||
|
||||
#include "Zend/zend_exceptions.h"
|
||||
#include "Zend/zend_types.h"
|
||||
#include "ext/spl/spl_exceptions.h"
|
||||
#include "ext/standard/info.h"
|
||||
#include <maxminddb.h>
|
||||
|
||||
@ -33,50 +35,50 @@
|
||||
|
||||
#define PHP_MAXMINDDB_NS ZEND_NS_NAME("MaxMind", "Db")
|
||||
#define PHP_MAXMINDDB_READER_NS ZEND_NS_NAME(PHP_MAXMINDDB_NS, "Reader")
|
||||
#define PHP_MAXMINDDB_METADATA_NS \
|
||||
ZEND_NS_NAME(PHP_MAXMINDDB_READER_NS, "Metadata")
|
||||
#define PHP_MAXMINDDB_READER_EX_NS \
|
||||
ZEND_NS_NAME(PHP_MAXMINDDB_READER_NS, "InvalidDatabaseException")
|
||||
|
||||
#ifdef ZEND_ENGINE_3
|
||||
#define Z_MAXMINDDB_P(zv) php_maxminddb_fetch_object(Z_OBJ_P(zv))
|
||||
#define _ZVAL_STRING ZVAL_STRING
|
||||
#define _ZVAL_STRINGL ZVAL_STRINGL
|
||||
typedef size_t strsize_t;
|
||||
typedef zend_object free_obj_t;
|
||||
#else
|
||||
#define Z_MAXMINDDB_P(zv) \
|
||||
(maxminddb_obj *)zend_object_store_get_object(zv TSRMLS_CC)
|
||||
#define _ZVAL_STRING(a, b) ZVAL_STRING(a, b, 1)
|
||||
#define _ZVAL_STRINGL(a, b, c) ZVAL_STRINGL(a, b, c, 1)
|
||||
typedef int strsize_t;
|
||||
typedef void free_obj_t;
|
||||
#endif
|
||||
|
||||
/* For PHP 8 compatibility */
|
||||
#ifndef TSRMLS_C
|
||||
#if PHP_VERSION_ID < 80000
|
||||
|
||||
#define PROP_OBJ(zv) (zv)
|
||||
|
||||
#else
|
||||
|
||||
#define PROP_OBJ(zv) Z_OBJ_P(zv)
|
||||
|
||||
#define TSRMLS_C
|
||||
#endif
|
||||
#ifndef TSRMLS_CC
|
||||
#define TSRMLS_CC
|
||||
#endif
|
||||
#ifndef TSRMLS_DC
|
||||
#define TSRMLS_DC
|
||||
|
||||
/* End PHP 8 compatibility */
|
||||
#endif
|
||||
|
||||
#ifndef ZEND_ACC_CTOR
|
||||
#define ZEND_ACC_CTOR 0
|
||||
#endif
|
||||
|
||||
#ifdef ZEND_ENGINE_3
|
||||
typedef struct _maxminddb_obj {
|
||||
MMDB_s *mmdb;
|
||||
zend_object std;
|
||||
} maxminddb_obj;
|
||||
#else
|
||||
typedef struct _maxminddb_obj {
|
||||
zend_object std;
|
||||
MMDB_s *mmdb;
|
||||
} maxminddb_obj;
|
||||
/* IS_MIXED was added in 2020 */
|
||||
#ifndef IS_MIXED
|
||||
#define IS_MIXED IS_UNDEF
|
||||
#endif
|
||||
|
||||
/* ZEND_THIS was added in 7.4 */
|
||||
#ifndef ZEND_THIS
|
||||
#define ZEND_THIS (&EX(This))
|
||||
#endif
|
||||
|
||||
typedef struct _maxminddb_obj {
|
||||
MMDB_s *mmdb;
|
||||
zend_object std;
|
||||
} maxminddb_obj;
|
||||
|
||||
PHP_FUNCTION(maxminddb);
|
||||
|
||||
static int
|
||||
@ -96,7 +98,6 @@ static void handle_uint64(const MMDB_entry_data_list_s *entry_data_list,
|
||||
zval *z_value TSRMLS_DC);
|
||||
static void handle_uint32(const MMDB_entry_data_list_s *entry_data_list,
|
||||
zval *z_value TSRMLS_DC);
|
||||
static zend_class_entry *lookup_class(const char *name TSRMLS_DC);
|
||||
|
||||
#define CHECK_ALLOCATED(val) \
|
||||
if (!val) { \
|
||||
@ -104,38 +105,16 @@ static zend_class_entry *lookup_class(const char *name TSRMLS_DC);
|
||||
return; \
|
||||
}
|
||||
|
||||
#define THROW_EXCEPTION(name, ...) \
|
||||
{ \
|
||||
zend_class_entry *exception_ce = lookup_class(name TSRMLS_CC); \
|
||||
zend_throw_exception_ex(exception_ce, 0 TSRMLS_CC, __VA_ARGS__); \
|
||||
}
|
||||
|
||||
#if PHP_VERSION_ID < 50399
|
||||
#define object_properties_init(zo, class_type) \
|
||||
{ \
|
||||
zval *tmp; \
|
||||
zend_hash_copy((*zo).properties, \
|
||||
&class_type->default_properties, \
|
||||
(copy_ctor_func_t)zval_add_ref, \
|
||||
(void *)&tmp, \
|
||||
sizeof(zval *)); \
|
||||
}
|
||||
#endif
|
||||
|
||||
static zend_object_handlers maxminddb_obj_handlers;
|
||||
static zend_class_entry *maxminddb_ce;
|
||||
static zend_class_entry *maxminddb_ce, *maxminddb_exception_ce, *metadata_ce;
|
||||
|
||||
static inline maxminddb_obj *
|
||||
php_maxminddb_fetch_object(zend_object *obj TSRMLS_DC) {
|
||||
#ifdef ZEND_ENGINE_3
|
||||
return (maxminddb_obj *)((char *)(obj)-XtOffsetOf(maxminddb_obj, std));
|
||||
#else
|
||||
return (maxminddb_obj *)obj;
|
||||
#endif
|
||||
}
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_maxmindbreader_construct, 0, 0, 1)
|
||||
ZEND_ARG_INFO(0, db_file)
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_maxminddbreader_construct, 0, 0, 1)
|
||||
ZEND_ARG_TYPE_INFO(0, db_file, IS_STRING, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
PHP_METHOD(MaxMind_Db_Reader, __construct) {
|
||||
@ -150,14 +129,14 @@ PHP_METHOD(MaxMind_Db_Reader, __construct) {
|
||||
maxminddb_ce,
|
||||
&db_file,
|
||||
&name_len) == FAILURE) {
|
||||
THROW_EXCEPTION("InvalidArgumentException",
|
||||
"The constructor takes exactly one argument.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (0 != php_check_open_basedir(db_file TSRMLS_CC) ||
|
||||
0 != access(db_file, R_OK)) {
|
||||
THROW_EXCEPTION("InvalidArgumentException",
|
||||
zend_throw_exception_ex(
|
||||
spl_ce_InvalidArgumentException,
|
||||
0 TSRMLS_CC,
|
||||
"The file \"%s\" does not exist or is not readable.",
|
||||
db_file);
|
||||
return;
|
||||
@ -167,7 +146,9 @@ PHP_METHOD(MaxMind_Db_Reader, __construct) {
|
||||
uint16_t status = MMDB_open(db_file, MMDB_MODE_MMAP, mmdb);
|
||||
|
||||
if (MMDB_SUCCESS != status) {
|
||||
THROW_EXCEPTION(PHP_MAXMINDDB_READER_EX_NS,
|
||||
zend_throw_exception_ex(
|
||||
maxminddb_exception_ce,
|
||||
0 TSRMLS_CC,
|
||||
"Error opening database file (%s). Is this a valid "
|
||||
"MaxMind DB file?",
|
||||
db_file);
|
||||
@ -175,12 +156,13 @@ PHP_METHOD(MaxMind_Db_Reader, __construct) {
|
||||
return;
|
||||
}
|
||||
|
||||
maxminddb_obj *mmdb_obj = Z_MAXMINDDB_P(getThis());
|
||||
maxminddb_obj *mmdb_obj = Z_MAXMINDDB_P(ZEND_THIS);
|
||||
mmdb_obj->mmdb = mmdb;
|
||||
}
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_maxmindbreader_get, 0, 0, 1)
|
||||
ZEND_ARG_INFO(0, ip_address)
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(
|
||||
arginfo_maxminddbreader_get, 0, 1, IS_MIXED, 1)
|
||||
ZEND_ARG_TYPE_INFO(0, ip_address, IS_STRING, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
PHP_METHOD(MaxMind_Db_Reader, get) {
|
||||
@ -188,76 +170,75 @@ PHP_METHOD(MaxMind_Db_Reader, get) {
|
||||
get_record(INTERNAL_FUNCTION_PARAM_PASSTHRU, return_value, &prefix_len);
|
||||
}
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(
|
||||
arginfo_maxminddbreader_getWithPrefixLen, 0, 1, IS_ARRAY, 1)
|
||||
ZEND_ARG_TYPE_INFO(0, ip_address, IS_STRING, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
PHP_METHOD(MaxMind_Db_Reader, getWithPrefixLen) {
|
||||
zval *record, *z_prefix_len;
|
||||
#ifdef ZEND_ENGINE_3
|
||||
zval _record, _z_prefix_len;
|
||||
record = &_record;
|
||||
z_prefix_len = &_z_prefix_len;
|
||||
#else
|
||||
ALLOC_INIT_ZVAL(record);
|
||||
ALLOC_INIT_ZVAL(z_prefix_len);
|
||||
#endif
|
||||
zval record, z_prefix_len;
|
||||
|
||||
int prefix_len = 0;
|
||||
if (get_record(INTERNAL_FUNCTION_PARAM_PASSTHRU, record, &prefix_len)) {
|
||||
if (get_record(INTERNAL_FUNCTION_PARAM_PASSTHRU, &record, &prefix_len) ==
|
||||
FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
array_init(return_value);
|
||||
add_next_index_zval(return_value, record);
|
||||
add_next_index_zval(return_value, &record);
|
||||
|
||||
ZVAL_LONG(z_prefix_len, prefix_len);
|
||||
add_next_index_zval(return_value, z_prefix_len);
|
||||
ZVAL_LONG(&z_prefix_len, prefix_len);
|
||||
add_next_index_zval(return_value, &z_prefix_len);
|
||||
}
|
||||
|
||||
static int
|
||||
get_record(INTERNAL_FUNCTION_PARAMETERS, zval *record, int *prefix_len) {
|
||||
char *ip_address = NULL;
|
||||
strsize_t name_len;
|
||||
zval *_this_zval = NULL;
|
||||
zval *this_zval = NULL;
|
||||
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
|
||||
getThis(),
|
||||
"Os",
|
||||
&_this_zval,
|
||||
&this_zval,
|
||||
maxminddb_ce,
|
||||
&ip_address,
|
||||
&name_len) == FAILURE) {
|
||||
THROW_EXCEPTION("InvalidArgumentException",
|
||||
"Method takes exactly one argument.");
|
||||
return 1;
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
const maxminddb_obj *mmdb_obj = (maxminddb_obj *)Z_MAXMINDDB_P(getThis());
|
||||
const maxminddb_obj *mmdb_obj = (maxminddb_obj *)Z_MAXMINDDB_P(ZEND_THIS);
|
||||
|
||||
MMDB_s *mmdb = mmdb_obj->mmdb;
|
||||
|
||||
if (NULL == mmdb) {
|
||||
THROW_EXCEPTION("BadMethodCallException",
|
||||
zend_throw_exception_ex(spl_ce_BadMethodCallException,
|
||||
0 TSRMLS_CC,
|
||||
"Attempt to read from a closed MaxMind DB.");
|
||||
return 1;
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
struct addrinfo hints = {
|
||||
.ai_family = AF_UNSPEC,
|
||||
.ai_flags = AI_NUMERICHOST,
|
||||
// We set ai_socktype so that we only get one result back
|
||||
/* We set ai_socktype so that we only get one result back */
|
||||
.ai_socktype = SOCK_STREAM};
|
||||
|
||||
struct addrinfo *addresses = NULL;
|
||||
int gai_status = getaddrinfo(ip_address, NULL, &hints, &addresses);
|
||||
if (gai_status) {
|
||||
THROW_EXCEPTION("InvalidArgumentException",
|
||||
zend_throw_exception_ex(spl_ce_InvalidArgumentException,
|
||||
0 TSRMLS_CC,
|
||||
"The value \"%s\" is not a valid IP address.",
|
||||
ip_address);
|
||||
return 1;
|
||||
return FAILURE;
|
||||
}
|
||||
if (!addresses || !addresses->ai_addr) {
|
||||
THROW_EXCEPTION(
|
||||
"InvalidArgumentException",
|
||||
zend_throw_exception_ex(
|
||||
spl_ce_InvalidArgumentException,
|
||||
0 TSRMLS_CC,
|
||||
"getaddrinfo was successful but failed to set the addrinfo");
|
||||
return 1;
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
int sa_family = addresses->ai_addr->sa_family;
|
||||
@ -269,131 +250,126 @@ get_record(INTERNAL_FUNCTION_PARAMETERS, zval *record, int *prefix_len) {
|
||||
freeaddrinfo(addresses);
|
||||
|
||||
if (MMDB_SUCCESS != mmdb_error) {
|
||||
char *exception_name;
|
||||
zend_class_entry *ex;
|
||||
if (MMDB_IPV6_LOOKUP_IN_IPV4_DATABASE_ERROR == mmdb_error) {
|
||||
exception_name = "InvalidArgumentException";
|
||||
ex = spl_ce_InvalidArgumentException;
|
||||
} else {
|
||||
exception_name = PHP_MAXMINDDB_READER_EX_NS;
|
||||
ex = maxminddb_exception_ce;
|
||||
}
|
||||
THROW_EXCEPTION(exception_name,
|
||||
zend_throw_exception_ex(ex,
|
||||
0 TSRMLS_CC,
|
||||
"Error looking up %s. %s",
|
||||
ip_address,
|
||||
MMDB_strerror(mmdb_error));
|
||||
return 1;
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
*prefix_len = result.netmask;
|
||||
|
||||
if (sa_family == AF_INET && mmdb->metadata.ip_version == 6) {
|
||||
// We return the prefix length given the IPv4 address. If there is
|
||||
// no IPv4 subtree, we return a prefix length of 0.
|
||||
/* We return the prefix length given the IPv4 address. If there is
|
||||
no IPv4 subtree, we return a prefix length of 0. */
|
||||
*prefix_len = *prefix_len >= 96 ? *prefix_len - 96 : 0;
|
||||
}
|
||||
|
||||
if (!result.found_entry) {
|
||||
ZVAL_NULL(record);
|
||||
return 0;
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
MMDB_entry_data_list_s *entry_data_list = NULL;
|
||||
int status = MMDB_get_entry_data_list(&result.entry, &entry_data_list);
|
||||
|
||||
if (MMDB_SUCCESS != status) {
|
||||
THROW_EXCEPTION(PHP_MAXMINDDB_READER_EX_NS,
|
||||
zend_throw_exception_ex(maxminddb_exception_ce,
|
||||
0 TSRMLS_CC,
|
||||
"Error while looking up data for %s. %s",
|
||||
ip_address,
|
||||
MMDB_strerror(status));
|
||||
MMDB_free_entry_data_list(entry_data_list);
|
||||
return 1;
|
||||
return FAILURE;
|
||||
} else if (NULL == entry_data_list) {
|
||||
THROW_EXCEPTION(PHP_MAXMINDDB_READER_EX_NS,
|
||||
zend_throw_exception_ex(
|
||||
maxminddb_exception_ce,
|
||||
0 TSRMLS_CC,
|
||||
"Error while looking up data for %s. Your database may "
|
||||
"be corrupt or you have found a bug in libmaxminddb.",
|
||||
ip_address);
|
||||
return 1;
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
const MMDB_entry_data_list_s *rv =
|
||||
handle_entry_data_list(entry_data_list, record TSRMLS_CC);
|
||||
if (rv == NULL) {
|
||||
/* We should have already thrown the exception in handle_entry_data_list
|
||||
*/
|
||||
return FAILURE;
|
||||
}
|
||||
MMDB_free_entry_data_list(entry_data_list);
|
||||
return 0;
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_maxmindbreader_void, 0, 0, 0)
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_maxminddbreader_void, 0, 0, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
PHP_METHOD(MaxMind_Db_Reader, metadata) {
|
||||
if (ZEND_NUM_ARGS() != 0) {
|
||||
THROW_EXCEPTION("InvalidArgumentException",
|
||||
"Method takes no arguments.");
|
||||
zval *this_zval = NULL;
|
||||
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
|
||||
getThis(),
|
||||
"O",
|
||||
&this_zval,
|
||||
maxminddb_ce) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
const maxminddb_obj *const mmdb_obj =
|
||||
(maxminddb_obj *)Z_MAXMINDDB_P(getThis());
|
||||
(maxminddb_obj *)Z_MAXMINDDB_P(this_zval);
|
||||
|
||||
if (NULL == mmdb_obj->mmdb) {
|
||||
THROW_EXCEPTION("BadMethodCallException",
|
||||
zend_throw_exception_ex(spl_ce_BadMethodCallException,
|
||||
0 TSRMLS_CC,
|
||||
"Attempt to read from a closed MaxMind DB.");
|
||||
return;
|
||||
}
|
||||
|
||||
const char *const name = ZEND_NS_NAME(PHP_MAXMINDDB_READER_NS, "Metadata");
|
||||
zend_class_entry *metadata_ce = lookup_class(name TSRMLS_CC);
|
||||
|
||||
object_init_ex(return_value, metadata_ce);
|
||||
|
||||
#ifdef ZEND_ENGINE_3
|
||||
zval _metadata_array;
|
||||
zval *metadata_array = &_metadata_array;
|
||||
ZVAL_NULL(metadata_array);
|
||||
#else
|
||||
zval *metadata_array;
|
||||
ALLOC_INIT_ZVAL(metadata_array);
|
||||
#endif
|
||||
|
||||
MMDB_entry_data_list_s *entry_data_list;
|
||||
MMDB_get_metadata_as_entry_data_list(mmdb_obj->mmdb, &entry_data_list);
|
||||
|
||||
handle_entry_data_list(entry_data_list, metadata_array TSRMLS_CC);
|
||||
zval metadata_array;
|
||||
const MMDB_entry_data_list_s *rv =
|
||||
handle_entry_data_list(entry_data_list, &metadata_array TSRMLS_CC);
|
||||
if (rv == NULL) {
|
||||
return;
|
||||
}
|
||||
MMDB_free_entry_data_list(entry_data_list);
|
||||
#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),
|
||||
metadata_ce,
|
||||
&metadata_ce->constructor,
|
||||
ZEND_CONSTRUCTOR_FUNC_NAME,
|
||||
NULL,
|
||||
metadata_array);
|
||||
zval_ptr_dtor(metadata_array);
|
||||
#elif defined(ZEND_ENGINE_3)
|
||||
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);
|
||||
#else
|
||||
zend_call_method_with_1_params(&return_value,
|
||||
metadata_ce,
|
||||
&metadata_ce->constructor,
|
||||
ZEND_CONSTRUCTOR_FUNC_NAME,
|
||||
NULL,
|
||||
metadata_array);
|
||||
&metadata_array);
|
||||
zval_ptr_dtor(&metadata_array);
|
||||
#endif
|
||||
}
|
||||
|
||||
PHP_METHOD(MaxMind_Db_Reader, close) {
|
||||
if (ZEND_NUM_ARGS() != 0) {
|
||||
THROW_EXCEPTION("InvalidArgumentException",
|
||||
"Method takes no arguments.");
|
||||
zval *this_zval = NULL;
|
||||
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
|
||||
getThis(),
|
||||
"O",
|
||||
&this_zval,
|
||||
maxminddb_ce) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
maxminddb_obj *mmdb_obj = (maxminddb_obj *)Z_MAXMINDDB_P(getThis());
|
||||
maxminddb_obj *mmdb_obj = (maxminddb_obj *)Z_MAXMINDDB_P(this_zval);
|
||||
|
||||
if (NULL == mmdb_obj->mmdb) {
|
||||
THROW_EXCEPTION("BadMethodCallException",
|
||||
zend_throw_exception_ex(spl_ce_BadMethodCallException,
|
||||
0 TSRMLS_CC,
|
||||
"Attempt to close a closed MaxMind DB.");
|
||||
return;
|
||||
}
|
||||
@ -411,12 +387,12 @@ handle_entry_data_list(const MMDB_entry_data_list_s *entry_data_list,
|
||||
case MMDB_DATA_TYPE_ARRAY:
|
||||
return handle_array(entry_data_list, z_value TSRMLS_CC);
|
||||
case MMDB_DATA_TYPE_UTF8_STRING:
|
||||
_ZVAL_STRINGL(z_value,
|
||||
ZVAL_STRINGL(z_value,
|
||||
(char *)entry_data_list->entry_data.utf8_string,
|
||||
entry_data_list->entry_data.data_size);
|
||||
break;
|
||||
case MMDB_DATA_TYPE_BYTES:
|
||||
_ZVAL_STRINGL(z_value,
|
||||
ZVAL_STRINGL(z_value,
|
||||
(char *)entry_data_list->entry_data.bytes,
|
||||
entry_data_list->entry_data.data_size);
|
||||
break;
|
||||
@ -445,7 +421,8 @@ handle_entry_data_list(const MMDB_entry_data_list_s *entry_data_list,
|
||||
ZVAL_LONG(z_value, entry_data_list->entry_data.int32);
|
||||
break;
|
||||
default:
|
||||
THROW_EXCEPTION(PHP_MAXMINDDB_READER_EX_NS,
|
||||
zend_throw_exception_ex(maxminddb_exception_ce,
|
||||
0 TSRMLS_CC,
|
||||
"Invalid data type arguments: %d",
|
||||
entry_data_list->entry_data.type);
|
||||
return NULL;
|
||||
@ -459,30 +436,26 @@ handle_map(const MMDB_entry_data_list_s *entry_data_list,
|
||||
array_init(z_value);
|
||||
const uint32_t map_size = entry_data_list->entry_data.data_size;
|
||||
|
||||
uint i;
|
||||
uint32_t i;
|
||||
for (i = 0; i < map_size && entry_data_list; i++) {
|
||||
entry_data_list = entry_data_list->next;
|
||||
|
||||
char *key = estrndup((char *)entry_data_list->entry_data.utf8_string,
|
||||
entry_data_list->entry_data.data_size);
|
||||
if (NULL == key) {
|
||||
THROW_EXCEPTION(PHP_MAXMINDDB_READER_EX_NS,
|
||||
zend_throw_exception_ex(maxminddb_exception_ce,
|
||||
0 TSRMLS_CC,
|
||||
"Invalid data type arguments");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
entry_data_list = entry_data_list->next;
|
||||
#ifdef ZEND_ENGINE_3
|
||||
zval _new_value;
|
||||
zval *new_value = &_new_value;
|
||||
ZVAL_NULL(new_value);
|
||||
#else
|
||||
zval *new_value;
|
||||
ALLOC_INIT_ZVAL(new_value);
|
||||
#endif
|
||||
zval new_value;
|
||||
entry_data_list =
|
||||
handle_entry_data_list(entry_data_list, new_value TSRMLS_CC);
|
||||
add_assoc_zval(z_value, key, new_value);
|
||||
handle_entry_data_list(entry_data_list, &new_value TSRMLS_CC);
|
||||
if (entry_data_list != NULL) {
|
||||
add_assoc_zval(z_value, key, &new_value);
|
||||
}
|
||||
efree(key);
|
||||
}
|
||||
return entry_data_list;
|
||||
@ -495,20 +468,15 @@ handle_array(const MMDB_entry_data_list_s *entry_data_list,
|
||||
|
||||
array_init(z_value);
|
||||
|
||||
uint i;
|
||||
uint32_t i;
|
||||
for (i = 0; i < size && entry_data_list; i++) {
|
||||
entry_data_list = entry_data_list->next;
|
||||
#ifdef ZEND_ENGINE_3
|
||||
zval _new_value;
|
||||
zval *new_value = &_new_value;
|
||||
ZVAL_NULL(new_value);
|
||||
#else
|
||||
zval *new_value;
|
||||
ALLOC_INIT_ZVAL(new_value);
|
||||
#endif
|
||||
zval new_value;
|
||||
entry_data_list =
|
||||
handle_entry_data_list(entry_data_list, new_value TSRMLS_CC);
|
||||
add_next_index_zval(z_value, new_value);
|
||||
handle_entry_data_list(entry_data_list, &new_value TSRMLS_CC);
|
||||
if (entry_data_list != NULL) {
|
||||
add_next_index_zval(z_value, &new_value);
|
||||
}
|
||||
}
|
||||
return entry_data_list;
|
||||
}
|
||||
@ -535,7 +503,7 @@ static void handle_uint128(const MMDB_entry_data_list_s *entry_data_list,
|
||||
spprintf(&num_str, 0, "0x%016" PRIX64 "%016" PRIX64, high, low);
|
||||
CHECK_ALLOCATED(num_str);
|
||||
|
||||
_ZVAL_STRING(z_value, num_str);
|
||||
ZVAL_STRING(z_value, num_str);
|
||||
efree(num_str);
|
||||
}
|
||||
|
||||
@ -556,7 +524,7 @@ static void handle_uint32(const MMDB_entry_data_list_s *entry_data_list,
|
||||
spprintf(&int_str, 0, "%" PRIu32, val);
|
||||
CHECK_ALLOCATED(int_str);
|
||||
|
||||
_ZVAL_STRING(z_value, int_str);
|
||||
ZVAL_STRING(z_value, int_str);
|
||||
efree(int_str);
|
||||
#endif
|
||||
}
|
||||
@ -578,29 +546,11 @@ static void handle_uint64(const MMDB_entry_data_list_s *entry_data_list,
|
||||
spprintf(&int_str, 0, "%" PRIu64, val);
|
||||
CHECK_ALLOCATED(int_str);
|
||||
|
||||
_ZVAL_STRING(z_value, int_str);
|
||||
ZVAL_STRING(z_value, int_str);
|
||||
efree(int_str);
|
||||
#endif
|
||||
}
|
||||
|
||||
static zend_class_entry *lookup_class(const char *name TSRMLS_DC) {
|
||||
#ifdef ZEND_ENGINE_3
|
||||
zend_string *n = zend_string_init(name, strlen(name), 0);
|
||||
zend_class_entry *ce = zend_lookup_class(n);
|
||||
zend_string_release(n);
|
||||
if (NULL == ce) {
|
||||
zend_error(E_ERROR, "Class %s not found", name);
|
||||
}
|
||||
return ce;
|
||||
#else
|
||||
zend_class_entry **ce;
|
||||
if (FAILURE == zend_lookup_class(name, strlen(name), &ce TSRMLS_CC)) {
|
||||
zend_error(E_ERROR, "Class %s not found", name);
|
||||
}
|
||||
return *ce;
|
||||
#endif
|
||||
}
|
||||
|
||||
static void maxminddb_free_storage(free_obj_t *object TSRMLS_DC) {
|
||||
maxminddb_obj *obj =
|
||||
php_maxminddb_fetch_object((zend_object *)object TSRMLS_CC);
|
||||
@ -610,12 +560,8 @@ static void maxminddb_free_storage(free_obj_t *object TSRMLS_DC) {
|
||||
}
|
||||
|
||||
zend_object_std_dtor(&obj->std TSRMLS_CC);
|
||||
#ifndef ZEND_ENGINE_3
|
||||
efree(object);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef ZEND_ENGINE_3
|
||||
static zend_object *maxminddb_create_handler(zend_class_entry *type TSRMLS_DC) {
|
||||
maxminddb_obj *obj = (maxminddb_obj *)ecalloc(1, sizeof(maxminddb_obj));
|
||||
zend_object_std_init(&obj->std, type TSRMLS_CC);
|
||||
@ -625,31 +571,154 @@ static zend_object *maxminddb_create_handler(zend_class_entry *type TSRMLS_DC) {
|
||||
|
||||
return &obj->std;
|
||||
}
|
||||
#else
|
||||
static zend_object_value
|
||||
maxminddb_create_handler(zend_class_entry *type TSRMLS_DC) {
|
||||
zend_object_value retval;
|
||||
|
||||
maxminddb_obj *obj = (maxminddb_obj *)ecalloc(1, sizeof(maxminddb_obj));
|
||||
zend_object_std_init(&obj->std, type TSRMLS_CC);
|
||||
object_properties_init(&(obj->std), type);
|
||||
/* clang-format off */
|
||||
static zend_function_entry maxminddb_methods[] = {
|
||||
PHP_ME(MaxMind_Db_Reader, __construct, arginfo_maxminddbreader_construct,
|
||||
ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
|
||||
PHP_ME(MaxMind_Db_Reader, close, arginfo_maxminddbreader_void, ZEND_ACC_PUBLIC)
|
||||
PHP_ME(MaxMind_Db_Reader, get, arginfo_maxminddbreader_get, ZEND_ACC_PUBLIC)
|
||||
PHP_ME(MaxMind_Db_Reader, getWithPrefixLen, arginfo_maxminddbreader_getWithPrefixLen, ZEND_ACC_PUBLIC)
|
||||
PHP_ME(MaxMind_Db_Reader, metadata, arginfo_maxminddbreader_void, ZEND_ACC_PUBLIC)
|
||||
{ NULL, NULL, NULL }
|
||||
};
|
||||
/* clang-format on */
|
||||
|
||||
retval.handle = zend_objects_store_put(
|
||||
obj, NULL, maxminddb_free_storage, NULL TSRMLS_CC);
|
||||
retval.handlers = &maxminddb_obj_handlers;
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_metadata_construct, 0, 0, 1)
|
||||
ZEND_ARG_TYPE_INFO(0, metadata, IS_ARRAY, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
return retval;
|
||||
PHP_METHOD(MaxMind_Db_Reader_Metadata, __construct) {
|
||||
zval *object = NULL;
|
||||
zval *metadata_array = NULL;
|
||||
zend_long node_count = 0;
|
||||
zend_long record_size = 0;
|
||||
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
|
||||
getThis(),
|
||||
"Oa",
|
||||
&object,
|
||||
metadata_ce,
|
||||
&metadata_array) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
zval *tmp = NULL;
|
||||
if ((tmp = zend_hash_str_find(HASH_OF(metadata_array),
|
||||
"binary_format_major_version",
|
||||
sizeof("binary_format_major_version") - 1))) {
|
||||
zend_update_property(metadata_ce,
|
||||
PROP_OBJ(object),
|
||||
"binaryFormatMajorVersion",
|
||||
sizeof("binaryFormatMajorVersion") - 1,
|
||||
tmp);
|
||||
}
|
||||
|
||||
if ((tmp = zend_hash_str_find(HASH_OF(metadata_array),
|
||||
"binary_format_minor_version",
|
||||
sizeof("binary_format_minor_version") - 1))) {
|
||||
zend_update_property(metadata_ce,
|
||||
PROP_OBJ(object),
|
||||
"binaryFormatMinorVersion",
|
||||
sizeof("binaryFormatMinorVersion") - 1,
|
||||
tmp);
|
||||
}
|
||||
|
||||
if ((tmp = zend_hash_str_find(HASH_OF(metadata_array),
|
||||
"build_epoch",
|
||||
sizeof("build_epoch") - 1))) {
|
||||
zend_update_property(metadata_ce,
|
||||
PROP_OBJ(object),
|
||||
"buildEpoch",
|
||||
sizeof("buildEpoch") - 1,
|
||||
tmp);
|
||||
}
|
||||
|
||||
if ((tmp = zend_hash_str_find(HASH_OF(metadata_array),
|
||||
"database_type",
|
||||
sizeof("database_type") - 1))) {
|
||||
zend_update_property(metadata_ce,
|
||||
PROP_OBJ(object),
|
||||
"databaseType",
|
||||
sizeof("databaseType") - 1,
|
||||
tmp);
|
||||
}
|
||||
|
||||
if ((tmp = zend_hash_str_find(HASH_OF(metadata_array),
|
||||
"description",
|
||||
sizeof("description") - 1))) {
|
||||
zend_update_property(metadata_ce,
|
||||
PROP_OBJ(object),
|
||||
"description",
|
||||
sizeof("description") - 1,
|
||||
tmp);
|
||||
}
|
||||
|
||||
if ((tmp = zend_hash_str_find(HASH_OF(metadata_array),
|
||||
"ip_version",
|
||||
sizeof("ip_version") - 1))) {
|
||||
zend_update_property(metadata_ce,
|
||||
PROP_OBJ(object),
|
||||
"ipVersion",
|
||||
sizeof("ipVersion") - 1,
|
||||
tmp);
|
||||
}
|
||||
|
||||
if ((tmp = zend_hash_str_find(
|
||||
HASH_OF(metadata_array), "languages", sizeof("languages") - 1))) {
|
||||
zend_update_property(metadata_ce,
|
||||
PROP_OBJ(object),
|
||||
"languages",
|
||||
sizeof("languages") - 1,
|
||||
tmp);
|
||||
}
|
||||
|
||||
if ((tmp = zend_hash_str_find(HASH_OF(metadata_array),
|
||||
"record_size",
|
||||
sizeof("record_size") - 1))) {
|
||||
zend_update_property(metadata_ce,
|
||||
PROP_OBJ(object),
|
||||
"recordSize",
|
||||
sizeof("recordSize") - 1,
|
||||
tmp);
|
||||
if (Z_TYPE_P(tmp) == IS_LONG) {
|
||||
record_size = Z_LVAL_P(tmp);
|
||||
}
|
||||
}
|
||||
|
||||
if (record_size != 0) {
|
||||
zend_update_property_long(metadata_ce,
|
||||
PROP_OBJ(object),
|
||||
"nodeByteSize",
|
||||
sizeof("nodeByteSize") - 1,
|
||||
record_size / 4);
|
||||
}
|
||||
|
||||
if ((tmp = zend_hash_str_find(HASH_OF(metadata_array),
|
||||
"node_count",
|
||||
sizeof("node_count") - 1))) {
|
||||
zend_update_property(metadata_ce,
|
||||
PROP_OBJ(object),
|
||||
"nodeCount",
|
||||
sizeof("nodeCount") - 1,
|
||||
tmp);
|
||||
if (Z_TYPE_P(tmp) == IS_LONG) {
|
||||
node_count = Z_LVAL_P(tmp);
|
||||
}
|
||||
}
|
||||
|
||||
if (record_size != 0) {
|
||||
zend_update_property_long(metadata_ce,
|
||||
PROP_OBJ(object),
|
||||
"searchTreeSize",
|
||||
sizeof("searchTreeSize") - 1,
|
||||
record_size * node_count / 4);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// clang-format off
|
||||
static zend_function_entry maxminddb_methods[] = {
|
||||
PHP_ME(MaxMind_Db_Reader, __construct, arginfo_maxmindbreader_construct,
|
||||
ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
|
||||
PHP_ME(MaxMind_Db_Reader, close, arginfo_maxmindbreader_void, ZEND_ACC_PUBLIC)
|
||||
PHP_ME(MaxMind_Db_Reader, get, arginfo_maxmindbreader_get, ZEND_ACC_PUBLIC)
|
||||
PHP_ME(MaxMind_Db_Reader, getWithPrefixLen, arginfo_maxmindbreader_get, ZEND_ACC_PUBLIC)
|
||||
PHP_ME(MaxMind_Db_Reader, metadata, arginfo_maxmindbreader_void, ZEND_ACC_PUBLIC)
|
||||
static zend_function_entry metadata_methods[] = {
|
||||
PHP_ME(MaxMind_Db_Reader_Metadata, __construct, arginfo_metadata_construct, ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
|
||||
{NULL, NULL, NULL}
|
||||
};
|
||||
// clang-format on
|
||||
@ -657,17 +726,55 @@ static zend_function_entry maxminddb_methods[] = {
|
||||
PHP_MINIT_FUNCTION(maxminddb) {
|
||||
zend_class_entry ce;
|
||||
|
||||
INIT_CLASS_ENTRY(ce, PHP_MAXMINDDB_READER_EX_NS, NULL);
|
||||
maxminddb_exception_ce =
|
||||
zend_register_internal_class_ex(&ce, zend_ce_exception);
|
||||
|
||||
INIT_CLASS_ENTRY(ce, PHP_MAXMINDDB_READER_NS, maxminddb_methods);
|
||||
maxminddb_ce = zend_register_internal_class(&ce TSRMLS_CC);
|
||||
maxminddb_ce->create_object = maxminddb_create_handler;
|
||||
|
||||
INIT_CLASS_ENTRY(ce, PHP_MAXMINDDB_METADATA_NS, metadata_methods);
|
||||
metadata_ce = zend_register_internal_class(&ce TSRMLS_CC);
|
||||
zend_declare_property_null(metadata_ce,
|
||||
"binaryFormatMajorVersion",
|
||||
sizeof("binaryFormatMajorVersion") - 1,
|
||||
ZEND_ACC_PUBLIC);
|
||||
zend_declare_property_null(metadata_ce,
|
||||
"binaryFormatMinorVersion",
|
||||
sizeof("binaryFormatMinorVersion") - 1,
|
||||
ZEND_ACC_PUBLIC);
|
||||
zend_declare_property_null(
|
||||
metadata_ce, "buildEpoch", sizeof("buildEpoch") - 1, ZEND_ACC_PUBLIC);
|
||||
zend_declare_property_null(metadata_ce,
|
||||
"databaseType",
|
||||
sizeof("databaseType") - 1,
|
||||
ZEND_ACC_PUBLIC);
|
||||
zend_declare_property_null(
|
||||
metadata_ce, "description", sizeof("description") - 1, ZEND_ACC_PUBLIC);
|
||||
zend_declare_property_null(
|
||||
metadata_ce, "ipVersion", sizeof("ipVersion") - 1, ZEND_ACC_PUBLIC);
|
||||
zend_declare_property_null(
|
||||
metadata_ce, "languages", sizeof("languages") - 1, ZEND_ACC_PUBLIC);
|
||||
zend_declare_property_null(metadata_ce,
|
||||
"nodeByteSize",
|
||||
sizeof("nodeByteSize") - 1,
|
||||
ZEND_ACC_PUBLIC);
|
||||
zend_declare_property_null(
|
||||
metadata_ce, "nodeCount", sizeof("nodeCount") - 1, ZEND_ACC_PUBLIC);
|
||||
zend_declare_property_null(
|
||||
metadata_ce, "recordSize", sizeof("recordSize") - 1, ZEND_ACC_PUBLIC);
|
||||
zend_declare_property_null(metadata_ce,
|
||||
"searchTreeSize",
|
||||
sizeof("searchTreeSize") - 1,
|
||||
ZEND_ACC_PUBLIC);
|
||||
|
||||
memcpy(&maxminddb_obj_handlers,
|
||||
zend_get_std_object_handlers(),
|
||||
sizeof(zend_object_handlers));
|
||||
maxminddb_obj_handlers.clone_obj = NULL;
|
||||
#ifdef ZEND_ENGINE_3
|
||||
maxminddb_obj_handlers.offset = XtOffsetOf(maxminddb_obj, std);
|
||||
maxminddb_obj_handlers.free_obj = maxminddb_free_storage;
|
||||
#endif
|
||||
zend_declare_class_constant_string(maxminddb_ce,
|
||||
"MMDB_LIB_VERSION",
|
||||
sizeof("MMDB_LIB_VERSION") - 1,
|
||||
|
138
vendor/maxmind-db/reader/src/MaxMind/Db/Reader.php
vendored
138
vendor/maxmind-db/reader/src/MaxMind/Db/Reader.php
vendored
@ -1,7 +1,10 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace MaxMind\Db;
|
||||
|
||||
use ArgumentCountError;
|
||||
use BadMethodCallException;
|
||||
use Exception;
|
||||
use InvalidArgumentException;
|
||||
@ -17,15 +20,42 @@ use UnexpectedValueException;
|
||||
*/
|
||||
class Reader
|
||||
{
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
private static $DATA_SECTION_SEPARATOR_SIZE = 16;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private static $METADATA_START_MARKER = "\xAB\xCD\xEFMaxMind.com";
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
private static $METADATA_START_MARKER_LENGTH = 14;
|
||||
private static $METADATA_MAX_SIZE = 131072; // 128 * 1024 = 128KB
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
private static $METADATA_MAX_SIZE = 131072; // 128 * 1024 = 128KiB
|
||||
|
||||
/**
|
||||
* @var Decoder
|
||||
*/
|
||||
private $decoder;
|
||||
/**
|
||||
* @var resource
|
||||
*/
|
||||
private $fileHandle;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
private $fileSize;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
private $ipV4Start;
|
||||
/**
|
||||
* @var Metadata
|
||||
*/
|
||||
private $metadata;
|
||||
|
||||
/**
|
||||
@ -36,39 +66,37 @@ class Reader
|
||||
* the MaxMind DB file to use
|
||||
*
|
||||
* @throws InvalidArgumentException for invalid database path or unknown arguments
|
||||
* @throws \MaxMind\Db\Reader\InvalidDatabaseException
|
||||
* @throws InvalidDatabaseException
|
||||
* if the database is invalid or there is an error reading
|
||||
* from it
|
||||
*/
|
||||
public function __construct($database)
|
||||
public function __construct(string $database)
|
||||
{
|
||||
if (\func_num_args() !== 1) {
|
||||
throw new InvalidArgumentException(
|
||||
'The constructor takes exactly one argument.'
|
||||
throw new ArgumentCountError(
|
||||
sprintf('%s() expects exactly 1 parameter, %d given', __METHOD__, \func_num_args())
|
||||
);
|
||||
}
|
||||
|
||||
if (!is_readable($database)) {
|
||||
$fileHandle = @fopen($database, 'rb');
|
||||
if ($fileHandle === false) {
|
||||
throw new InvalidArgumentException(
|
||||
"The file \"$database\" does not exist or is not readable."
|
||||
);
|
||||
}
|
||||
$this->fileHandle = @fopen($database, 'rb');
|
||||
if ($this->fileHandle === false) {
|
||||
throw new InvalidArgumentException(
|
||||
"Error opening \"$database\"."
|
||||
);
|
||||
}
|
||||
$this->fileSize = @filesize($database);
|
||||
if ($this->fileSize === false) {
|
||||
$this->fileHandle = $fileHandle;
|
||||
|
||||
$fileSize = @filesize($database);
|
||||
if ($fileSize === false) {
|
||||
throw new UnexpectedValueException(
|
||||
"Error determining the size of \"$database\"."
|
||||
);
|
||||
}
|
||||
$this->fileSize = $fileSize;
|
||||
|
||||
$start = $this->findMetadataStart($database);
|
||||
$metadataDecoder = new Decoder($this->fileHandle, $start);
|
||||
list($metadataArray) = $metadataDecoder->decode($start);
|
||||
[$metadataArray] = $metadataDecoder->decode($start);
|
||||
$this->metadata = new Metadata($metadataArray);
|
||||
$this->decoder = new Decoder(
|
||||
$this->fileHandle,
|
||||
@ -91,14 +119,14 @@ class Reader
|
||||
*
|
||||
* @return mixed the record for the IP address
|
||||
*/
|
||||
public function get($ipAddress)
|
||||
public function get(string $ipAddress)
|
||||
{
|
||||
if (\func_num_args() !== 1) {
|
||||
throw new InvalidArgumentException(
|
||||
'Method takes exactly one argument.'
|
||||
throw new ArgumentCountError(
|
||||
sprintf('%s() expects exactly 1 parameter, %d given', __METHOD__, \func_num_args())
|
||||
);
|
||||
}
|
||||
list($record) = $this->getWithPrefixLen($ipAddress);
|
||||
[$record] = $this->getWithPrefixLen($ipAddress);
|
||||
|
||||
return $record;
|
||||
}
|
||||
@ -118,11 +146,11 @@ class Reader
|
||||
* @return array an array where the first element is the record and the
|
||||
* second the network prefix length for the record
|
||||
*/
|
||||
public function getWithPrefixLen($ipAddress)
|
||||
public function getWithPrefixLen(string $ipAddress): array
|
||||
{
|
||||
if (\func_num_args() !== 1) {
|
||||
throw new InvalidArgumentException(
|
||||
'Method takes exactly one argument.'
|
||||
throw new ArgumentCountError(
|
||||
sprintf('%s() expects exactly 1 parameter, %d given', __METHOD__, \func_num_args())
|
||||
);
|
||||
}
|
||||
|
||||
@ -132,13 +160,7 @@ class Reader
|
||||
);
|
||||
}
|
||||
|
||||
if (!filter_var($ipAddress, FILTER_VALIDATE_IP)) {
|
||||
throw new InvalidArgumentException(
|
||||
"The value \"$ipAddress\" is not a valid IP address."
|
||||
);
|
||||
}
|
||||
|
||||
list($pointer, $prefixLen) = $this->findAddressInTree($ipAddress);
|
||||
[$pointer, $prefixLen] = $this->findAddressInTree($ipAddress);
|
||||
if ($pointer === 0) {
|
||||
return [null, $prefixLen];
|
||||
}
|
||||
@ -146,9 +168,16 @@ class Reader
|
||||
return [$this->resolveDataPointer($pointer), $prefixLen];
|
||||
}
|
||||
|
||||
private function findAddressInTree($ipAddress)
|
||||
private function findAddressInTree(string $ipAddress): array
|
||||
{
|
||||
$rawAddress = unpack('C*', inet_pton($ipAddress));
|
||||
$packedAddr = @inet_pton($ipAddress);
|
||||
if ($packedAddr === false) {
|
||||
throw new InvalidArgumentException(
|
||||
"The value \"$ipAddress\" is not a valid IP address."
|
||||
);
|
||||
}
|
||||
|
||||
$rawAddress = unpack('C*', $packedAddr);
|
||||
|
||||
$bitCount = \count($rawAddress) * 8;
|
||||
|
||||
@ -182,14 +211,18 @@ class Reader
|
||||
if ($node === $nodeCount) {
|
||||
// Record is empty
|
||||
return [0, $i];
|
||||
} elseif ($node > $nodeCount) {
|
||||
}
|
||||
if ($node > $nodeCount) {
|
||||
// Record is a data pointer
|
||||
return [$node, $i];
|
||||
}
|
||||
throw new InvalidDatabaseException('Something bad happened');
|
||||
|
||||
throw new InvalidDatabaseException(
|
||||
'Invalid or corrupt database. Maximum search depth reached without finding a leaf node'
|
||||
);
|
||||
}
|
||||
|
||||
private function ipV4StartNode()
|
||||
private function ipV4StartNode(): int
|
||||
{
|
||||
// If we have an IPv4 database, the start node is the first node
|
||||
if ($this->metadata->ipVersion === 4) {
|
||||
@ -205,16 +238,17 @@ class Reader
|
||||
return $node;
|
||||
}
|
||||
|
||||
private function readNode($nodeNumber, $index)
|
||||
private function readNode(int $nodeNumber, int $index): int
|
||||
{
|
||||
$baseOffset = $nodeNumber * $this->metadata->nodeByteSize;
|
||||
|
||||
switch ($this->metadata->recordSize) {
|
||||
case 24:
|
||||
$bytes = Util::read($this->fileHandle, $baseOffset + $index * 3, 3);
|
||||
list(, $node) = unpack('N', "\x00" . $bytes);
|
||||
[, $node] = unpack('N', "\x00" . $bytes);
|
||||
|
||||
return $node;
|
||||
|
||||
case 28:
|
||||
$bytes = Util::read($this->fileHandle, $baseOffset + 3 * $index, 4);
|
||||
if ($index === 0) {
|
||||
@ -222,14 +256,16 @@ class Reader
|
||||
} else {
|
||||
$middle = 0x0F & \ord($bytes[0]);
|
||||
}
|
||||
list(, $node) = unpack('N', \chr($middle) . substr($bytes, $index, 3));
|
||||
[, $node] = unpack('N', \chr($middle) . substr($bytes, $index, 3));
|
||||
|
||||
return $node;
|
||||
|
||||
case 32:
|
||||
$bytes = Util::read($this->fileHandle, $baseOffset + $index * 4, 4);
|
||||
list(, $node) = unpack('N', $bytes);
|
||||
[, $node] = unpack('N', $bytes);
|
||||
|
||||
return $node;
|
||||
|
||||
default:
|
||||
throw new InvalidDatabaseException(
|
||||
'Unknown record size: '
|
||||
@ -238,7 +274,10 @@ class Reader
|
||||
}
|
||||
}
|
||||
|
||||
private function resolveDataPointer($pointer)
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
private function resolveDataPointer(int $pointer)
|
||||
{
|
||||
$resolved = $pointer - $this->metadata->nodeCount
|
||||
+ $this->metadata->searchTreeSize;
|
||||
@ -248,7 +287,7 @@ class Reader
|
||||
);
|
||||
}
|
||||
|
||||
list($data) = $this->decoder->decode($resolved);
|
||||
[$data] = $this->decoder->decode($resolved);
|
||||
|
||||
return $data;
|
||||
}
|
||||
@ -258,7 +297,7 @@ class Reader
|
||||
* are much faster algorithms (e.g., Boyer-Moore) for this if speed is ever
|
||||
* an issue, but I suspect it won't be.
|
||||
*/
|
||||
private function findMetadataStart($filename)
|
||||
private function findMetadataStart(string $filename): int
|
||||
{
|
||||
$handle = $this->fileHandle;
|
||||
$fstat = fstat($handle);
|
||||
@ -278,6 +317,7 @@ class Reader
|
||||
return $offset + $markerLength;
|
||||
}
|
||||
}
|
||||
|
||||
throw new InvalidDatabaseException(
|
||||
"Error opening database file ($filename). " .
|
||||
'Is this a valid MaxMind DB file?'
|
||||
@ -290,11 +330,11 @@ class Reader
|
||||
*
|
||||
* @return Metadata object for the database
|
||||
*/
|
||||
public function metadata()
|
||||
public function metadata(): Metadata
|
||||
{
|
||||
if (\func_num_args()) {
|
||||
throw new InvalidArgumentException(
|
||||
'Method takes no arguments.'
|
||||
throw new ArgumentCountError(
|
||||
sprintf('%s() expects exactly 0 parameters, %d given', __METHOD__, \func_num_args())
|
||||
);
|
||||
}
|
||||
|
||||
@ -306,7 +346,7 @@ class Reader
|
||||
);
|
||||
}
|
||||
|
||||
return $this->metadata;
|
||||
return clone $this->metadata;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -315,8 +355,14 @@ class Reader
|
||||
* @throws Exception
|
||||
* if an I/O error occurs
|
||||
*/
|
||||
public function close()
|
||||
public function close(): void
|
||||
{
|
||||
if (\func_num_args()) {
|
||||
throw new ArgumentCountError(
|
||||
sprintf('%s() expects exactly 0 parameters, %d given', __METHOD__, \func_num_args())
|
||||
);
|
||||
}
|
||||
|
||||
if (!\is_resource($this->fileHandle)) {
|
||||
throw new BadMethodCallException(
|
||||
'Attempt to close a closed MaxMind DB.'
|
||||
|
@ -7,13 +7,6 @@ namespace MaxMind\Db\Reader;
|
||||
// @codingStandardsIgnoreLine
|
||||
use RuntimeException;
|
||||
|
||||
/*
|
||||
* @ignore
|
||||
*
|
||||
* We subtract 1 from the log to protect against precision loss.
|
||||
*/
|
||||
\define(__NAMESPACE__ . '\_MM_MAX_INT_BYTES', (int) ((log(\PHP_INT_MAX, 2) - 1) / 8));
|
||||
|
||||
class Decoder
|
||||
{
|
||||
/**
|
||||
@ -316,11 +309,11 @@ class Decoder
|
||||
|
||||
$integer = 0;
|
||||
|
||||
// PHP integers are signed. _MM_MAX_INT_BYTES is the number of
|
||||
// PHP integers are signed. PHP_INT_SIZE - 1 is the number of
|
||||
// complete bytes that can be converted to an integer. However,
|
||||
// we can convert another byte if the leading bit is zero.
|
||||
$useRealInts = $byteLength <= _MM_MAX_INT_BYTES
|
||||
|| ($byteLength === _MM_MAX_INT_BYTES + 1 && (\ord($bytes[0]) & 0x80) === 0);
|
||||
$useRealInts = $byteLength <= \PHP_INT_SIZE - 1
|
||||
|| ($byteLength === \PHP_INT_SIZE && (\ord($bytes[0]) & 0x80) === 0);
|
||||
|
||||
for ($i = 0; $i < $byteLength; ++$i) {
|
||||
$part = \ord($bytes[$i]);
|
||||
@ -344,7 +337,7 @@ class Decoder
|
||||
|
||||
private function sizeFromCtrlByte(int $ctrlByte, int $offset): array
|
||||
{
|
||||
$size = $ctrlByte & 0x1f;
|
||||
$size = $ctrlByte & 0x1F;
|
||||
|
||||
if ($size < 29) {
|
||||
return [$size, $offset];
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace MaxMind\Db\Reader;
|
||||
|
||||
use Exception;
|
||||
|
@ -1,71 +1,100 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace MaxMind\Db\Reader;
|
||||
|
||||
use ArgumentCountError;
|
||||
|
||||
/**
|
||||
* This class provides the metadata for the MaxMind DB file.
|
||||
*
|
||||
* @property int $nodeCount This is an unsigned 32-bit
|
||||
* integer indicating the number of
|
||||
* nodes in the search tree.
|
||||
* @property int $recordSize This is an unsigned 16-bit
|
||||
* integer. It indicates the number
|
||||
* of bits in a record in the search
|
||||
* tree. Note that each node
|
||||
* consists of two records.
|
||||
* @property int $ipVersion This is an unsigned 16-bit
|
||||
* integer which is always 4 or 6.
|
||||
* It indicates whether the database
|
||||
* contains IPv4 or IPv6 address
|
||||
* data.
|
||||
* @property string $databaseType This is a string that indicates
|
||||
* the structure of each data record
|
||||
* associated with an IP address.
|
||||
* The actual definition of these
|
||||
* structures is left up to the
|
||||
* database creator.
|
||||
* @property array $languages An array of strings, each of
|
||||
* which is a language code. A given
|
||||
* record may contain data items
|
||||
* that have been localized to some
|
||||
* or all of these languages. This
|
||||
* may be undefined.
|
||||
* @property int $binaryFormatMajorVersion This is an unsigned 16-bit
|
||||
* integer indicating the major
|
||||
* version number for the database's
|
||||
* binary format.
|
||||
* @property int $binaryFormatMinorVersion This is an unsigned 16-bit
|
||||
* integer indicating the minor
|
||||
* version number for the database's
|
||||
* binary format.
|
||||
* @property int $buildEpoch This is an unsigned 64-bit
|
||||
* integer that contains the
|
||||
* database build timestamp as a
|
||||
* Unix epoch value.
|
||||
* @property array $description This key will always point to a
|
||||
* map (associative array). The keys
|
||||
* of that map will be language
|
||||
* codes, and the values will be a
|
||||
* description in that language as a
|
||||
* UTF-8 string. May be undefined
|
||||
* for some databases.
|
||||
*/
|
||||
class Metadata
|
||||
{
|
||||
private $binaryFormatMajorVersion;
|
||||
private $binaryFormatMinorVersion;
|
||||
private $buildEpoch;
|
||||
private $databaseType;
|
||||
private $description;
|
||||
private $ipVersion;
|
||||
private $languages;
|
||||
private $nodeByteSize;
|
||||
private $nodeCount;
|
||||
private $recordSize;
|
||||
private $searchTreeSize;
|
||||
/**
|
||||
* This is an unsigned 16-bit integer indicating the major version number
|
||||
* for the database's binary format.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
public $binaryFormatMajorVersion;
|
||||
/**
|
||||
* This is an unsigned 16-bit integer indicating the minor version number
|
||||
* for the database's binary format.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
public $binaryFormatMinorVersion;
|
||||
/**
|
||||
* This is an unsigned 64-bit integer that contains the database build
|
||||
* timestamp as a Unix epoch value.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
public $buildEpoch;
|
||||
/**
|
||||
* This is a string that indicates the structure of each data record
|
||||
* associated with an IP address. The actual definition of these
|
||||
* structures is left up to the database creator.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $databaseType;
|
||||
/**
|
||||
* This key will always point to a map (associative array). The keys of
|
||||
* that map will be language codes, and the values will be a description
|
||||
* in that language as a UTF-8 string. May be undefined for some
|
||||
* databases.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $description;
|
||||
/**
|
||||
* This is an unsigned 16-bit integer which is always 4 or 6. It indicates
|
||||
* whether the database contains IPv4 or IPv6 address data.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
public $ipVersion;
|
||||
/**
|
||||
* An array of strings, each of which is a language code. A given record
|
||||
* may contain data items that have been localized to some or all of
|
||||
* these languages. This may be undefined.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $languages;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $nodeByteSize;
|
||||
/**
|
||||
* This is an unsigned 32-bit integer indicating the number of nodes in
|
||||
* the search tree.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
public $nodeCount;
|
||||
/**
|
||||
* This is an unsigned 16-bit integer. It indicates the number of bits in a
|
||||
* record in the search tree. Note that each node consists of two records.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
public $recordSize;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $searchTreeSize;
|
||||
|
||||
public function __construct($metadata)
|
||||
public function __construct(array $metadata)
|
||||
{
|
||||
if (\func_num_args() !== 1) {
|
||||
throw new ArgumentCountError(
|
||||
sprintf('%s() expects exactly 1 parameter, %d given', __METHOD__, \func_num_args())
|
||||
);
|
||||
}
|
||||
|
||||
$this->binaryFormatMajorVersion =
|
||||
$metadata['binary_format_major_version'];
|
||||
$this->binaryFormatMinorVersion =
|
||||
@ -80,9 +109,4 @@ class Metadata
|
||||
$this->nodeByteSize = $this->recordSize / 4;
|
||||
$this->searchTreeSize = $this->nodeCount * $this->nodeByteSize;
|
||||
}
|
||||
|
||||
public function __get($var)
|
||||
{
|
||||
return $this->$var;
|
||||
}
|
||||
}
|
||||
|
@ -1,10 +1,15 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace MaxMind\Db\Reader;
|
||||
|
||||
class Util
|
||||
{
|
||||
public static function read($stream, $offset, $numberOfBytes)
|
||||
/**
|
||||
* @param resource $stream
|
||||
*/
|
||||
public static function read($stream, int $offset, int $numberOfBytes): string
|
||||
{
|
||||
if ($numberOfBytes === 0) {
|
||||
return '';
|
||||
@ -15,10 +20,11 @@ class Util
|
||||
// We check that the number of bytes read is equal to the number
|
||||
// asked for. We use ftell as getting the length of $value is
|
||||
// much slower.
|
||||
if (ftell($stream) - $offset === $numberOfBytes) {
|
||||
if ($value !== false && ftell($stream) - $offset === $numberOfBytes) {
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
|
||||
throw new InvalidDatabaseException(
|
||||
'The MaxMind DB file contains bad data'
|
||||
);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user