rework from legacy code on legacy container with php 5

This commit is contained in:
sabelo 2024-07-30 15:37:50 -03:00
parent 1016706c78
commit 74e8513651
9 changed files with 5193 additions and 2689 deletions

1
.gitignore vendored
View File

@ -2,6 +2,5 @@
/logs/*
!/logs/README.md
/templates/.cache
/db/clam2020.db
/db/.schema.lock
/db/bkp/*

Binary file not shown.

1614
participantes-clam2021.csv Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -37,13 +37,11 @@ namespace Composer\Autoload;
*
* @author Fabien Potencier <fabien@symfony.com>
* @author Jordi Boggiano <j.boggiano@seld.be>
* @see https://www.php-fig.org/psr/psr-0/
* @see https://www.php-fig.org/psr/psr-4/
* @see http://www.php-fig.org/psr/psr-0/
* @see http://www.php-fig.org/psr/psr-4/
*/
class ClassLoader
{
private $vendorDir;
// PSR-4
private $prefixLengthsPsr4 = array();
private $prefixDirsPsr4 = array();
@ -59,17 +57,10 @@ class ClassLoader
private $missingClasses = array();
private $apcuPrefix;
private static $registeredLoaders = array();
public function __construct($vendorDir = null)
{
$this->vendorDir = $vendorDir;
}
public function getPrefixes()
{
if (!empty($this->prefixesPsr0)) {
return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
return call_user_func_array('array_merge', $this->prefixesPsr0);
}
return array();
@ -309,17 +300,6 @@ class ClassLoader
public function register($prepend = false)
{
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
if (null === $this->vendorDir) {
return;
}
if ($prepend) {
self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
} else {
unset(self::$registeredLoaders[$this->vendorDir]);
self::$registeredLoaders[$this->vendorDir] = $this;
}
}
/**
@ -328,17 +308,13 @@ class ClassLoader
public function unregister()
{
spl_autoload_unregister(array($this, 'loadClass'));
if (null !== $this->vendorDir) {
unset(self::$registeredLoaders[$this->vendorDir]);
}
}
/**
* Loads the given class or interface.
*
* @param string $class The name of the class
* @return true|null True if loaded, null otherwise
* @return bool|null True if loaded, null otherwise
*/
public function loadClass($class)
{
@ -347,8 +323,6 @@ class ClassLoader
return true;
}
return null;
}
/**
@ -393,16 +367,6 @@ class ClassLoader
return $file;
}
/**
* Returns the currently registered loaders indexed by their corresponding vendor directories.
*
* @return self[]
*/
public static function getRegisteredLoaders()
{
return self::$registeredLoaders;
}
private function findFileWithExtension($class, $ext)
{
// PSR-4 lookup

View File

@ -6,7 +6,6 @@ $vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
'File_Iterator' => $vendorDir . '/phpunit/php-file-iterator/src/Iterator.php',
'File_Iterator_Facade' => $vendorDir . '/phpunit/php-file-iterator/src/Facade.php',
'File_Iterator_Factory' => $vendorDir . '/phpunit/php-file-iterator/src/Factory.php',

View File

@ -13,24 +13,19 @@ class ComposerAutoloaderInit0dd15d1e9d08041097652a874300c62a
}
}
/**
* @return \Composer\Autoload\ClassLoader
*/
public static function getLoader()
{
if (null !== self::$loader) {
return self::$loader;
}
require __DIR__ . '/platform_check.php';
spl_autoload_register(array('ComposerAutoloaderInit0dd15d1e9d08041097652a874300c62a', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInit0dd15d1e9d08041097652a874300c62a', 'loadClassLoader'));
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) {
require __DIR__ . '/autoload_static.php';
require_once __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit0dd15d1e9d08041097652a874300c62a::getInitializer($loader));
} else {

View File

@ -200,7 +200,6 @@ class ComposerStaticInit0dd15d1e9d08041097652a874300c62a
);
public static $classMap = array (
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
'File_Iterator' => __DIR__ . '/..' . '/phpunit/php-file-iterator/src/Iterator.php',
'File_Iterator_Facade' => __DIR__ . '/..' . '/phpunit/php-file-iterator/src/Facade.php',
'File_Iterator_Factory' => __DIR__ . '/..' . '/phpunit/php-file-iterator/src/Factory.php',

View File

@ -1,5 +1,4 @@
{
"packages": [
[
{
"name": "container-interop/container-interop",
"version": "1.2.0",
@ -31,8 +30,7 @@
"MIT"
],
"description": "Promoting the interoperability of container objects (DIC, SL, etc.)",
"homepage": "https://github.com/container-interop/container-interop",
"install-path": "../container-interop/container-interop"
"homepage": "https://github.com/container-interop/container-interop"
},
{
"name": "doctrine/instantiator",
@ -90,8 +88,7 @@
"keywords": [
"constructor",
"instantiate"
],
"install-path": "../doctrine/instantiator"
]
},
{
"name": "google/recaptcha",
@ -140,8 +137,7 @@
"captcha",
"recaptcha",
"spam"
],
"install-path": "../google/recaptcha"
]
},
{
"name": "kanellov/slim-twig-flash",
@ -198,8 +194,7 @@
"slim",
"twig",
"view"
],
"install-path": "../kanellov/slim-twig-flash"
]
},
{
"name": "monolog/monolog",
@ -279,8 +274,7 @@
"log",
"logging",
"psr-3"
],
"install-path": "../monolog/monolog"
]
},
{
"name": "myclabs/deep-copy",
@ -330,8 +324,7 @@
"duplicate",
"object",
"object graph"
],
"install-path": "../myclabs/deep-copy"
]
},
{
"name": "nikic/fast-route",
@ -379,8 +372,7 @@
"keywords": [
"router",
"routing"
],
"install-path": "../nikic/fast-route"
]
},
{
"name": "phpdocumentor/reflection-common",
@ -434,8 +426,7 @@
"phpdoc",
"reflection",
"static analysis"
],
"install-path": "../phpdocumentor/reflection-common"
]
},
{
"name": "phpdocumentor/reflection-docblock",
@ -488,8 +479,7 @@
"email": "me@mikevanriel.com"
}
],
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
"install-path": "../phpdocumentor/reflection-docblock"
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock."
},
{
"name": "phpdocumentor/type-resolver",
@ -538,8 +528,7 @@
"email": "me@mikevanriel.com"
}
],
"description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
"install-path": "../phpdocumentor/type-resolver"
"description": "A PSR-5 based resolver of Class names, Types and Structural Element Names"
},
{
"name": "phpmailer/phpmailer",
@ -603,8 +592,7 @@
"name": "Brent R. Matzelle"
}
],
"description": "PHPMailer is a full-featured email creation and transfer class for PHP",
"install-path": "../phpmailer/phpmailer"
"description": "PHPMailer is a full-featured email creation and transfer class for PHP"
},
{
"name": "phpspec/prophecy",
@ -669,8 +657,7 @@
"mock",
"spy",
"stub"
],
"install-path": "../phpspec/prophecy"
]
},
{
"name": "phpunit/php-code-coverage",
@ -735,8 +722,7 @@
"coverage",
"testing",
"xunit"
],
"install-path": "../phpunit/php-code-coverage"
]
},
{
"name": "phpunit/php-file-iterator",
@ -785,8 +771,7 @@
"keywords": [
"filesystem",
"iterator"
],
"install-path": "../phpunit/php-file-iterator"
]
},
{
"name": "phpunit/php-text-template",
@ -829,8 +814,7 @@
"homepage": "https://github.com/sebastianbergmann/php-text-template/",
"keywords": [
"template"
],
"install-path": "../phpunit/php-text-template"
]
},
{
"name": "phpunit/php-timer",
@ -881,8 +865,7 @@
"homepage": "https://github.com/sebastianbergmann/php-timer/",
"keywords": [
"timer"
],
"install-path": "../phpunit/php-timer"
]
},
{
"name": "phpunit/php-token-stream",
@ -933,8 +916,7 @@
"homepage": "https://github.com/sebastianbergmann/php-token-stream/",
"keywords": [
"tokenizer"
],
"install-path": "../phpunit/php-token-stream"
]
},
{
"name": "phpunit/phpunit",
@ -1018,8 +1000,7 @@
"phpunit",
"testing",
"xunit"
],
"install-path": "../phpunit/phpunit"
]
},
{
"name": "phpunit/phpunit-mock-objects",
@ -1080,8 +1061,7 @@
"keywords": [
"mock",
"xunit"
],
"install-path": "../phpunit/phpunit-mock-objects"
]
},
{
"name": "pimple/pimple",
@ -1133,8 +1113,7 @@
"keywords": [
"container",
"dependency injection"
],
"install-path": "../pimple/pimple"
]
},
{
"name": "psr/container",
@ -1185,8 +1164,7 @@
"container-interface",
"container-interop",
"psr"
],
"install-path": "../psr/container"
]
},
{
"name": "psr/http-factory",
@ -1240,8 +1218,7 @@
"psr-7",
"request",
"response"
],
"install-path": "../psr/http-factory"
]
},
{
"name": "psr/http-message",
@ -1293,8 +1270,7 @@
"psr-7",
"request",
"response"
],
"install-path": "../psr/http-message"
]
},
{
"name": "psr/http-server-handler",
@ -1349,8 +1325,7 @@
"request",
"response",
"server"
],
"install-path": "../psr/http-server-handler"
]
},
{
"name": "psr/http-server-middleware",
@ -1405,8 +1380,7 @@
"psr-7",
"request",
"response"
],
"install-path": "../psr/http-server-middleware"
]
},
{
"name": "psr/log",
@ -1455,8 +1429,7 @@
"log",
"psr",
"psr-3"
],
"install-path": "../psr/log"
]
},
{
"name": "sebastian/code-unit-reverse-lookup",
@ -1503,8 +1476,7 @@
}
],
"description": "Looks up which function or method a line of code belongs to",
"homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/",
"install-path": "../sebastian/code-unit-reverse-lookup"
"homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/"
},
{
"name": "sebastian/comparator",
@ -1570,8 +1542,7 @@
"comparator",
"compare",
"equality"
],
"install-path": "../sebastian/comparator"
]
},
{
"name": "sebastian/diff",
@ -1625,8 +1596,7 @@
"homepage": "https://github.com/sebastianbergmann/diff",
"keywords": [
"diff"
],
"install-path": "../sebastian/diff"
]
},
{
"name": "sebastian/environment",
@ -1678,8 +1648,7 @@
"Xdebug",
"environment",
"hhvm"
],
"install-path": "../sebastian/environment"
]
},
{
"name": "sebastian/exporter",
@ -1748,8 +1717,7 @@
"keywords": [
"export",
"exporter"
],
"install-path": "../sebastian/exporter"
]
},
{
"name": "sebastian/global-state",
@ -1802,8 +1770,7 @@
"homepage": "http://www.github.com/sebastianbergmann/global-state",
"keywords": [
"global state"
],
"install-path": "../sebastian/global-state"
]
},
{
"name": "sebastian/object-enumerator",
@ -1851,8 +1818,7 @@
}
],
"description": "Traverses array structures and object graphs to enumerate all referenced objects",
"homepage": "https://github.com/sebastianbergmann/object-enumerator/",
"install-path": "../sebastian/object-enumerator"
"homepage": "https://github.com/sebastianbergmann/object-enumerator/"
},
{
"name": "sebastian/recursion-context",
@ -1907,8 +1873,7 @@
}
],
"description": "Provides functionality to recursively process PHP variables",
"homepage": "http://www.github.com/sebastianbergmann/recursion-context",
"install-path": "../sebastian/recursion-context"
"homepage": "http://www.github.com/sebastianbergmann/recursion-context"
},
{
"name": "sebastian/resource-operations",
@ -1952,8 +1917,7 @@
}
],
"description": "Provides a list of PHP built-in functions that operate on resources",
"homepage": "https://www.github.com/sebastianbergmann/resource-operations",
"install-path": "../sebastian/resource-operations"
"homepage": "https://www.github.com/sebastianbergmann/resource-operations"
},
{
"name": "sebastian/version",
@ -1998,8 +1962,7 @@
}
],
"description": "Library that helps with managing the version number of Git-hosted PHP projects",
"homepage": "https://github.com/sebastianbergmann/version",
"install-path": "../sebastian/version"
"homepage": "https://github.com/sebastianbergmann/version"
},
{
"name": "slim/flash",
@ -2049,8 +2012,7 @@
"message",
"provider",
"slim"
],
"install-path": "../slim/flash"
]
},
{
"name": "slim/slim",
@ -2126,8 +2088,7 @@
"framework",
"micro",
"router"
],
"install-path": "../slim/slim"
]
},
{
"name": "slim/twig-view",
@ -2180,8 +2141,7 @@
"template",
"twig",
"view"
],
"install-path": "../slim/twig-view"
]
},
{
"name": "symfony/polyfill-ctype",
@ -2241,8 +2201,7 @@
"ctype",
"polyfill",
"portable"
],
"install-path": "../symfony/polyfill-ctype"
]
},
{
"name": "symfony/polyfill-mbstring",
@ -2303,8 +2262,7 @@
"polyfill",
"portable",
"shim"
],
"install-path": "../symfony/polyfill-mbstring"
]
},
{
"name": "symfony/yaml",
@ -2365,8 +2323,7 @@
}
],
"description": "Symfony Yaml Component",
"homepage": "https://symfony.com",
"install-path": "../symfony/yaml"
"homepage": "https://symfony.com"
},
{
"name": "tuupola/callable-handler",
@ -2421,8 +2378,7 @@
"middleware",
"psr-15",
"psr-7"
],
"install-path": "../tuupola/callable-handler"
]
},
{
"name": "tuupola/http-factory",
@ -2481,8 +2437,7 @@
"http",
"psr-17",
"psr-7"
],
"install-path": "../tuupola/http-factory"
]
},
{
"name": "tuupola/slim-basic-auth",
@ -2541,8 +2496,7 @@
"middleware",
"psr-15",
"psr-7"
],
"install-path": "../tuupola/slim-basic-auth"
]
},
{
"name": "twig/twig",
@ -2611,8 +2565,7 @@
"homepage": "https://twig.symfony.com",
"keywords": [
"templating"
],
"install-path": "../twig/twig"
]
},
{
"name": "webmozart/assert",
@ -2664,36 +2617,6 @@
"assert",
"check",
"validate"
],
"install-path": "../webmozart/assert"
}
],
"dev": true,
"dev-package-names": [
"doctrine/instantiator",
"myclabs/deep-copy",
"phpdocumentor/reflection-common",
"phpdocumentor/reflection-docblock",
"phpdocumentor/type-resolver",
"phpspec/prophecy",
"phpunit/php-code-coverage",
"phpunit/php-file-iterator",
"phpunit/php-text-template",
"phpunit/php-timer",
"phpunit/php-token-stream",
"phpunit/phpunit",
"phpunit/phpunit-mock-objects",
"sebastian/code-unit-reverse-lookup",
"sebastian/comparator",
"sebastian/diff",
"sebastian/environment",
"sebastian/exporter",
"sebastian/global-state",
"sebastian/object-enumerator",
"sebastian/recursion-context",
"sebastian/resource-operations",
"sebastian/version",
"symfony/yaml",
"webmozart/assert"
]
}
]