Update vendor dependencyjev in minify-a na najnovejso verzijo

This commit is contained in:
pero1203 2021-12-08 09:29:40 +01:00
parent 01747093b1
commit 708e18d031
181 changed files with 2889 additions and 1233 deletions

View File

@ -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)
->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)
;
$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)
->setRiskyAllowed(true)
->setRules($rules)
->setIndent(' ')
->setLineEnding("\n");
// vim:ft=php

View File

@ -0,0 +1,6 @@
---
:major: 3
:minor: 0
:patch: 11
:special: ''
:metadata: ''

View File

@ -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

View File

@ -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.

View File

@ -25,4 +25,4 @@ call_user_func(function () {
require $file;
});
return new \Minify\App(__DIR__);
return new \Minify\App(__DIR__);

View File

@ -0,0 +1,4 @@
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
</IfModule>

View File

@ -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);
}

View File

@ -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.)');
})();

View File

@ -1,4 +1,4 @@
<?php
<?php
$app = (require __DIR__ . '/../bootstrap.php');
/* @var \Minify\App $app */

View File

@ -1,7 +1,7 @@
<?php
/**
* AJAX checks for zlib.output_compression
*
*
* @package Minify
*/
@ -29,7 +29,6 @@ if ($app->env->get('hello')) {
));
$he->encode();
$he->sendAll();
} else {
// echo status "0" or "1"
header('Content-Type: text/plain');

View File

@ -37,7 +37,7 @@ if (isset($_GET['oc'])) {
echo "<p class=topNote><strong>\$_SERVER['SUBDOMAIN_DOCUMENT_ROOT'] is set.</strong> "
. "You may need to set \$min_documentRoot to this in config.php</p>";
}
}
//*/
//*/

View File

@ -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": {

View File

@ -4,7 +4,6 @@
*
* To test config options, place them in this file and add "&test" to your Minify URL.
* Note that if this is on a public server, anyone can execute your test.
*
*
* @package Minify
*/

View File

@ -1,9 +1,9 @@
<?php
/**
* Sets up MinApp controller and serves files
*
*
* DO NOT EDIT! Configure this utility via config.php and groupsConfig.php
*
*
* @package Minify
*/

View File

@ -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);

View File

@ -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]);
}

View File

@ -242,7 +242,7 @@ class Minify
if (! $this->options['quiet']) {
$this->errorExit($this->options['badRequestHeader'], self::URL_DEBUG);
} else {
list(,$statusCode) = explode(' ', $this->options['badRequestHeader']);
list(, $statusCode) = explode(' ', $this->options['badRequestHeader']);
return array(
'success' => false,
@ -470,7 +470,7 @@ class Minify
public function errorExit($header, $url = '', $msgHtml = '')
{
$url = htmlspecialchars($url, ENT_QUOTES);
list(,$h1) = explode(' ', $header, 2);
list(, $h1) = explode(' ', $header, 2);
$h1 = htmlspecialchars($h1);
// FastCGI environments require 3rd arg to header() to be set
list(, $code) = explode(' ', $header, 3);
@ -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();

View File

@ -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) {

View File

@ -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']
);
}
}

View File

@ -64,4 +64,4 @@ class Minify_Cache_Null implements Minify_CacheInterface
public function fetch($id)
{
}
}
}

View File

@ -136,4 +136,4 @@ class Minify_Cache_WinCache implements Minify_CacheInterface
return true;
}
}
}

View File

@ -68,4 +68,3 @@ class Minify_Controller_Files extends Minify_Controller_Base
return new Minify_ServeConfiguration($options, $sources);
}
}

View File

@ -73,4 +73,3 @@ class Minify_Controller_Groups extends Minify_Controller_Files
return parent::createConfiguration($options);
}
}

View File

@ -66,4 +66,3 @@ class Minify_Controller_Page extends Minify_Controller_Base
return new Minify_ServeConfiguration($options, $sources, $selectionId);
}
}

View File

@ -19,4 +19,4 @@ interface Minify_ControllerInterface
* @return Minify_Env
*/
public function getEnv();
}
}

View File

@ -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}"
);

View File

@ -66,7 +66,7 @@ class Minify_ImportProcessor
$this->_currentDir = dirname($file);
// remove UTF-8 BOM if present
if (pack("CCC",0xef,0xbb,0xbf) === substr($content, 0, 3)) {
if (pack("CCC", 0xef, 0xbb, 0xbf) === substr($content, 0, 3)) {
$content = substr($content, 3);
}
// ensure uniform EOLs
@ -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) {

View File

@ -195,13 +195,13 @@ class Minify_JS_ClosureCompiler
curl_close($ch);
} else {
throw new Minify_JS_ClosureCompiler_Exception(
"Could not make HTTP request: allow_url_open is false and cURL not available"
"Could not make HTTP request: allow_url_open is false and cURL not available"
);
}
if (false === $contents) {
throw new Minify_JS_ClosureCompiler_Exception(
"No HTTP response from server"
"No HTTP response from server"
);
}

View File

@ -110,4 +110,4 @@ class Minify_NailgunClosureCompiler extends Minify_ClosureCompiler
$this->shell("$serverCommand </dev/null >/dev/null 2>/dev/null & sleep 10");
}
}
}

View File

@ -170,7 +170,7 @@ class Minify_Source_Factory
if ($this->options['noMinPattern'] && preg_match($this->options['noMinPattern'], $basename)) {
if (preg_match('~\.(css|less)$~i', $basename)) {
$spec['minifyOptions']['compress'] = false;
// we still want URI rewriting to work for CSS
// we still want URI rewriting to work for CSS
} else {
$spec['minifier'] = 'Minify::nullMinifier';
}

View File

@ -154,4 +154,3 @@ class Minify_YUICompressor
}
}
}

View File

@ -390,4 +390,3 @@ class Cli
$this->errors[$letter][] = sprintf($msg, $value);
}
}

View File

@ -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>

View File

@ -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";
}

View File

@ -7,12 +7,12 @@ if (is_file(__DIR__ . '/bootstrap.php')) {
$bootstrap_file = __DIR__ . '/../bootstrap.php';
}
$send_400 = function($content = 'Bad URL') {
$send_400 = function ($content = 'Bad URL') {
http_response_code(400);
die($content);
};
$send_301 = function($url) {
$send_301 = function ($url) {
http_response_code(301);
header("Cache-Control: max-age=31536000");
header("Location: $url");

View File

@ -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) {

View File

@ -48,7 +48,7 @@ function Minify_getUri($keyOrFiles, $opts = array())
*
* Since this makes a bunch of stat() calls, you might not want to check this
* on every request.
*
*
* @param array $keysAndFiles group keys and/or file paths/URIs.
* @return int latest modification time of all given keys/files
*/

235
composer.lock generated
View File

@ -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": [],

View File

@ -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',

View File

@ -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',

View File

@ -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": {

View File

@ -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
ChMQUXVvVmFkaXMgTGltaXRlZDElMCMG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uZGl0aW9ucyBvZiB1c2UsIGNlcnRpZmljYXRpb24gcHJh
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-----
MIIDIDCCAgigAwIBAgIBHTANBgkqhkiG9w0BA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glSBd49lZRNI+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
IzAhBgNVBAoTGmU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CZ61IygNnxS2PFOiTAZpffpskcYqSUXm7LcT4Tps
-----END CERTIFICATE-----

View File

@ -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;
}
}

View File

@ -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"
},

View File

@ -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(

View File

@ -0,0 +1,7 @@
version: 2
updates:
- package-ecosystem: composer
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10

View 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

View 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
View 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__)
)
;

View File

@ -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)
-------------------

View File

@ -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.

View File

@ -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": {

View File

@ -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
View File

@ -0,0 +1,7 @@
parameters:
level: 6
paths:
- src
- tests
checkMissingIterableValueType: false

View File

@ -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();
}

View File

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

View File

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

View File

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

View File

@ -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;

View File

@ -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;

View File

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

View File

@ -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;
}

View File

@ -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;

View File

@ -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');

View File

@ -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) :

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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
{

View File

@ -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
{

View File

@ -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');

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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'];
}

View File

@ -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',

View File

@ -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',

View File

@ -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',

View File

@ -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'];
}

View File

@ -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'];
}

View File

@ -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',

View File

@ -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',

View File

@ -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']);
}

View File

@ -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));

View File

@ -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
@ -108,23 +125,22 @@ class Client implements ProviderInterface
* @throws \GeoIp2\Exception\InvalidRequestException} if your request was received by the web service but is
* invalid for some other reason. This may indicate an issue
* with this API. Please report the error to MaxMind.
* @throws \GeoIp2\Exception\HttpException if an unexpected HTTP error code or message was returned.
* This could indicate a problem with the connection between
* your server and the web service or that the web service
* returned an invalid document or 500 error code
* @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
* @throws \GeoIp2\Exception\HttpException if an unexpected HTTP error code or message was returned.
* This could indicate a problem with the connection between
* your server and the web service or that the web service
* returned an invalid document or 500 error code
* @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.
*/
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
@ -138,24 +154,23 @@ class Client implements ProviderInterface
* @throws \GeoIp2\Exception\InvalidRequestException} if your request was received by the web service but is
* invalid for some other reason. This may indicate an
* issue with this API. Please report the error to MaxMind.
* @throws \GeoIp2\Exception\HttpException if an unexpected HTTP error
* code or message was returned. This could indicate a problem
* with the connection between your server and the web service
* or that the web service returned an invalid document or 500
* error code.
* @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
* @throws \GeoIp2\Exception\HttpException if an unexpected HTTP error
* code or message was returned. This could indicate a problem
* with the connection between your server and the web service
* or that the web service returned an invalid document or 500
* error code.
* @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.
*/
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
@ -170,22 +185,21 @@ class Client implements ProviderInterface
* @throws \GeoIp2\Exception\InvalidRequestException} if your request was received by the web service but is
* invalid for some other reason. This may indicate an
* issue with this API. Please report the error to MaxMind.
* @throws \GeoIp2\Exception\HttpException if an unexpected HTTP error code or message was returned.
* This could indicate a problem with the connection between
* your server and the web service or that the web service
* returned an invalid document or 500 error code
* @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
* @throws \GeoIp2\Exception\HttpException if an unexpected HTTP error code or message was returned.
* This could indicate a problem with the connection between
* your server and the web service or that the web service
* returned an invalid document or 500 error code
* @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.
*/
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]);

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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
}
}

View File

@ -79,9 +79,7 @@ class EachPromise implements PromisorInterface
$this->createPromise();
/** @psalm-assert Promise $this->aggregate */
$this->iterable->rewind();
if (!$this->checkIfFinished()) {
$this->refillPending();
}
$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).

View File

@ -48,7 +48,9 @@ final class Utils
$promise = new Promise([$queue, 'run']);
$queue->add(function () use ($task, $promise) {
try {
$promise->resolve($task());
if (Is::pending($promise)) {
$promise->resolve($task());
}
} catch (\Throwable $e) {
$promise->reject($e);
} catch (\Exception $e) {

View File

@ -0,0 +1,2 @@
github: [Nyholm, GrahamCampbell]
tidelift: "packagist/guzzlehttp/psr7"

View 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

View File

@ -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

View File

@ -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

View File

@ -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 &

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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
}
}

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