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/*
!/logs/README.md !/logs/README.md
/templates/.cache /templates/.cache
/db/clam2020.db
/db/.schema.lock /db/.schema.lock
/db/bkp/* /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 Fabien Potencier <fabien@symfony.com>
* @author Jordi Boggiano <j.boggiano@seld.be> * @author Jordi Boggiano <j.boggiano@seld.be>
* @see https://www.php-fig.org/psr/psr-0/ * @see http://www.php-fig.org/psr/psr-0/
* @see https://www.php-fig.org/psr/psr-4/ * @see http://www.php-fig.org/psr/psr-4/
*/ */
class ClassLoader class ClassLoader
{ {
private $vendorDir;
// PSR-4 // PSR-4
private $prefixLengthsPsr4 = array(); private $prefixLengthsPsr4 = array();
private $prefixDirsPsr4 = array(); private $prefixDirsPsr4 = array();
@ -59,17 +57,10 @@ class ClassLoader
private $missingClasses = array(); private $missingClasses = array();
private $apcuPrefix; private $apcuPrefix;
private static $registeredLoaders = array();
public function __construct($vendorDir = null)
{
$this->vendorDir = $vendorDir;
}
public function getPrefixes() public function getPrefixes()
{ {
if (!empty($this->prefixesPsr0)) { 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(); return array();
@ -309,17 +300,6 @@ class ClassLoader
public function register($prepend = false) public function register($prepend = false)
{ {
spl_autoload_register(array($this, 'loadClass'), true, $prepend); 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() public function unregister()
{ {
spl_autoload_unregister(array($this, 'loadClass')); spl_autoload_unregister(array($this, 'loadClass'));
if (null !== $this->vendorDir) {
unset(self::$registeredLoaders[$this->vendorDir]);
}
} }
/** /**
* Loads the given class or interface. * Loads the given class or interface.
* *
* @param string $class The name of the class * @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) public function loadClass($class)
{ {
@ -347,8 +323,6 @@ class ClassLoader
return true; return true;
} }
return null;
} }
/** /**
@ -393,16 +367,6 @@ class ClassLoader
return $file; 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) private function findFileWithExtension($class, $ext)
{ {
// PSR-4 lookup // PSR-4 lookup

View File

@ -6,7 +6,6 @@ $vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir); $baseDir = dirname($vendorDir);
return array( return array(
'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
'File_Iterator' => $vendorDir . '/phpunit/php-file-iterator/src/Iterator.php', 'File_Iterator' => $vendorDir . '/phpunit/php-file-iterator/src/Iterator.php',
'File_Iterator_Facade' => $vendorDir . '/phpunit/php-file-iterator/src/Facade.php', 'File_Iterator_Facade' => $vendorDir . '/phpunit/php-file-iterator/src/Facade.php',
'File_Iterator_Factory' => $vendorDir . '/phpunit/php-file-iterator/src/Factory.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() public static function getLoader()
{ {
if (null !== self::$loader) { if (null !== self::$loader) {
return self::$loader; return self::$loader;
} }
require __DIR__ . '/platform_check.php';
spl_autoload_register(array('ComposerAutoloaderInit0dd15d1e9d08041097652a874300c62a', 'loadClassLoader'), true, true); 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')); spl_autoload_unregister(array('ComposerAutoloaderInit0dd15d1e9d08041097652a874300c62a', 'loadClassLoader'));
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) { if ($useStaticLoader) {
require __DIR__ . '/autoload_static.php'; require_once __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit0dd15d1e9d08041097652a874300c62a::getInitializer($loader)); call_user_func(\Composer\Autoload\ComposerStaticInit0dd15d1e9d08041097652a874300c62a::getInitializer($loader));
} else { } else {

View File

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

View File

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