diff --git a/composer.json b/composer.json index ee152c88e1d..18b6f073b9b 100644 --- a/composer.json +++ b/composer.json @@ -74,13 +74,13 @@ "symfony/expression-language": "4.4.47", "symfony/polyfill-mbstring": "v1.30.0", "symfony/polyfill-php80": "1.30.0", - "tecnickcom/tcpdf": "6.7.7" + "tecnickcom/tcpdf": "6.8.0" }, "require-dev": { "ext-dom": "*", "ext-pdo_sqlite": "*", "ext-sqlite3": "*", - "composer/composer": "2.2.24", + "composer/composer": "2.2.25", "league/flysystem-memory": "1.0.2", "phpunit/phpunit": "7.5.20" }, diff --git a/composer.lock b/composer.lock index d54d47553eb..3dfdb2c4ea1 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "1e6c854769d5f052b7ca17a4490768df", + "content-hash": "b37ee2c814bf49f6ccf4b51e43f47c65", "packages": [ { "name": "aura/router", @@ -332,29 +332,27 @@ }, { "name": "doctrine/deprecations", - "version": "1.1.3", + "version": "1.1.4", "source": { "type": "git", "url": "https://github.com/doctrine/deprecations.git", - "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab" + "reference": "31610dbb31faa98e6b5447b62340826f54fbc4e9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/deprecations/zipball/dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab", - "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/31610dbb31faa98e6b5447b62340826f54fbc4e9", + "reference": "31610dbb31faa98e6b5447b62340826f54fbc4e9", "shasum": "" }, "require": { "php": "^7.1 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^9", - "phpstan/phpstan": "1.4.10 || 1.10.15", - "phpstan/phpstan-phpunit": "^1.0", + "doctrine/coding-standard": "^9 || ^12", + "phpstan/phpstan": "1.4.10 || 2.0.3", + "phpstan/phpstan-phpunit": "^1.0 || ^2", "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "psalm/plugin-phpunit": "0.18.4", - "psr/log": "^1 || ^2 || ^3", - "vimeo/psalm": "4.30.0 || 5.12.0" + "psr/log": "^1 || ^2 || ^3" }, "suggest": { "psr/log": "Allows logging deprecations via PSR-3 logger implementation" @@ -362,7 +360,7 @@ "type": "library", "autoload": { "psr-4": { - "Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations" + "Doctrine\\Deprecations\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -373,9 +371,9 @@ "homepage": "https://www.doctrine-project.org/", "support": { "issues": "https://github.com/doctrine/deprecations/issues", - "source": "https://github.com/doctrine/deprecations/tree/1.1.3" + "source": "https://github.com/doctrine/deprecations/tree/1.1.4" }, - "time": "2024-01-30T19:34:25+00:00" + "time": "2024-12-07T21:18:45+00:00" }, { "name": "doctrine/event-manager", @@ -2186,10 +2184,6 @@ ], "type": "library", "extra": { - "branch-alias": { - "dev-master": "3.x-dev", - "dev-2.x": "2.x-dev" - }, "laravel": { "providers": [ "Carbon\\Laravel\\ServiceProvider" @@ -2199,6 +2193,10 @@ "includes": [ "extension.neon" ] + }, + "branch-alias": { + "dev-2.x": "2.x-dev", + "dev-master": "3.x-dev" } }, "autoload": { @@ -3510,8 +3508,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -3589,8 +3587,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -3668,8 +3666,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -3750,8 +3748,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -3834,8 +3832,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -3908,8 +3906,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -3981,8 +3979,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -4057,8 +4055,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -4438,20 +4436,21 @@ }, { "name": "tecnickcom/tcpdf", - "version": "6.7.7", + "version": "6.8.0", "source": { "type": "git", "url": "https://github.com/tecnickcom/TCPDF.git", - "reference": "cfbc0028cc23f057f2baf9e73bdc238153c22086" + "reference": "14ffa0e308f5634aa2489568b4b90b24073b6731" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tecnickcom/TCPDF/zipball/cfbc0028cc23f057f2baf9e73bdc238153c22086", - "reference": "cfbc0028cc23f057f2baf9e73bdc238153c22086", + "url": "https://api.github.com/repos/tecnickcom/TCPDF/zipball/14ffa0e308f5634aa2489568b4b90b24073b6731", + "reference": "14ffa0e308f5634aa2489568b4b90b24073b6731", "shasum": "" }, "require": { - "php": ">=5.5.0" + "ext-curl": "*", + "php": ">=7.1.0" }, "type": "library", "autoload": { @@ -4498,7 +4497,7 @@ ], "support": { "issues": "https://github.com/tecnickcom/TCPDF/issues", - "source": "https://github.com/tecnickcom/TCPDF/tree/6.7.7" + "source": "https://github.com/tecnickcom/TCPDF/tree/6.8.0" }, "funding": [ { @@ -4506,7 +4505,7 @@ "type": "custom" } ], - "time": "2024-10-26T12:15:02+00:00" + "time": "2024-12-23T13:34:57+00:00" } ], "packages-dev": [ @@ -4588,16 +4587,16 @@ }, { "name": "composer/composer", - "version": "2.2.24", + "version": "2.2.25", "source": { "type": "git", "url": "https://github.com/composer/composer.git", - "reference": "91d9d38ebc274267f952ee1fd3892dc7962075f4" + "reference": "0374e6fa9d20beeffa0765c890ace6b33cbb33bd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/composer/zipball/91d9d38ebc274267f952ee1fd3892dc7962075f4", - "reference": "91d9d38ebc274267f952ee1fd3892dc7962075f4", + "url": "https://api.github.com/repos/composer/composer/zipball/0374e6fa9d20beeffa0765c890ace6b33cbb33bd", + "reference": "0374e6fa9d20beeffa0765c890ace6b33cbb33bd", "shasum": "" }, "require": { @@ -4667,7 +4666,7 @@ "support": { "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/composer/issues", - "source": "https://github.com/composer/composer/tree/2.2.24" + "source": "https://github.com/composer/composer/tree/2.2.25" }, "funding": [ { @@ -4683,7 +4682,7 @@ "type": "tidelift" } ], - "time": "2024-06-10T20:51:52+00:00" + "time": "2024-12-11T10:58:02+00:00" }, { "name": "composer/metadata-minifier", diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index b836a810ac2..8bfbccccda3 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1704,12 +1704,6 @@ parameters: count: 3 path: app/GedcomRecord.php - - - message: '#^Parameter \#2 \$array of function implode expects array\, mixed given\.$#' - identifier: argument.type - count: 1 - path: app/GedcomRecord.php - - message: '#^Parameter \#2 \$gedcom of method Fisharebest\\Webtrees\\GedcomRecord\:\:insertMissingLevels\(\) expects string, mixed given\.$#' identifier: argument.type @@ -2095,26 +2089,26 @@ parameters: path: app/Http/Middleware/Router.php - - message: '#^Anonymous function should return Illuminate\\Database\\Query\\Builder but returns mixed\.$#' - identifier: return.type + message: '#^Binary operation "\." between literal\-string&non\-falsy\-string and mixed results in an error\.$#' + identifier: binaryOp.invalid count: 1 path: app/Http/Middleware/UseDatabase.php - - message: '#^Binary operation "\." between literal\-string&non\-falsy\-string and mixed results in an error\.$#' - identifier: binaryOp.invalid + message: '#^Call to function assert\(\) with true will always evaluate to true\.$#' + identifier: function.alreadyNarrowedType count: 1 path: app/Http/Middleware/UseDatabase.php - - message: '#^Call to function assert\(\) with false will always evaluate to false\.$#' - identifier: function.impossibleType + message: '#^Instanceof between Illuminate\\Database\\Query\\Builder and Illuminate\\Database\\Query\\Builder will always evaluate to true\.$#' + identifier: instanceof.alwaysTrue count: 1 path: app/Http/Middleware/UseDatabase.php - - message: '#^Instanceof between \$this\(Fisharebest\\Webtrees\\Http\\Middleware\\UseDatabase\) and Illuminate\\Database\\Query\\Builder will always evaluate to false\.$#' - identifier: instanceof.alwaysFalse + message: '#^Parameter \#1 \$column of method Illuminate\\Database\\Query\\Builder\:\:where\(\) expects array\|Closure\|string, mixed given\.$#' + identifier: argument.type count: 1 path: app/Http/Middleware/UseDatabase.php @@ -5203,7 +5197,7 @@ parameters: path: app/Http/RequestHandlers/ReportGenerate.php - - message: '#^Parameter \#3 \$vars of class Fisharebest\\Webtrees\\Report\\ReportParserGenerate constructor expects array\\>, array\\> given\.$#' + message: '#^Parameter \#3 \$vars of class Fisharebest\\Webtrees\\Report\\ReportParserGenerate constructor expects array\\>, array\\> given\.$#' identifier: argument.type count: 2 path: app/Http/RequestHandlers/ReportGenerate.php @@ -5892,12 +5886,6 @@ parameters: count: 1 path: app/Http/RequestHandlers/TreePageBlockUpdate.php - - - message: '#^Parameter \#2 \$array of function implode expects array\, mixed given\.$#' - identifier: argument.type - count: 18 - path: app/Http/RequestHandlers/TreePreferencesAction.php - - message: '#^Parameter \#2 \$parameters of function route expects array\, array\ given\.$#' identifier: argument.type @@ -7489,13 +7477,7 @@ parameters: path: app/Module/FamilyTreeStatisticsModule.php - - message: '#^Parameter \#1 \$surnames of static method Fisharebest\\Webtrees\\Functions\\FunctionsPrintLists\:\:surnameList\(\) expects array\\>, array\ given\.$#' - identifier: argument.type - count: 1 - path: app/Module/FamilyTreeStatisticsModule.php - - - - message: '#^Parameter \#2 \$callback of function uksort expects callable\(int\|string, int\|string\)\: int, array\{''Fisharebest\\\\Webtrees\\\\I18N'', ''strcasecmp''\} given\.$#' + message: '#^Parameter \#1 \$surnames of static method Fisharebest\\Webtrees\\Functions\\FunctionsPrintLists\:\:surnameList\(\) expects array\\>, array\ given\.$#' identifier: argument.type count: 1 path: app/Module/FamilyTreeStatisticsModule.php @@ -7842,12 +7824,6 @@ parameters: count: 2 path: app/Module/FrequentlyAskedQuestionsModule.php - - - message: '#^Parameter \#2 \$array of function implode expects array\, mixed given\.$#' - identifier: argument.type - count: 1 - path: app/Module/FrequentlyAskedQuestionsModule.php - - message: '#^Parameter \#2 \$parameters of function route expects array\, array\ given\.$#' identifier: argument.type @@ -8022,12 +7998,6 @@ parameters: count: 1 path: app/Module/HtmlBlockModule.php - - - message: '#^Parameter \#2 \$array of function implode expects array\, mixed given\.$#' - identifier: argument.type - count: 1 - path: app/Module/HtmlBlockModule.php - - message: '#^Parameter \#2 \$pieces of function implode expects array, mixed given\.$#' identifier: argument.type @@ -8724,12 +8694,6 @@ parameters: count: 1 path: app/Module/NotesTabModule.php - - - message: '#^Parameter \#2 \$array of function implode expects array\, mixed given\.$#' - identifier: argument.type - count: 1 - path: app/Module/OnThisDayModule.php - - message: '#^Parameter \#2 \$pieces of function implode expects array, mixed given\.$#' identifier: argument.type @@ -9564,12 +9528,6 @@ parameters: count: 2 path: app/Module/StoriesModule.php - - - message: '#^Parameter \#2 \$array of function implode expects array\, mixed given\.$#' - identifier: argument.type - count: 1 - path: app/Module/StoriesModule.php - - message: '#^Parameter \#2 \$parameters of function route expects array\, array\ given\.$#' identifier: argument.type @@ -9660,12 +9618,6 @@ parameters: count: 1 path: app/Module/TimelineChartModule.php - - - message: '#^Parameter \#1 \$array of function array_unique expects an array of values castable to string, mixed given\.$#' - identifier: argument.type - count: 1 - path: app/Module/TimelineChartModule.php - - message: '#^Parameter \#1 \$array of function array_unique expects array, mixed given\.$#' identifier: argument.type @@ -9757,19 +9709,13 @@ parameters: path: app/Module/TopSurnamesModule.php - - message: '#^Parameter \#1 \$surnames of static method Fisharebest\\Webtrees\\Functions\\FunctionsPrintLists\:\:surnameList\(\) expects array\\>, array\ given\.$#' + message: '#^Parameter \#1 \$surnames of static method Fisharebest\\Webtrees\\Functions\\FunctionsPrintLists\:\:surnameList\(\) expects array\\>, array\ given\.$#' identifier: argument.type count: 2 path: app/Module/TopSurnamesModule.php - - message: '#^Parameter \#1 \$surnames of static method Fisharebest\\Webtrees\\Functions\\FunctionsPrintLists\:\:surnameTagCloud\(\) expects array\\>, array\ given\.$#' - identifier: argument.type - count: 1 - path: app/Module/TopSurnamesModule.php - - - - message: '#^Parameter \#2 \$callback of function uksort expects callable\(int\|string, int\|string\)\: int, array\{''Fisharebest\\\\Webtrees\\\\I18N'', ''strcasecmp''\} given\.$#' + message: '#^Parameter \#1 \$surnames of static method Fisharebest\\Webtrees\\Functions\\FunctionsPrintLists\:\:surnameTagCloud\(\) expects array\\>, array\ given\.$#' identifier: argument.type count: 1 path: app/Module/TopSurnamesModule.php @@ -9798,12 +9744,6 @@ parameters: count: 1 path: app/Module/TreesMenuModule.php - - - message: '#^Parameter \#2 \$array of function implode expects array\, mixed given\.$#' - identifier: argument.type - count: 1 - path: app/Module/UpcomingAnniversariesModule.php - - message: '#^Parameter \#2 \$pieces of function implode expects array, mixed given\.$#' identifier: argument.type @@ -12013,7 +11953,7 @@ parameters: path: app/Services/PendingChangesService.php - - message: '#^Method Fisharebest\\Webtrees\\Services\\PendingChangesService\:\:pendingChanges\(\) should return array\\> but returns array\\>\.$#' + message: '#^Method Fisharebest\\Webtrees\\Services\\PendingChangesService\:\:pendingChanges\(\) should return array\\> but returns array\\>\.$#' identifier: return.type count: 1 path: app/Services/PendingChangesService.php @@ -12474,12 +12414,6 @@ parameters: count: 1 path: app/Statistics/Google/ChartAge.php - - - message: '#^Parameter \#1 \$century of method Fisharebest\\Webtrees\\Statistics\\Service\\CenturyService\:\:centuryName\(\) expects int, int\|string given\.$#' - identifier: argument.type - count: 1 - path: app/Statistics/Google/ChartAge.php - - message: '#^Parameter \#1 \$number of function round expects float, mixed given\.$#' identifier: argument.type @@ -12792,12 +12726,6 @@ parameters: count: 1 path: app/Statistics/Google/ChartMarriageAge.php - - - message: '#^Parameter \#1 \$century of method Fisharebest\\Webtrees\\Statistics\\Service\\CenturyService\:\:centuryName\(\) expects int, int\|string given\.$#' - identifier: argument.type - count: 1 - path: app/Statistics/Google/ChartMarriageAge.php - - message: '#^Parameter \#1 \$number of function round expects float, mixed given\.$#' identifier: argument.type @@ -13261,7 +13189,7 @@ parameters: path: app/Statistics/Repository/IndividualRepository.php - - message: '#^Method Fisharebest\\Webtrees\\Statistics\\Repository\\IndividualRepository\:\:topSurnames\(\) should return array\\> but returns array\\.$#' + message: '#^Method Fisharebest\\Webtrees\\Statistics\\Repository\\IndividualRepository\:\:topSurnames\(\) should return array\\> but returns array\\.$#' identifier: return.type count: 1 path: app/Statistics/Repository/IndividualRepository.php diff --git a/vendor/autoload.php b/vendor/autoload.php index 7098c6509d2..8fbf284bc23 100644 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -22,4 +22,4 @@ require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInit1e6c854769d5f052b7ca17a4490768df::getLoader(); +return ComposerAutoloaderInitb37ee2c814bf49f6ccf4b51e43f47c65::getLoader(); diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php index f8ac57bba3c..b4b1213b7af 100644 --- a/vendor/composer/autoload_psr4.php +++ b/vendor/composer/autoload_psr4.php @@ -57,7 +57,7 @@ 'Fig\\Http\\Message\\' => array($vendorDir . '/fig/http-message-util/src'), 'Egulias\\EmailValidator\\' => array($vendorDir . '/egulias/email-validator/src'), 'Doctrine\\Inflector\\' => array($vendorDir . '/doctrine/inflector/lib/Doctrine/Inflector'), - 'Doctrine\\Deprecations\\' => array($vendorDir . '/doctrine/deprecations/lib/Doctrine/Deprecations'), + 'Doctrine\\Deprecations\\' => array($vendorDir . '/doctrine/deprecations/src'), 'Doctrine\\DBAL\\' => array($vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL'), 'Doctrine\\Common\\Lexer\\' => array($vendorDir . '/doctrine/lexer/lib/Doctrine/Common/Lexer'), 'Doctrine\\Common\\Inflector\\' => array($vendorDir . '/doctrine/inflector/lib/Doctrine/Common/Inflector'), diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index 3a8507394af..8a96deab8a9 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit1e6c854769d5f052b7ca17a4490768df +class ComposerAutoloaderInitb37ee2c814bf49f6ccf4b51e43f47c65 { private static $loader; @@ -24,16 +24,16 @@ public static function getLoader() require __DIR__ . '/platform_check.php'; - spl_autoload_register(array('ComposerAutoloaderInit1e6c854769d5f052b7ca17a4490768df', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInitb37ee2c814bf49f6ccf4b51e43f47c65', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); - spl_autoload_unregister(array('ComposerAutoloaderInit1e6c854769d5f052b7ca17a4490768df', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInitb37ee2c814bf49f6ccf4b51e43f47c65', 'loadClassLoader')); require __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInit1e6c854769d5f052b7ca17a4490768df::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInitb37ee2c814bf49f6ccf4b51e43f47c65::getInitializer($loader)); $loader->register(true); - $filesToLoad = \Composer\Autoload\ComposerStaticInit1e6c854769d5f052b7ca17a4490768df::$files; + $filesToLoad = \Composer\Autoload\ComposerStaticInitb37ee2c814bf49f6ccf4b51e43f47c65::$files; $requireFile = \Closure::bind(static function ($fileIdentifier, $file) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index e7f1c6dd523..043884f413e 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInit1e6c854769d5f052b7ca17a4490768df +class ComposerStaticInitb37ee2c814bf49f6ccf4b51e43f47c65 { public static $files = array ( 'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php', @@ -341,7 +341,7 @@ class ComposerStaticInit1e6c854769d5f052b7ca17a4490768df ), 'Doctrine\\Deprecations\\' => array ( - 0 => __DIR__ . '/..' . '/doctrine/deprecations/lib/Doctrine/Deprecations', + 0 => __DIR__ . '/..' . '/doctrine/deprecations/src', ), 'Doctrine\\DBAL\\' => array ( @@ -415,10 +415,10 @@ class ComposerStaticInit1e6c854769d5f052b7ca17a4490768df public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInit1e6c854769d5f052b7ca17a4490768df::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInit1e6c854769d5f052b7ca17a4490768df::$prefixDirsPsr4; - $loader->prefixesPsr0 = ComposerStaticInit1e6c854769d5f052b7ca17a4490768df::$prefixesPsr0; - $loader->classMap = ComposerStaticInit1e6c854769d5f052b7ca17a4490768df::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInitb37ee2c814bf49f6ccf4b51e43f47c65::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInitb37ee2c814bf49f6ccf4b51e43f47c65::$prefixDirsPsr4; + $loader->prefixesPsr0 = ComposerStaticInitb37ee2c814bf49f6ccf4b51e43f47c65::$prefixesPsr0; + $loader->classMap = ComposerStaticInitb37ee2c814bf49f6ccf4b51e43f47c65::$classMap; }, null, ClassLoader::class); } diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 78d83e1bd44..7faa77d6ca5 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -338,40 +338,38 @@ }, { "name": "doctrine/deprecations", - "version": "1.1.3", - "version_normalized": "1.1.3.0", + "version": "1.1.4", + "version_normalized": "1.1.4.0", "source": { "type": "git", "url": "https://github.com/doctrine/deprecations.git", - "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab" + "reference": "31610dbb31faa98e6b5447b62340826f54fbc4e9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/deprecations/zipball/dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab", - "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/31610dbb31faa98e6b5447b62340826f54fbc4e9", + "reference": "31610dbb31faa98e6b5447b62340826f54fbc4e9", "shasum": "" }, "require": { "php": "^7.1 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^9", - "phpstan/phpstan": "1.4.10 || 1.10.15", - "phpstan/phpstan-phpunit": "^1.0", + "doctrine/coding-standard": "^9 || ^12", + "phpstan/phpstan": "1.4.10 || 2.0.3", + "phpstan/phpstan-phpunit": "^1.0 || ^2", "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "psalm/plugin-phpunit": "0.18.4", - "psr/log": "^1 || ^2 || ^3", - "vimeo/psalm": "4.30.0 || 5.12.0" + "psr/log": "^1 || ^2 || ^3" }, "suggest": { "psr/log": "Allows logging deprecations via PSR-3 logger implementation" }, - "time": "2024-01-30T19:34:25+00:00", + "time": "2024-12-07T21:18:45+00:00", "type": "library", "installation-source": "dist", "autoload": { "psr-4": { - "Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations" + "Doctrine\\Deprecations\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -382,7 +380,7 @@ "homepage": "https://www.doctrine-project.org/", "support": { "issues": "https://github.com/doctrine/deprecations/issues", - "source": "https://github.com/doctrine/deprecations/tree/1.1.3" + "source": "https://github.com/doctrine/deprecations/tree/1.1.4" }, "install-path": "../doctrine/deprecations" }, @@ -2272,10 +2270,6 @@ ], "type": "library", "extra": { - "branch-alias": { - "dev-master": "3.x-dev", - "dev-2.x": "2.x-dev" - }, "laravel": { "providers": [ "Carbon\\Laravel\\ServiceProvider" @@ -2285,6 +2279,10 @@ "includes": [ "extension.neon" ] + }, + "branch-alias": { + "dev-2.x": "2.x-dev", + "dev-master": "3.x-dev" } }, "installation-source": "dist", @@ -3659,8 +3657,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "installation-source": "dist", @@ -3741,8 +3739,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "installation-source": "dist", @@ -3823,8 +3821,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "installation-source": "dist", @@ -3908,8 +3906,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "installation-source": "dist", @@ -3995,8 +3993,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "installation-source": "dist", @@ -4072,8 +4070,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "installation-source": "dist", @@ -4148,8 +4146,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "installation-source": "dist", @@ -4227,8 +4225,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "installation-source": "dist", @@ -4621,23 +4619,24 @@ }, { "name": "tecnickcom/tcpdf", - "version": "6.7.7", - "version_normalized": "6.7.7.0", + "version": "6.8.0", + "version_normalized": "6.8.0.0", "source": { "type": "git", "url": "https://github.com/tecnickcom/TCPDF.git", - "reference": "cfbc0028cc23f057f2baf9e73bdc238153c22086" + "reference": "14ffa0e308f5634aa2489568b4b90b24073b6731" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tecnickcom/TCPDF/zipball/cfbc0028cc23f057f2baf9e73bdc238153c22086", - "reference": "cfbc0028cc23f057f2baf9e73bdc238153c22086", + "url": "https://api.github.com/repos/tecnickcom/TCPDF/zipball/14ffa0e308f5634aa2489568b4b90b24073b6731", + "reference": "14ffa0e308f5634aa2489568b4b90b24073b6731", "shasum": "" }, "require": { - "php": ">=5.5.0" + "ext-curl": "*", + "php": ">=7.1.0" }, - "time": "2024-10-26T12:15:02+00:00", + "time": "2024-12-23T13:34:57+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -4684,7 +4683,7 @@ ], "support": { "issues": "https://github.com/tecnickcom/TCPDF/issues", - "source": "https://github.com/tecnickcom/TCPDF/tree/6.7.7" + "source": "https://github.com/tecnickcom/TCPDF/tree/6.8.0" }, "funding": [ { diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index 56dcf0c5dc1..c86167f4329 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -3,7 +3,7 @@ 'name' => 'fisharebest/webtrees', 'pretty_version' => '2.0.x-dev', 'version' => '2.0.9999999.9999999-dev', - 'reference' => '89f31942c87d3c33d09efb893dbb32edc5a82449', + 'reference' => 'e258015c8a77d58252739001c49909347bd66f30', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -47,9 +47,9 @@ 'dev_requirement' => false, ), 'doctrine/deprecations' => array( - 'pretty_version' => '1.1.3', - 'version' => '1.1.3.0', - 'reference' => 'dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab', + 'pretty_version' => '1.1.4', + 'version' => '1.1.4.0', + 'reference' => '31610dbb31faa98e6b5447b62340826f54fbc4e9', 'type' => 'library', 'install_path' => __DIR__ . '/../doctrine/deprecations', 'aliases' => array(), @@ -148,7 +148,7 @@ 'fisharebest/webtrees' => array( 'pretty_version' => '2.0.x-dev', 'version' => '2.0.9999999.9999999-dev', - 'reference' => '89f31942c87d3c33d09efb893dbb32edc5a82449', + 'reference' => 'e258015c8a77d58252739001c49909347bd66f30', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -641,9 +641,9 @@ 'dev_requirement' => false, ), 'tecnickcom/tcpdf' => array( - 'pretty_version' => '6.7.7', - 'version' => '6.7.7.0', - 'reference' => 'cfbc0028cc23f057f2baf9e73bdc238153c22086', + 'pretty_version' => '6.8.0', + 'version' => '6.8.0.0', + 'reference' => '14ffa0e308f5634aa2489568b4b90b24073b6731', 'type' => 'library', 'install_path' => __DIR__ . '/../tecnickcom/tcpdf', 'aliases' => array(), diff --git a/vendor/doctrine/deprecations/README.md b/vendor/doctrine/deprecations/README.md index 93caf83f821..8b806d1f097 100644 --- a/vendor/doctrine/deprecations/README.md +++ b/vendor/doctrine/deprecations/README.md @@ -150,6 +150,67 @@ class MyTest extends TestCase } ``` +## Displaying deprecations after running a PHPUnit test suite + +It is possible to integrate this library with PHPUnit to display all +deprecations triggered during the test suite execution. + +```xml + + + + + + + + + + + + src + + + +``` + +Note that you can still trigger Deprecations in your code, provided you use the +`#[WithoutErrorHandler]` attribute to disable PHPUnit's error handler for tests +that call it. Be wary that this will disable all error handling, meaning it +will mask any warnings or errors that would otherwise be caught by PHPUnit. + +At the moment, it is not possible to disable deduplication with an environment +variable, but you can use a bootstrap file to achieve that: + +```php +// tests/bootstrap.php + + … + +``` + ## What is a deprecation identifier? An identifier for deprecations is just a link to any resource, most often a diff --git a/vendor/doctrine/deprecations/composer.json b/vendor/doctrine/deprecations/composer.json index f8319f9a2a1..a7a51e3e8f4 100644 --- a/vendor/doctrine/deprecations/composer.json +++ b/vendor/doctrine/deprecations/composer.json @@ -8,20 +8,18 @@ "php": "^7.1 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^9", - "phpstan/phpstan": "1.4.10 || 1.10.15", - "phpstan/phpstan-phpunit": "^1.0", + "doctrine/coding-standard": "^9 || ^12", + "phpstan/phpstan": "1.4.10 || 2.0.3", + "phpstan/phpstan-phpunit": "^1.0 || ^2", "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "psalm/plugin-phpunit": "0.18.4", - "psr/log": "^1 || ^2 || ^3", - "vimeo/psalm": "4.30.0 || 5.12.0" + "psr/log": "^1 || ^2 || ^3" }, "suggest": { "psr/log": "Allows logging deprecations via PSR-3 logger implementation" }, "autoload": { "psr-4": { - "Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations" + "Doctrine\\Deprecations\\": "src" } }, "autoload-dev": { diff --git a/vendor/doctrine/deprecations/lib/Doctrine/Deprecations/Deprecation.php b/vendor/doctrine/deprecations/src/Deprecation.php similarity index 95% rename from vendor/doctrine/deprecations/lib/Doctrine/Deprecations/Deprecation.php rename to vendor/doctrine/deprecations/src/Deprecation.php index bad5070ad66..1801e6c7ce1 100644 --- a/vendor/doctrine/deprecations/lib/Doctrine/Deprecations/Deprecation.php +++ b/vendor/doctrine/deprecations/src/Deprecation.php @@ -173,9 +173,7 @@ public static function triggerIfCalledFromOutside(string $package, string $link, self::delegateTriggerToBackend($message, $backtrace, $link, $package); } - /** - * @param list $backtrace - */ + /** @param list $backtrace */ private static function delegateTriggerToBackend(string $message, array $backtrace, string $link, string $package): void { $type = self::$type ?? self::getTypeFromEnv(); @@ -226,19 +224,19 @@ private static function basename(string $filename): string public static function enableTrackingDeprecations(): void { - self::$type = self::$type ?? 0; + self::$type = self::$type ?? self::getTypeFromEnv(); self::$type |= self::TYPE_TRACK_DEPRECATIONS; } public static function enableWithTriggerError(): void { - self::$type = self::$type ?? 0; + self::$type = self::$type ?? self::getTypeFromEnv(); self::$type |= self::TYPE_TRIGGER_ERROR; } public static function enableWithPsrLogger(LoggerInterface $logger): void { - self::$type = self::$type ?? 0; + self::$type = self::$type ?? self::getTypeFromEnv(); self::$type |= self::TYPE_PSR_LOGGER; self::$logger = $logger; } @@ -289,9 +287,7 @@ public static function getTriggeredDeprecations(): array return self::$triggeredDeprecations; } - /** - * @return int-mask-of - */ + /** @return int-mask-of */ private static function getTypeFromEnv(): int { switch ($_SERVER['DOCTRINE_DEPRECATIONS'] ?? $_ENV['DOCTRINE_DEPRECATIONS'] ?? null) { diff --git a/vendor/doctrine/deprecations/lib/Doctrine/Deprecations/PHPUnit/VerifyDeprecations.php b/vendor/doctrine/deprecations/src/PHPUnit/VerifyDeprecations.php similarity index 96% rename from vendor/doctrine/deprecations/lib/Doctrine/Deprecations/PHPUnit/VerifyDeprecations.php rename to vendor/doctrine/deprecations/src/PHPUnit/VerifyDeprecations.php index 4c3366a9718..8b322b755df 100644 --- a/vendor/doctrine/deprecations/lib/Doctrine/Deprecations/PHPUnit/VerifyDeprecations.php +++ b/vendor/doctrine/deprecations/src/PHPUnit/VerifyDeprecations.php @@ -26,17 +26,13 @@ public function expectNoDeprecationWithIdentifier(string $identifier): void $this->doctrineNoDeprecationsExpectations[$identifier] = Deprecation::getTriggeredDeprecations()[$identifier] ?? 0; } - /** - * @before - */ + /** @before */ public function enableDeprecationTracking(): void { Deprecation::enableTrackingDeprecations(); } - /** - * @after - */ + /** @after */ public function verifyDeprecationsAreTriggered(): void { foreach ($this->doctrineDeprecationsExpectations as $identifier => $expectation) { diff --git a/vendor/tecnickcom/tcpdf/CHANGELOG.TXT b/vendor/tecnickcom/tcpdf/CHANGELOG.TXT index 8fb0afae521..a6485e3a3b9 100644 --- a/vendor/tecnickcom/tcpdf/CHANGELOG.TXT +++ b/vendor/tecnickcom/tcpdf/CHANGELOG.TXT @@ -1,3 +1,14 @@ +6.8.0 (2024-12-23) + - Requires PHP 7.1+ and curl extension. + - Escape error message. + - Use strict time-constant function to compare TCPDF-tag hashes. + - Add K_CURLOPTS config array to set custom cURL options (NOTE: some defaults have changed). + - Add some addTTFfont fixes from tc-lib-pdf-font. + +6.7.8 (2024-12-13) + - Improve SVG detection by checking for (mandatory) namespace. + - Use late state binding now that minimum PHP version is 5.5. + 6.7.7 (2024-10-26) - Update regular expression to avoid ReDoS (CVE-2024-22641) - [PHP 8.4] Fix: Curl CURLOPT_BINARYTRANSFER deprecated #675 diff --git a/vendor/tecnickcom/tcpdf/VERSION b/vendor/tecnickcom/tcpdf/VERSION index 38f118fae49..e029aa99b7d 100644 --- a/vendor/tecnickcom/tcpdf/VERSION +++ b/vendor/tecnickcom/tcpdf/VERSION @@ -1 +1 @@ -6.7.7 +6.8.0 diff --git a/vendor/tecnickcom/tcpdf/composer.json b/vendor/tecnickcom/tcpdf/composer.json index 666dac3fdad..b0db2889854 100644 --- a/vendor/tecnickcom/tcpdf/composer.json +++ b/vendor/tecnickcom/tcpdf/composer.json @@ -12,7 +12,7 @@ "barcodes" ], "homepage": "http://www.tcpdf.org/", - "version": "6.7.7", + "version": "6.8.0", "license": "LGPL-3.0-or-later", "authors": [ { @@ -22,7 +22,8 @@ } ], "require": { - "php": ">=5.5.0" + "php": ">=7.1.0", + "ext-curl": "*" }, "autoload": { "classmap": [ diff --git a/vendor/tecnickcom/tcpdf/include/tcpdf_fonts.php b/vendor/tecnickcom/tcpdf/include/tcpdf_fonts.php index a71c84b7e0a..4973b285500 100644 --- a/vendor/tecnickcom/tcpdf/include/tcpdf_fonts.php +++ b/vendor/tecnickcom/tcpdf/include/tcpdf_fonts.php @@ -1,13 +1,13 @@ 0) { + if (preg_match_all('#dup[\s]([0-9]+)[\s]*+/([^\s]*+)[\s]put#sU', $font, $fmap, PREG_SET_ORDER) > 0) { foreach ($fmap as $v) { $imap[$v[2]] = $v[1]; } @@ -229,22 +230,22 @@ public static function addTTFfont($fontfile, $fonttype='', $enc='', $flags=32, $ $eplain .= chr($chr ^ ($r >> 8)); $r = ((($chr + $r) * $c1 + $c2) % 65536); } - if (preg_match('#/ForceBold[\s]*([^\s]*)#', $eplain, $matches) > 0) { + if (preg_match('#/ForceBold[\s]*+([^\s]*+)#', $eplain, $matches) > 0) { if ($matches[1] == 'true') { $fmetric['Flags'] |= 0x40000; } } - if (preg_match('#/StdVW[\s]*\[([^\]]*)#', $eplain, $matches) > 0) { + if (preg_match('#/StdVW[\s]*+\[([^\]]*+)#', $eplain, $matches) > 0) { $fmetric['StemV'] = intval($matches[1]); } else { $fmetric['StemV'] = 70; } - if (preg_match('#/StdHW[\s]*\[([^\]]*)#', $eplain, $matches) > 0) { + if (preg_match('#/StdHW[\s]*+\[([^\]]*+)#', $eplain, $matches) > 0) { $fmetric['StemH'] = intval($matches[1]); } else { $fmetric['StemH'] = 30; } - if (preg_match('#/BlueValues[\s]*\[([^\]]*)#', $eplain, $matches) > 0) { + if (preg_match('#/BlueValues[\s]*+\[([^\]]*+)#', $eplain, $matches) > 0) { $bv = explode(' ', $matches[1]); if (count($bv) >= 6) { $v1 = intval($bv[2]); @@ -265,7 +266,7 @@ public static function addTTFfont($fontfile, $fonttype='', $enc='', $flags=32, $ $fmetric['CapHeight'] = 700; } // get the number of random bytes at the beginning of charstrings - if (preg_match('#/lenIV[\s]*([0-9]*)#', $eplain, $matches) > 0) { + if (preg_match('#/lenIV[\s]*+([\d]*+)#', $eplain, $matches) > 0) { $lenIV = intval($matches[1]); } else { $lenIV = 4; @@ -273,7 +274,7 @@ public static function addTTFfont($fontfile, $fonttype='', $enc='', $flags=32, $ $fmetric['Leading'] = 0; // get charstring data $eplain = substr($eplain, (strpos($eplain, '/CharStrings') + 1)); - preg_match_all('#/([A-Za-z0-9\.]*)[\s][0-9]+[\s]RD[\s](.*)[\s]ND#sU', $eplain, $matches, PREG_SET_ORDER); + preg_match_all('#/([A-Za-z0-9\.]*+)[\s][0-9]+[\s]RD[\s](.*)[\s]ND#sU', $eplain, $matches, PREG_SET_ORDER); if (!empty($enc) AND isset(TCPDF_FONT_DATA::$encmap[$enc])) { $enc_map = TCPDF_FONT_DATA::$encmap[$enc]; } else { @@ -1780,9 +1781,9 @@ public static function arrUTF8ToUTF16BE($unicode, $setbom=false) { */ public static function UTF8ArrayToUniArray($ta, $isunicode=true) { if ($isunicode) { - return array_map(get_called_class().'::unichrUnicode', $ta); + return array_map(static::class.'::unichrUnicode', $ta); } - return array_map(get_called_class().'::unichrASCII', $ta); + return array_map(static::class.'::unichrASCII', $ta); } /** @@ -2002,7 +2003,7 @@ public static function UTF8StringToArray($str, $isunicode, &$currentfont) { if ($isunicode) { // requires PCRE unicode support turned on $chars = TCPDF_STATIC::pregSplit('//','u', $str, -1, PREG_SPLIT_NO_EMPTY); - $carr = array_map(get_called_class().'::uniord', $chars); + $carr = array_map(static::class.'::uniord', $chars); } else { $chars = str_split($str); $carr = array_map('ord', $chars); diff --git a/vendor/tecnickcom/tcpdf/include/tcpdf_static.php b/vendor/tecnickcom/tcpdf/include/tcpdf_static.php index ac9c3e1fd23..2e18d9c7d14 100644 --- a/vendor/tecnickcom/tcpdf/include/tcpdf_static.php +++ b/vendor/tecnickcom/tcpdf/include/tcpdf_static.php @@ -1,13 +1,13 @@ * @package com.tecnick.tcpdf * @author Nicola Asuni - * @version 1.1.2 + * @version 1.1.5 */ /** @@ -46,7 +46,7 @@ * Static methods used by the TCPDF class. * @package com.tecnick.tcpdf * @brief PHP class for generating PDF documents without requiring external extensions. - * @version 1.1.1 + * @version 1.1.5 * @author Nicola Asuni - info@tecnick.com */ class TCPDF_STATIC { @@ -55,7 +55,7 @@ class TCPDF_STATIC { * Current TCPDF version. * @private static */ - private static $tcpdf_version = '6.7.7'; + private static $tcpdf_version = '6.8.0'; /** * String alias for total number of pages. @@ -106,6 +106,31 @@ class TCPDF_STATIC { */ public static $pageboxes = array('MediaBox', 'CropBox', 'BleedBox', 'TrimBox', 'ArtBox'); + /** + * Array of default cURL options for curl_setopt_array. + * + * @var array cURL options. + */ + protected const CURLOPT_DEFAULT = [ + CURLOPT_CONNECTTIMEOUT => 5, + CURLOPT_MAXREDIRS => 5, + CURLOPT_PROTOCOLS => CURLPROTO_HTTPS | CURLPROTO_HTTP | CURLPROTO_FTP | CURLPROTO_FTPS, + CURLOPT_SSL_VERIFYHOST => 2, + CURLOPT_SSL_VERIFYPEER => true, + CURLOPT_TIMEOUT => 30, + CURLOPT_USERAGENT => 'tcpdf', + ]; + + /** + * Array of fixed cURL options for curl_setopt_array. + * + * @var array cURL options. + */ + protected const CURLOPT_FIXED = [ + CURLOPT_FAILONERROR => true, + CURLOPT_RETURNTRANSFER => true, + ]; + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** @@ -1823,23 +1848,19 @@ public static function fopenLocal($filename, $mode) { */ public static function url_exists($url) { $crs = curl_init(); - // encode query params in URL to get right response form the server - $url = self::encodeUrlQuery($url); - curl_setopt($crs, CURLOPT_URL, $url); - curl_setopt($crs, CURLOPT_NOBODY, true); - curl_setopt($crs, CURLOPT_FAILONERROR, true); - if ((ini_get('open_basedir') == '') && (!ini_get('safe_mode'))) { - curl_setopt($crs, CURLOPT_FOLLOWLOCATION, true); - } - curl_setopt($crs, CURLOPT_CONNECTTIMEOUT, 5); - curl_setopt($crs, CURLOPT_TIMEOUT, 30); - curl_setopt($crs, CURLOPT_SSL_VERIFYPEER, false); - curl_setopt($crs, CURLOPT_SSL_VERIFYHOST, false); - curl_setopt($crs, CURLOPT_USERAGENT, 'tc-lib-file'); - curl_setopt($crs, CURLOPT_MAXREDIRS, 5); - if (defined('CURLOPT_PROTOCOLS')) { - curl_setopt($crs, CURLOPT_PROTOCOLS, CURLPROTO_HTTPS | CURLPROTO_HTTP | CURLPROTO_FTP | CURLPROTO_FTPS); - } + $curlopts = []; + if ( + (ini_get('open_basedir') == '') + && (ini_get('safe_mode') === '' + || ini_get('safe_mode') === false) + ) { + $curlopts[CURLOPT_FOLLOWLOCATION] = true; + } + $curlopts = array_replace($curlopts, self::CURLOPT_DEFAULT); + $curlopts = array_replace($curlopts, K_CURLOPTS); + $curlopts = array_replace($curlopts, self::CURLOPT_FIXED); + $curlopts[CURLOPT_URL] = $url; + curl_setopt_array($crs, $curlopts); curl_exec($crs); $code = curl_getinfo($crs, CURLINFO_HTTP_CODE); curl_close($crs); @@ -1960,21 +1981,19 @@ public static function fileGetContents($file) { ) { // try to get remote file data using cURL $crs = curl_init(); - curl_setopt($crs, CURLOPT_URL, $path); - curl_setopt($crs, CURLOPT_FAILONERROR, true); - curl_setopt($crs, CURLOPT_RETURNTRANSFER, true); - if ((ini_get('open_basedir') == '') && (!ini_get('safe_mode'))) { - curl_setopt($crs, CURLOPT_FOLLOWLOCATION, true); - } - curl_setopt($crs, CURLOPT_CONNECTTIMEOUT, 5); - curl_setopt($crs, CURLOPT_TIMEOUT, 30); - curl_setopt($crs, CURLOPT_SSL_VERIFYPEER, false); - curl_setopt($crs, CURLOPT_SSL_VERIFYHOST, false); - curl_setopt($crs, CURLOPT_USERAGENT, 'tc-lib-file'); - curl_setopt($crs, CURLOPT_MAXREDIRS, 5); - if (defined('CURLOPT_PROTOCOLS')) { - curl_setopt($crs, CURLOPT_PROTOCOLS, CURLPROTO_HTTPS | CURLPROTO_HTTP | CURLPROTO_FTP | CURLPROTO_FTPS); + $curlopts = []; + if ( + (ini_get('open_basedir') == '') + && (ini_get('safe_mode') === '' + || ini_get('safe_mode') === false) + ) { + $curlopts[CURLOPT_FOLLOWLOCATION] = true; } + $curlopts = array_replace($curlopts, self::CURLOPT_DEFAULT); + $curlopts = array_replace($curlopts, K_CURLOPTS); + $curlopts = array_replace($curlopts, self::CURLOPT_FIXED); + $curlopts[CURLOPT_URL] = $url; + curl_setopt_array($crs, $curlopts); $ret = curl_exec($crs); curl_close($crs); if ($ret !== false) { diff --git a/vendor/tecnickcom/tcpdf/tcpdf.php b/vendor/tecnickcom/tcpdf/tcpdf.php index 48ae2b90896..7d967234b58 100644 --- a/vendor/tecnickcom/tcpdf/tcpdf.php +++ b/vendor/tecnickcom/tcpdf/tcpdf.php @@ -1,9 +1,9 @@ * @package com.tecnick.tcpdf * @author Nicola Asuni - * @version 6.6.5 + * @version 6.8.0 */ // TCPDF configuration @@ -128,7 +128,7 @@ * TCPDF project (http://www.tcpdf.org) has been originally derived in 2002 from the Public Domain FPDF class by Olivier Plathey (http://www.fpdf.org), but now is almost entirely rewritten.
* @package com.tecnick.tcpdf * @brief PHP class for generating PDF documents without requiring external extensions. - * @version 6.7.7 + * @version 6.8.0 * @author Nicola Asuni - info@tecnick.com * @IgnoreAnnotation("protected") * @IgnoreAnnotation("public") @@ -3007,6 +3007,7 @@ public function setAllowLocalFiles($allowLocalFiles) { public function Error($msg) { // unset all class variables $this->_destroy(true); + $msg = htmlspecialchars($msg, ENT_QUOTES, 'UTF-8'); if (defined('K_TCPDF_THROW_EXCEPTION_ERROR') AND !K_TCPDF_THROW_EXCEPTION_ERROR) { die('TCPDF ERROR: '.$msg); } else { @@ -17259,7 +17260,7 @@ protected function unserializeTCPDFtag($data) { $hlen = intval(substr($data, 0, $hpos)); $hash = substr($data, $hpos + 1, $hlen); $encoded = substr($data, $hpos + 2 + $hlen); - if ($hash != $this->hashTCPDFtag($encoded)) { + if (!hash_equals( $this->hashTCPDFtag($encoded), $hash)) { $this->Error('Invalid parameters'); } return json_decode(urldecode($encoded), true); @@ -19055,7 +19056,7 @@ protected function openHTMLTagHandler($dom, $key, $cell) { if ($imgsrc[0] === '@') { // data stream $imgsrc = '@'.base64_decode(substr($imgsrc, 1)); - $type = preg_match('/]*)>/si', $imgsrc) ? 'svg' : ''; + $type = preg_match('/]*[^>]*>.*<\/svg>/is', $imgsrc) ? 'svg' : ''; } else if (preg_match('@^data:image/([^;]*);base64,(.*)@', $imgsrc, $reg)) { $imgsrc = '@'.base64_decode($reg[2]); $type = $reg[1]; @@ -19124,7 +19125,7 @@ protected function openHTMLTagHandler($dom, $key, $cell) { $imglink = ''; if (isset($this->HREF['url']) AND !TCPDF_STATIC::empty_string($this->HREF['url'])) { $imglink = $this->HREF['url']; - if ($imglink[0] == '#') { + if ($imglink[0] == '#' AND is_numeric($imglink[1])) { // convert url to internal link $lnkdata = explode(',', $imglink); if (isset($lnkdata[0])) { @@ -23485,7 +23486,7 @@ protected function setSVGStyles($svgstyle, $prevsvgstyle, $x=0, $y=0, $w=1, $h=1 if (preg_match('/font-family[\s]*:[\s]*([^\;\"]*)/si', $svgstyle['font'], $regs)) { $font_family = $this->getFontFamilyName($regs[1]); } else { - $font_family = $svgstyle['font-family']; + $font_family = $this->getFontFamilyName($svgstyle['font-family']); } if (preg_match('/font-size[\s]*:[\s]*([^\s\;\"]*)/si', $svgstyle['font'], $regs)) { $font_size = trim($regs[1]); diff --git a/vendor/tecnickcom/tcpdf/tcpdf_autoconfig.php b/vendor/tecnickcom/tcpdf/tcpdf_autoconfig.php index 2bcfccb82b7..d34e2597764 100644 --- a/vendor/tecnickcom/tcpdf/tcpdf_autoconfig.php +++ b/vendor/tecnickcom/tcpdf/tcpdf_autoconfig.php @@ -240,6 +240,11 @@ define('K_TIMEZONE', @date_default_timezone_get()); } +// Custom cURL options for curl_setopt_array. +if (!defined('K_CURLOPTS')) { + define('K_CURLOPTS', array()); +} + //============================================================+ // END OF FILE //============================================================+