diff --git a/api-backend/src/UNAM/Tupa/Backend/API/Endpoints/v1/registros/registros.php b/api-backend/src/UNAM/Tupa/Backend/API/Endpoints/v1/registros/registros.php index 644ccecbf1db9328f7b07bc52f8a62cfd3a19b84..635b71f8c2a4772c9b3d9ad1222b79979e4d563b 100644 --- a/api-backend/src/UNAM/Tupa/Backend/API/Endpoints/v1/registros/registros.php +++ b/api-backend/src/UNAM/Tupa/Backend/API/Endpoints/v1/registros/registros.php @@ -529,7 +529,7 @@ class registros implements SIUToba\rest\lib\modelable } /** - * Se consume en PUT /registros/{id}/fallido. + * Se consume en PUT /registros/{id}/errorsolicitud. * * @summary Marca como fallida una solicitud de registro * @param_body $body string [required] el operador que realiza la tarea @@ -537,7 +537,7 @@ class registros implements SIUToba\rest\lib\modelable * @responses 404 No existe el recurso * @responses 500 Error interno */ - public function put_fallido_list($id) + public function put_errorsolicitud_list($id) { try { $manager = Factory::getManagerRegistro(); @@ -545,7 +545,42 @@ class registros implements SIUToba\rest\lib\modelable $registro = $manager->getRegistro($id); - $registro->errorSolicitud($operador); + $registro->errorSolicitud($operador, Registro::ESTADO_SOLICITUD_ERROR); + + $manager->actualizar($registro); + + rest::response()->put([ "respuesta" => true ]); + } catch (RegistroNotFound $e) { + Factory::getMainLogger()->error($e->getMessage()); + rest::response()->not_found(); + } catch (Exception $e) { + Factory::getMainLogger()->error($e->getMessage()); + if ($e->getCode() >= 400 || $e->getCode() < 500) { + rest::response()->error_negocio($e->getMessage(), 400); + } else { + rest::response()->error_negocio($e->getMessage(), 500); + } + } + } + + /** + * Se consume en PUT /registros/{id}/errorregistro. + * + * @summary Marca como fallido un registro + * @param_body $body string [required] el operador que realiza la tarea + * @responses 204 la solicitud queda rechazada + * @responses 404 No existe el recurso + * @responses 500 Error interno + */ + public function put_errorregistro_list($id) + { + try { + $manager = Factory::getManagerRegistro(); + $operador = rest::request()->get_body_json(); + + $registro = $manager->getRegistro($id); + + $registro->errorSolicitud($operador, Registro::ESTADO_REGISTRO_ERROR); $manager->actualizar($registro); diff --git a/backend/metadatos/componentes/toba_ei_filtro/dump_100000002.sql b/backend/metadatos/componentes/toba_ei_filtro/dump_100000002.sql index b7859b3eec464f23e12741238b2dee72fc347cc2..913ef52904ae5337b1692487dc62336c5647188f 100644 --- a/backend/metadatos/componentes/toba_ei_filtro/dump_100000002.sql +++ b/backend/metadatos/componentes/toba_ei_filtro/dump_100000002.sql @@ -327,7 +327,7 @@ INSERT INTO apex_objeto_ei_filtro_col (objeto_ei_filtro_col, objeto_ei_filtro, o NULL, --carga_consulta_php NULL, --carga_sql 'tupa', --carga_fuente - 'SOLICITUD_BORRADOR,SOLICITUD_PENDIENTE,SOLICITUD_VERIFICADO,SOLICITUD_ENVIADO,REGISTRO_PROCESANDO,REGISTRO_CREAR,REGISTRO_VINCULAR,REGISTRO_APROBADO,REGISTRO_RECHAZADO,REGISTRO_ERROR', --carga_lista + 'SOLICITUD_BORRADOR,SOLICITUD_PENDIENTE,SOLICITUD_VERIFICADO,SOLICITUD_ENVIADO,SOLICITUD_ERROR,REGISTRO_PROCESANDO,REGISTRO_CREAR,REGISTRO_VINCULAR,REGISTRO_APROBADO,REGISTRO_RECHAZADO,REGISTRO_ERROR', --carga_lista NULL, --carga_col_clave NULL, --carga_col_desc '1', --carga_permite_no_seteado diff --git a/backend/metadatos_compilados/comp/toba_mc_comp__100000002.php b/backend/metadatos_compilados/comp/toba_mc_comp__100000002.php index 5eb7e6ec3338e82f58992d25af1757a7d47977d8..6449d299776fa12df53d5da8f3de0dfbb1386936 100644 --- a/backend/metadatos_compilados/comp/toba_mc_comp__100000002.php +++ b/backend/metadatos_compilados/comp/toba_mc_comp__100000002.php @@ -330,7 +330,7 @@ class toba_mc_comp__100000002 'carga_consulta_php' => NULL, 'carga_sql' => NULL, 'carga_fuente' => 'tupa', - 'carga_lista' => 'SOLICITUD_BORRADOR,SOLICITUD_PENDIENTE,SOLICITUD_VERIFICADO,SOLICITUD_ENVIADO,REGISTRO_PROCESANDO,REGISTRO_CREAR,REGISTRO_VINCULAR,REGISTRO_APROBADO,REGISTRO_RECHAZADO,REGISTRO_ERROR', + 'carga_lista' => 'SOLICITUD_BORRADOR,SOLICITUD_PENDIENTE,SOLICITUD_VERIFICADO,SOLICITUD_ENVIADO,SOLICITUD_ERROR,REGISTRO_PROCESANDO,REGISTRO_CREAR,REGISTRO_VINCULAR,REGISTRO_APROBADO,REGISTRO_RECHAZADO,REGISTRO_ERROR', 'carga_col_clave' => NULL, 'carga_col_desc' => NULL, 'carga_permite_no_seteado' => 1, diff --git a/backend/metadatos_compilados/oper/toba_mc_oper__100000002.php b/backend/metadatos_compilados/oper/toba_mc_oper__100000002.php index 68966b0637aadd12f4641e0d2d5355b31dc6cb41..3c0d7874a893215ff3cfb0ef6171bc4ab75c32cd 100644 --- a/backend/metadatos_compilados/oper/toba_mc_oper__100000002.php +++ b/backend/metadatos_compilados/oper/toba_mc_oper__100000002.php @@ -3616,7 +3616,7 @@ class toba_mc_comp__100000002 'carga_consulta_php' => NULL, 'carga_sql' => NULL, 'carga_fuente' => 'tupa', - 'carga_lista' => 'SOLICITUD_BORRADOR,SOLICITUD_PENDIENTE,SOLICITUD_VERIFICADO,SOLICITUD_ENVIADO,REGISTRO_PROCESANDO,REGISTRO_CREAR,REGISTRO_VINCULAR,REGISTRO_APROBADO,REGISTRO_RECHAZADO,REGISTRO_ERROR', + 'carga_lista' => 'SOLICITUD_BORRADOR,SOLICITUD_PENDIENTE,SOLICITUD_VERIFICADO,SOLICITUD_ENVIADO,SOLICITUD_ERROR,REGISTRO_PROCESANDO,REGISTRO_CREAR,REGISTRO_VINCULAR,REGISTRO_APROBADO,REGISTRO_RECHAZADO,REGISTRO_ERROR', 'carga_col_clave' => NULL, 'carga_col_desc' => NULL, 'carga_permite_no_seteado' => 1, diff --git a/backend/php/solicitudes/usuarios/ci_solicitudes_usuarios.php b/backend/php/solicitudes/usuarios/ci_solicitudes_usuarios.php index 8edaa9e6aba4ea3eb70bd606f5debd79a82d693e..35108b27cb024b6958d4181c3bc3d609fd9815ad 100644 --- a/backend/php/solicitudes/usuarios/ci_solicitudes_usuarios.php +++ b/backend/php/solicitudes/usuarios/ci_solicitudes_usuarios.php @@ -44,10 +44,6 @@ class ci_solicitudes_usuarios extends tupa_ci $this->s__registro = $this->cn()->get_registro(); $this->ocultar_botones(); - - if ($this->s__registro->getEstadoActual() == Registro::ESTADO_REGISTRO_ERROR) { - $this->recuperar_estado_anterior(); - } } //----------------------------------------------------------------------------------- @@ -126,6 +122,19 @@ class ci_solicitudes_usuarios extends tupa_ci protected function ocultar_botones() { + $this->pantalla()->evento('forzar_envio_mail')->anular(); + if ($this->s__registro->getEstadoActual() == Registro::ESTADO_REGISTRO_ERROR) { + if (is_object($this->s__registro->getResultado())) { + if (in_array($this->s__registro->getResultado()->getTipo(), [Registro::ESTADO_REGISTRO_CREAR, Registro::ESTADO_REGISTRO_VINCULAR])) { + $this->pantalla()->evento('forzar_envio_mail')->restituir(); + } + } + } + + if ($this->s__registro->getEstadoActual() == Registro::ESTADO_REGISTRO_ERROR) { + $this->recuperar_estado_anterior(); + } + if ($this->s__registro->getEstadoActual() == Registro::ESTADO_REGISTRO_PROCESANDO) { $this->pantalla()->evento('procesar_solicitud')->anular(); $this->pantalla()->evento('rechazar_solicitud')->anular(); @@ -136,21 +145,12 @@ class ci_solicitudes_usuarios extends tupa_ci $this->pantalla()->evento('rechazar_solicitud')->restituir(); $this->pantalla()->evento('crear_usuario')->anular(); $this->pantalla()->evento('vincular_usuario')->anular(); - } elseif ($this->s__registro->getEstadoActual() == Registro::ESTADO_REGISTRO_APROBADO || $this->s__registro->getEstadoActual() == Registro::ESTADO_REGISTRO_RECHAZADO || $this->s__registro->getEstadoActual() == Registro::ESTADO_REGISTRO_ERROR) { + } elseif (in_array($this->s__registro->getEstadoActual(), [Registro::ESTADO_REGISTRO_APROBADO, Registro::ESTADO_REGISTRO_RECHAZADO, Registro::ESTADO_REGISTRO_ERROR, Registro::ESTADO_SOLICITUD_ERROR])) { $this->pantalla()->evento('procesar_solicitud')->anular(); $this->pantalla()->evento('rechazar_solicitud')->anular(); $this->pantalla()->evento('crear_usuario')->anular(); $this->pantalla()->evento('vincular_usuario')->anular(); } - - $this->pantalla()->evento('forzar_envio_mail')->anular(); - if ($this->s__registro->getEstadoActual() == Registro::ESTADO_REGISTRO_ERROR) { - if (is_object($this->s__registro->getResultado())) { - if ($this->s__registro->getResultado()->getTipo() == Registro::ESTADO_REGISTRO_CREAR || $this->s__registro->getResultado()->getTipo() == Registro::ESTADO_REGISTRO_VINCULAR) { - $this->pantalla()->evento('forzar_envio_mail')->restituir(); - } - } - } } /** @@ -159,6 +159,7 @@ class ci_solicitudes_usuarios extends tupa_ci private function recuperar_estado_anterior() { $estados = $this->s__registro->getDatos()['movimientos']; + $estado_anterior = $estados[array_key_last($estados) - 1]['estado']; if ($estado_anterior != Registro::ESTADO_SOLICITUD_PENDIENTE) { @@ -192,5 +193,7 @@ class ci_solicitudes_usuarios extends tupa_ci $this->cn()->set_usuario_arai($this->s__registro->getUidUsuario()); $this->cn()->aprobar_solicitud(Registro::ESTADO_REGISTRO_VINCULAR); } + + $this->agregar_notificacion('Se realizó el reenvío del email de aprobación del registro.'); } } diff --git a/core/src/UNAM/Tupa/Core/Config/Builder/CredentialsConfigBuilder.php b/core/src/UNAM/Tupa/Core/Config/Builder/CredentialsConfigBuilder.php new file mode 100644 index 0000000000000000000000000000000000000000..c4f84dc736f8c55879f3fd633cef894f19b3aa69 --- /dev/null +++ b/core/src/UNAM/Tupa/Core/Config/Builder/CredentialsConfigBuilder.php @@ -0,0 +1,21 @@ +<?php + +namespace UNAM\Tupa\Core\Config\Builder; + +use Symfony\Component\Config\Definition\Builder\TreeBuilder; +use Symfony\Component\Config\Definition\ConfigurationInterface; + +class CredentialsConfigBuilder implements ConfigurationInterface +{ + public function getConfigTreeBuilder() + { + $treeBuilder = new TreeBuilder('credentials'); + $treeBuilder->getRootNode() + ->children() + ->scalarNode('api_basic_tupa')->end() + ->end() + ; + + return $treeBuilder; + } +} diff --git a/core/src/UNAM/Tupa/Core/Config/Configuracion.php b/core/src/UNAM/Tupa/Core/Config/Configuracion.php index 24fa650212bd3d7cabed31c62b8d43cf40f0ab7e..a3f37248765477d5721f2d96a3e4e9067ae56c58 100644 --- a/core/src/UNAM/Tupa/Core/Config/Configuracion.php +++ b/core/src/UNAM/Tupa/Core/Config/Configuracion.php @@ -26,6 +26,7 @@ abstract class Configuracion const DATABASE_DB_INDEX = 'db'; const WORKER_INDEX = 'worker'; const FRONTEND_INDEX = 'frontend'; + const CREDENTIAL_INDEX = 'credentials'; /** * @param array $configurations @@ -35,6 +36,41 @@ abstract class Configuracion $this->configurations = $configurations; } + /** + * Obtiene el User de la credencial de Api Tupa Basic + * @return mixed|null + * @throws \UNAM\Tupa\Worker\Errors\ErrorTupa + */ + public function getUserApiTupaBasic() + { + $credencial = json_decode($this->getParametroCredentials('api_basic_tupa'), true); + return isset($credencial[0][0]) ? $credencial[0][0] : null; + } + + /** + * Obtiene el Password de la credencial de Api Tupa Basic + * + * @return mixed|null + * @throws \UNAM\Tupa\Worker\Errors\ErrorTupa + */ + public function getPassApiTupaBasic() + { + $credencial = json_decode($this->getParametroCredentials('api_basic_tupa'), true); + return isset($credencial[0][1]) ? $credencial[0][1] : null; + } + + /** + * Obtiene la Url de la credencial de Api Tupa Basic + * + * @return mixed|null + * @throws \UNAM\Tupa\Worker\Errors\ErrorTupa + */ + public function getUrlApiTupaBasic() + { + $credencial = json_decode($this->getParametroCredentials('api_basic_tupa'), true); + return isset($credencial[0][2]) ? $credencial[0][2] : null; + } + /** * Obtiene la URL pública para el IDP * @@ -1145,6 +1181,26 @@ abstract class Configuracion return $this->hasParametro(self::SERVICES_INDEX, $parametro); } + public function getParametroCredentials($parametro) + { + if (!$this->hasParametroCredentials($parametro)) { + throw new \UNAM\Tupa\Worker\Errors\ErrorTupa("No se encuentra definido el parametro '$parametro' en las configuraciones de Credentials."); + } + + return $this->getParametro(self::CREDENTIAL_INDEX, $parametro); + } + + public function setParametroCredentials($parametro, $valor = null) + { + $this->setParametro(self::CREDENTIAL_INDEX, $parametro, $valor); + } + + public function hasParametroCredentials($parametro) + { + return $this->hasParametro(self::CREDENTIAL_INDEX, $parametro); + } + + /** * Almacena valores en claves simples o compuestas (tipo array). * diff --git a/core/src/UNAM/Tupa/Core/Negocio/Solicitudes/Movimiento.php b/core/src/UNAM/Tupa/Core/Negocio/Solicitudes/Movimiento.php index 9b7f0b1c3d5359a4446aef71b290cf6b993b89cb..d9738e6e5ae45a2a44560d4e15d7e071f8c512cb 100644 --- a/core/src/UNAM/Tupa/Core/Negocio/Solicitudes/Movimiento.php +++ b/core/src/UNAM/Tupa/Core/Negocio/Solicitudes/Movimiento.php @@ -82,6 +82,7 @@ class Movimiento Registro::ESTADO_REGISTRO_APROBADO, Registro::ESTADO_SOLICITUD_ENVIADO, Registro::ESTADO_SOLICITUD_VERIFICADO, + Registro::ESTADO_SOLICITUD_ERROR, Registro::ESTADO_REGISTRO_PROCESANDO, Registro::ESTADO_REGISTRO_CREAR, Registro::ESTADO_REGISTRO_VINCULAR, diff --git a/core/src/UNAM/Tupa/Core/Negocio/Solicitudes/Registro.php b/core/src/UNAM/Tupa/Core/Negocio/Solicitudes/Registro.php index 17f002e472c3c486d9ec9d3f8aaa7b223ccd18f3..95384495149c35bfb20d313930e23091b77090de 100644 --- a/core/src/UNAM/Tupa/Core/Negocio/Solicitudes/Registro.php +++ b/core/src/UNAM/Tupa/Core/Negocio/Solicitudes/Registro.php @@ -21,6 +21,7 @@ class Registro const ESTADO_SOLICITUD_PENDIENTE = "SOLICITUD_PENDIENTE"; const ESTADO_SOLICITUD_VERIFICADO = "SOLICITUD_VERIFICADO"; const ESTADO_SOLICITUD_ENVIADO = "SOLICITUD_ENVIADO"; + const ESTADO_SOLICITUD_ERROR = "SOLICITUD_ERROR"; const ESTADO_REGISTRO_PROCESANDO = "REGISTRO_PROCESANDO"; const ESTADO_REGISTRO_CREAR = "REGISTRO_CREAR"; const ESTADO_REGISTRO_VINCULAR = "REGISTRO_VINCULAR"; @@ -93,7 +94,7 @@ class Registro private $usuario_arai; /** - * @var string + * @var string */ private $fecha_creacion; @@ -367,7 +368,6 @@ class Registro } if (isset($datos['datos_personales'])) { - $personales = new Personal( $datos['datos_personales']['nombre'] ?? '', $datos['datos_personales']['apellido'] ?? '', @@ -375,7 +375,7 @@ class Registro $datos['datos_personales']['legajo'] ?? 0 ); - if (isset ($datos['datos_personales']['documentos'])) { + if (isset($datos['datos_personales']['documentos'])) { $datos_documento = $datos['datos_personales']['documentos']; if (is_array($datos_documento)) { foreach ($datos_documento as $dato_documento) { @@ -484,10 +484,19 @@ class Registro /** * @param string $operador el usuario que realiza la operación + * @param string $tipo + */ + public function errorSolicitud(string $operador, string $tipo) + { + $this->actualizarEstadoActual($tipo, $operador); + } + + /** + * @return string[] */ - public function errorSolicitud(string $operador) + public static function tiposError(): array { - $this->actualizarEstadoActual(self::ESTADO_REGISTRO_ERROR, $operador); + return [self::ESTADO_REGISTRO_ERROR, self::ESTADO_SOLICITUD_ERROR]; } /** diff --git a/docker/backend/.env.dist b/docker/backend/.env.dist index a76676a79247ed02cbb4e4e05dadfc58d5a1d487..ceb80f081b48f62422d8d56d00fd82507dd3422f 100644 --- a/docker/backend/.env.dist +++ b/docker/backend/.env.dist @@ -48,9 +48,9 @@ TOBA_SESSION_NAME=TOBA_TUPA #SSO_SP_IDP_NAME=service.example.com ##### CONFIG API REST ##### -CREDENCIALES_API_BASIC_TUPA=[["tupausr", "tupapass", "http://tupa-api-backend/api-url/"]] -CREDENCIALES_API_BASIC_MAPUCHE=[["tupausr", "tupapass", "http://siu-mapuche/api-url/"]] -CREDENCIALES_API_BASIC_USUARIOS=[["tupausr", "tupapass", "http://siu-arai-usuarios/api-url/"]] +CREDENCIALES_API_BASIC_TUPA=[["tupausr","tupapass","http://tupa-api-backend/api-url/"]] +CREDENCIALES_API_BASIC_MAPUCHE=[["tupausr","tupapass","http://siu-mapuche/api-url/"]] +CREDENCIALES_API_BASIC_USUARIOS=[["tupausr","tupapass","http://siu-arai-usuarios/api-url/"]] ##### CONFIG REDIS ##### REDIS_HOST=tupa_redis diff --git a/docker/worker/.env.dist b/docker/worker/.env.dist index 8d0d7834903f80ff0a74318b49726751e642e953..04d2affb9492bf24391a8306cc85e77288aa1685 100644 --- a/docker/worker/.env.dist +++ b/docker/worker/.env.dist @@ -21,4 +21,7 @@ WORKER_QUEUE_MAIL_REINTENTOS=5 WORKER_QUEUE_MAIL_RETRASO=2000 #WORKER_QUEUE_MAIL_EXPIRACION=5000 #WORKER_QUEUE_MAIL_PRIORIDAD=1 -#WORKER_QUEUE_MAIL_DRY_RUN=0 \ No newline at end of file +#WORKER_QUEUE_MAIL_DRY_RUN=0 + +##### CONFIG API ##### +CREDENCIALES_API_BASIC_TUPA=[["tupausr","tupapass","http://tupa-api-backend/api-url/"]] \ No newline at end of file diff --git a/worker/bin/worker b/worker/bin/worker index d1e86858f44d02f9bc50c7af260c8210a5c8f236..6be4b96b67eefeaa823f302b1a46ddaffb22f7b1 100755 --- a/worker/bin/worker +++ b/worker/bin/worker @@ -26,19 +26,6 @@ if (is_file(realpath(__DIR__.'/../.env'))) { $dotenv->overload(); } -if (is_file(realpath(__DIR__.'/../../backend/instalacion/entorno_toba.env'))) { - $entorno_toba = \Dotenv\Dotenv::create(realpath(__DIR__.'/../../backend/instalacion/'), 'entorno_toba.env'); - $entorno_toba->load(); -} - -if (is_file(realpath(__DIR__.'/../../docker/backend/.env'))) { - $backend_env = \Dotenv\Dotenv::create(realpath(__DIR__.'/../../docker/backend/')); - $backend_env->load(); -} elseif (is_file(realpath(__DIR__.'/../../backend/.env'))) { - $backend_env = \Dotenv\Dotenv::create(realpath(__DIR__.'/../../backend/')); - $backend_env->load(); -} - /** * Transport */ @@ -69,7 +56,7 @@ $mailer->registerPlugin(new Swift_Plugins_AntiFloodPlugin(100, 30)); $messages = new Messages($mailer, new EmailTemplate(), Factory::getJobLogger()); $queueConsumer->bind(Messages::QUEUE_MAIL_SIMPLE, new \UNAM\Tupa\Worker\Processors\SendMailProcessor(Factory::getJobLogger(), $messages, $workerConfig, $transport)); -$queueConsumer->bind(Registro::QUEUE_CAMBIO_ESTADO_REGISTRO, new \UNAM\Tupa\Worker\Processors\ChangeStatusRegistroProcessor(Factory::getJobLogger())); +$queueConsumer->bind(Registro::QUEUE_CAMBIO_ESTADO_REGISTRO, new \UNAM\Tupa\Worker\Processors\ChangeStatusRegistroProcessor(Factory::getJobLogger(), new GuzzleHttp\Client(), $workerConfig)); /** * Applications Worker Comamnds diff --git a/worker/composer.json b/worker/composer.json index 83c815dc4df9a4636d420e617f496cef470c32ad..ae50698aad92e02776d8285c82cee4da93290af6 100644 --- a/worker/composer.json +++ b/worker/composer.json @@ -30,7 +30,8 @@ "symfony/console": "~4.0", "swiftmailer/swiftmailer": "^6.0", "vlucas/phpdotenv": "~3.6", - "unam-ar/tupa-core": "*" + "unam-ar/tupa-core": "*", + "guzzlehttp/guzzle": "^7.0" }, "autoload": { diff --git a/worker/composer.lock b/worker/composer.lock index 3fa725c08f08d4e0ea9f1c384cb4b05c2b609936..0b52bb1d8f187bfcf82cc0f2f7e611569e20fbda 100644 --- a/worker/composer.lock +++ b/worker/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": "489a377d30318afb38192b405d083596", + "content-hash": "4499d1525cd710898187f262689ff739", "packages": [ { "name": "doctrine/lexer", @@ -84,16 +84,16 @@ }, { "name": "egulias/email-validator", - "version": "2.1.18", + "version": "2.1.20", "source": { "type": "git", "url": "https://github.com/egulias/EmailValidator.git", - "reference": "cfa3d44471c7f5bfb684ac2b0da7114283d78441" + "reference": "f46887bc48db66c7f38f668eb7d6ae54583617ff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/cfa3d44471c7f5bfb684ac2b0da7114283d78441", - "reference": "cfa3d44471c7f5bfb684ac2b0da7114283d78441", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/f46887bc48db66c7f38f668eb7d6ae54583617ff", + "reference": "f46887bc48db66c7f38f668eb7d6ae54583617ff", "shasum": "" }, "require": { @@ -138,7 +138,7 @@ "validation", "validator" ], - "time": "2020-06-16T20:11:17+00:00" + "time": "2020-09-06T13:44:32+00:00" }, { "name": "enqueue/dsn", @@ -381,18 +381,221 @@ ], "time": "2019-06-07T00:32:02+00:00" }, + { + "name": "guzzlehttp/guzzle", + "version": "7.0.1", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "2d9d3c186a6637a43193e66b097c50e4451eaab2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/2d9d3c186a6637a43193e66b097c50e4451eaab2", + "reference": "2d9d3c186a6637a43193e66b097c50e4451eaab2", + "shasum": "" + }, + "require": { + "ext-json": "*", + "guzzlehttp/promises": "^1.0", + "guzzlehttp/psr7": "^1.6.1", + "php": "^7.2.5", + "psr/http-client": "^1.0" + }, + "provide": { + "psr/http-client-implementation": "1.0" + }, + "require-dev": { + "ergebnis/composer-normalize": "^2.0", + "ext-curl": "*", + "php-http/client-integration-tests": "dev-phpunit8", + "phpunit/phpunit": "^8.5.5", + "psr/log": "^1.1" + }, + "suggest": { + "ext-curl": "Required for CURL handler support", + "ext-intl": "Required for Internationalized Domain Name (IDN) support", + "psr/log": "Required for using the Log middleware" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "7.0-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://sagikazarmark.hu" + } + ], + "description": "Guzzle is a PHP HTTP client library", + "homepage": "http://guzzlephp.org/", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "psr-18", + "psr-7", + "rest", + "web service" + ], + "time": "2020-06-27T10:33:25+00:00" + }, + { + "name": "guzzlehttp/promises", + "version": "v1.3.1", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "shasum": "" + }, + "require": { + "php": ">=5.5.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "time": "2016-12-20T10:07:11+00:00" + }, + { + "name": "guzzlehttp/psr7", + "version": "1.6.1", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "239400de7a173fe9901b9ac7c06497751f00727a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/239400de7a173fe9901b9ac7c06497751f00727a", + "reference": "239400de7a173fe9901b9ac7c06497751f00727a", + "shasum": "" + }, + "require": { + "php": ">=5.4.0", + "psr/http-message": "~1.0", + "ralouphie/getallheaders": "^2.0.5 || ^3.0.0" + }, + "provide": { + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "ext-zlib": "*", + "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8" + }, + "suggest": { + "zendframework/zend-httphandlerrunner": "Emit PSR-7 responses" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.6-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Schultze", + "homepage": "https://github.com/Tobion" + } + ], + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "http", + "message", + "psr-7", + "request", + "response", + "stream", + "uri", + "url" + ], + "time": "2019-07-01T23:21:34+00:00" + }, { "name": "monolog/monolog", - "version": "1.25.4", + "version": "1.25.5", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "3022efff205e2448b560c833c6fbbf91c3139168" + "reference": "1817faadd1846cd08be9a49e905dc68823bc38c0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/3022efff205e2448b560c833c6fbbf91c3139168", - "reference": "3022efff205e2448b560c833c6fbbf91c3139168", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/1817faadd1846cd08be9a49e905dc68823bc38c0", + "reference": "1817faadd1846cd08be9a49e905dc68823bc38c0", "shasum": "" }, "require": { @@ -466,7 +669,7 @@ "type": "tidelift" } ], - "time": "2020-05-22T07:31:27+00:00" + "time": "2020-07-23T08:35:51+00:00" }, { "name": "paragonie/random_compat", @@ -515,24 +718,24 @@ }, { "name": "phpoption/phpoption", - "version": "1.7.4", + "version": "1.7.5", "source": { "type": "git", "url": "https://github.com/schmittjoh/php-option.git", - "reference": "b2ada2ad5d8a32b89088b8adc31ecd2e3a13baf3" + "reference": "994ecccd8f3283ecf5ac33254543eb0ac946d525" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/b2ada2ad5d8a32b89088b8adc31ecd2e3a13baf3", - "reference": "b2ada2ad5d8a32b89088b8adc31ecd2e3a13baf3", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/994ecccd8f3283ecf5ac33254543eb0ac946d525", + "reference": "994ecccd8f3283ecf5ac33254543eb0ac946d525", "shasum": "" }, "require": { "php": "^5.5.9 || ^7.0 || ^8.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.3", - "phpunit/phpunit": "^4.8.35 || ^5.0 || ^6.0 || ^7.0" + "bamarni/composer-bin-plugin": "^1.4.1", + "phpunit/phpunit": "^4.8.35 || ^5.7.27 || ^6.5.6 || ^7.0 || ^8.0 || ^9.0" }, "type": "library", "extra": { @@ -576,7 +779,7 @@ "type": "tidelift" } ], - "time": "2020-06-07T10:40:07+00:00" + "time": "2020-07-20T17:29:33+00:00" }, { "name": "pimple/pimple", @@ -723,6 +926,105 @@ ], "time": "2017-02-14T16:28:37+00:00" }, + { + "name": "psr/http-client", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-client.git", + "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", + "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0", + "psr/http-message": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Client\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP clients", + "homepage": "https://github.com/php-fig/http-client", + "keywords": [ + "http", + "http-client", + "psr", + "psr-18" + ], + "time": "2020-06-29T06:28:15+00:00" + }, + { + "name": "psr/http-message", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "time": "2016-08-06T14:39:51+00:00" + }, { "name": "psr/log", "version": "1.1.3", @@ -855,6 +1157,46 @@ ], "time": "2018-11-22T17:53:21+00:00" }, + { + "name": "ralouphie/getallheaders", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "120b605dfeb996808c31b6477290a714d356e822" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", + "reference": "120b605dfeb996808c31b6477290a714d356e822", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^5 || ^6.5" + }, + "type": "library", + "autoload": { + "files": [ + "src/getallheaders.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "description": "A polyfill for getallheaders.", + "time": "2019-03-08T08:55:37+00:00" + }, { "name": "ramsey/uuid", "version": "3.9.3", @@ -1145,20 +1487,20 @@ }, { "name": "symfony/cache-contracts", - "version": "v1.1.7", + "version": "v1.1.9", "source": { "type": "git", "url": "https://github.com/symfony/cache-contracts.git", - "reference": "af50d14ada9e4e82cfabfabdc502d144f89be0a1" + "reference": "4638bdd93e14dddc171212258d0c6d8c95e95ced" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/cache-contracts/zipball/af50d14ada9e4e82cfabfabdc502d144f89be0a1", - "reference": "af50d14ada9e4e82cfabfabdc502d144f89be0a1", + "url": "https://api.github.com/repos/symfony/cache-contracts/zipball/4638bdd93e14dddc171212258d0c6d8c95e95ced", + "reference": "4638bdd93e14dddc171212258d0c6d8c95e95ced", "shasum": "" }, "require": { - "php": "^7.1.3", + "php": ">=7.1.3", "psr/cache": "^1.0" }, "suggest": { @@ -1168,6 +1510,10 @@ "extra": { "branch-alias": { "dev-master": "1.1-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" } }, "autoload": { @@ -1199,7 +1545,21 @@ "interoperability", "standards" ], - "time": "2019-10-04T21:43:27+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-07-06T13:19:58+00:00" }, { "name": "symfony/config", @@ -1267,16 +1627,16 @@ }, { "name": "symfony/console", - "version": "v4.4.10", + "version": "v4.4.13", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "326b064d804043005526f5a0494cfb49edb59bb0" + "reference": "b39fd99b9297b67fb7633b7d8083957a97e1e727" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/326b064d804043005526f5a0494cfb49edb59bb0", - "reference": "326b064d804043005526f5a0494cfb49edb59bb0", + "url": "https://api.github.com/repos/symfony/console/zipball/b39fd99b9297b67fb7633b7d8083957a97e1e727", + "reference": "b39fd99b9297b67fb7633b7d8083957a97e1e727", "shasum": "" }, "require": { @@ -1354,20 +1714,20 @@ "type": "tidelift" } ], - "time": "2020-05-30T20:06:45+00:00" + "time": "2020-09-02T07:07:21+00:00" }, { "name": "symfony/filesystem", - "version": "v4.4.10", + "version": "v4.4.13", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "b27f491309db5757816db672b256ea2e03677d30" + "reference": "27575bcbc68db1f6d06218891296572c9b845704" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/b27f491309db5757816db672b256ea2e03677d30", - "reference": "b27f491309db5757816db672b256ea2e03677d30", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/27575bcbc68db1f6d06218891296572c9b845704", + "reference": "27575bcbc68db1f6d06218891296572c9b845704", "shasum": "" }, "require": { @@ -1418,20 +1778,20 @@ "type": "tidelift" } ], - "time": "2020-05-30T18:50:54+00:00" + "time": "2020-08-21T17:19:37+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.17.1", + "version": "v1.18.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "2edd75b8b35d62fd3eeabba73b26b8f1f60ce13d" + "reference": "1c302646f6efc070cd46856e600e5e0684d6b454" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/2edd75b8b35d62fd3eeabba73b26b8f1f60ce13d", - "reference": "2edd75b8b35d62fd3eeabba73b26b8f1f60ce13d", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/1c302646f6efc070cd46856e600e5e0684d6b454", + "reference": "1c302646f6efc070cd46856e600e5e0684d6b454", "shasum": "" }, "require": { @@ -1443,7 +1803,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.17-dev" + "dev-master": "1.18-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1494,20 +1854,20 @@ "type": "tidelift" } ], - "time": "2020-06-06T08:46:27+00:00" + "time": "2020-07-14T12:35:20+00:00" }, { "name": "symfony/polyfill-iconv", - "version": "v1.17.1", + "version": "v1.18.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-iconv.git", - "reference": "ba6c9c18db36235b859cc29b8372d1c01298c035" + "reference": "6c2f78eb8f5ab8eaea98f6d414a5915f2e0fce36" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/ba6c9c18db36235b859cc29b8372d1c01298c035", - "reference": "ba6c9c18db36235b859cc29b8372d1c01298c035", + "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/6c2f78eb8f5ab8eaea98f6d414a5915f2e0fce36", + "reference": "6c2f78eb8f5ab8eaea98f6d414a5915f2e0fce36", "shasum": "" }, "require": { @@ -1519,7 +1879,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.17-dev" + "dev-master": "1.18-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1571,25 +1931,26 @@ "type": "tidelift" } ], - "time": "2020-06-06T08:46:27+00:00" + "time": "2020-07-14T12:35:20+00:00" }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.17.1", + "version": "v1.18.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "a57f8161502549a742a63c09f0a604997bf47027" + "reference": "5dcab1bc7146cf8c1beaa4502a3d9be344334251" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/a57f8161502549a742a63c09f0a604997bf47027", - "reference": "a57f8161502549a742a63c09f0a604997bf47027", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/5dcab1bc7146cf8c1beaa4502a3d9be344334251", + "reference": "5dcab1bc7146cf8c1beaa4502a3d9be344334251", "shasum": "" }, "require": { "php": ">=5.3.3", - "symfony/polyfill-mbstring": "^1.3", + "symfony/polyfill-intl-normalizer": "^1.10", + "symfony/polyfill-php70": "^1.10", "symfony/polyfill-php72": "^1.10" }, "suggest": { @@ -1598,7 +1959,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.17-dev" + "dev-master": "1.18-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1622,6 +1983,10 @@ "name": "Laurent Bassin", "email": "laurent@bassin.info" }, + { + "name": "Trevor Rowbotham", + "email": "trevor.rowbotham@pm.me" + }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" @@ -1651,20 +2016,101 @@ "type": "tidelift" } ], - "time": "2020-06-06T08:46:27+00:00" + "time": "2020-08-04T06:02:08+00:00" + }, + { + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.18.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e", + "reference": "37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's Normalizer class and related functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-07-14T12:35:20+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.17.1", + "version": "v1.18.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "7110338d81ce1cbc3e273136e4574663627037a7" + "reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/7110338d81ce1cbc3e273136e4574663627037a7", - "reference": "7110338d81ce1cbc3e273136e4574663627037a7", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/a6977d63bf9a0ad4c65cd352709e230876f9904a", + "reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a", "shasum": "" }, "require": { @@ -1676,7 +2122,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.17-dev" + "dev-master": "1.18-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1728,20 +2174,97 @@ "type": "tidelift" } ], - "time": "2020-06-06T08:46:27+00:00" + "time": "2020-07-14T12:35:20+00:00" + }, + { + "name": "symfony/polyfill-php70", + "version": "v1.18.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php70.git", + "reference": "0dd93f2c578bdc9c72697eaa5f1dd25644e618d3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/0dd93f2c578bdc9c72697eaa5f1dd25644e618d3", + "reference": "0dd93f2c578bdc9c72697eaa5f1dd25644e618d3", + "shasum": "" + }, + "require": { + "paragonie/random_compat": "~1.0|~2.0|~9.99", + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php70\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-07-14T12:35:20+00:00" }, { "name": "symfony/polyfill-php72", - "version": "v1.17.0", + "version": "v1.18.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "f048e612a3905f34931127360bdd2def19a5e582" + "reference": "639447d008615574653fb3bc60d1986d7172eaae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/f048e612a3905f34931127360bdd2def19a5e582", - "reference": "f048e612a3905f34931127360bdd2def19a5e582", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/639447d008615574653fb3bc60d1986d7172eaae", + "reference": "639447d008615574653fb3bc60d1986d7172eaae", "shasum": "" }, "require": { @@ -1750,7 +2273,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.17-dev" + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -1797,20 +2324,20 @@ "type": "tidelift" } ], - "time": "2020-05-12T16:47:27+00:00" + "time": "2020-07-14T12:35:20+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.17.1", + "version": "v1.18.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "fa0837fe02d617d31fbb25f990655861bb27bd1a" + "reference": "fffa1a52a023e782cdcc221d781fe1ec8f87fcca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fa0837fe02d617d31fbb25f990655861bb27bd1a", - "reference": "fa0837fe02d617d31fbb25f990655861bb27bd1a", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fffa1a52a023e782cdcc221d781fe1ec8f87fcca", + "reference": "fffa1a52a023e782cdcc221d781fe1ec8f87fcca", "shasum": "" }, "require": { @@ -1819,7 +2346,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.17-dev" + "dev-master": "1.18-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1873,20 +2400,20 @@ "type": "tidelift" } ], - "time": "2020-06-06T08:46:27+00:00" + "time": "2020-07-14T12:35:20+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.17.1", + "version": "v1.18.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "4a5b6bba3259902e386eb80dd1956181ee90b5b2" + "reference": "d87d5766cbf48d72388a9f6b85f280c8ad51f981" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/4a5b6bba3259902e386eb80dd1956181ee90b5b2", - "reference": "4a5b6bba3259902e386eb80dd1956181ee90b5b2", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/d87d5766cbf48d72388a9f6b85f280c8ad51f981", + "reference": "d87d5766cbf48d72388a9f6b85f280c8ad51f981", "shasum": "" }, "require": { @@ -1895,7 +2422,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.17-dev" + "dev-master": "1.18-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1953,24 +2480,24 @@ "type": "tidelift" } ], - "time": "2020-06-06T08:46:27+00:00" + "time": "2020-07-14T12:35:20+00:00" }, { "name": "symfony/service-contracts", - "version": "v1.1.8", + "version": "v1.1.9", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "ffc7f5692092df31515df2a5ecf3b7302b3ddacf" + "reference": "b776d18b303a39f56c63747bcb977ad4b27aca26" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/ffc7f5692092df31515df2a5ecf3b7302b3ddacf", - "reference": "ffc7f5692092df31515df2a5ecf3b7302b3ddacf", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/b776d18b303a39f56c63747bcb977ad4b27aca26", + "reference": "b776d18b303a39f56c63747bcb977ad4b27aca26", "shasum": "" }, "require": { - "php": "^7.1.3", + "php": ">=7.1.3", "psr/container": "^1.0" }, "suggest": { @@ -1980,6 +2507,10 @@ "extra": { "branch-alias": { "dev-master": "1.1-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" } }, "autoload": { @@ -2011,24 +2542,38 @@ "interoperability", "standards" ], - "time": "2019-10-14T12:27:06+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-07-06T13:19:58+00:00" }, { "name": "symfony/var-exporter", - "version": "v4.4.10", + "version": "v4.4.13", "source": { "type": "git", "url": "https://github.com/symfony/var-exporter.git", - "reference": "f311af6e44fefedbd4f1e23e97607ef0f917bfcc" + "reference": "09f0aec4b8bfc25c1dd306e6203cf055c9886560" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-exporter/zipball/f311af6e44fefedbd4f1e23e97607ef0f917bfcc", - "reference": "f311af6e44fefedbd4f1e23e97607ef0f917bfcc", + "url": "https://api.github.com/repos/symfony/var-exporter/zipball/09f0aec4b8bfc25c1dd306e6203cf055c9886560", + "reference": "09f0aec4b8bfc25c1dd306e6203cf055c9886560", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": ">=7.1.3" }, "require-dev": { "symfony/var-dumper": "^4.4.9|^5.0.9" @@ -2085,20 +2630,20 @@ "type": "tidelift" } ], - "time": "2020-06-01T01:10:09+00:00" + "time": "2020-07-05T09:39:30+00:00" }, { "name": "symfony/yaml", - "version": "v4.4.10", + "version": "v4.4.13", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "c2d2cc66e892322cfcc03f8f12f8340dbd7a3f8a" + "reference": "e2a69525b11a33be51cb00b8d6d13a9258a296b1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/c2d2cc66e892322cfcc03f8f12f8340dbd7a3f8a", - "reference": "c2d2cc66e892322cfcc03f8f12f8340dbd7a3f8a", + "url": "https://api.github.com/repos/symfony/yaml/zipball/e2a69525b11a33be51cb00b8d6d13a9258a296b1", + "reference": "e2a69525b11a33be51cb00b8d6d13a9258a296b1", "shasum": "" }, "require": { @@ -2158,11 +2703,11 @@ "type": "tidelift" } ], - "time": "2020-05-20T08:37:50+00:00" + "time": "2020-08-26T08:30:46+00:00" }, { "name": "unam-ar/tupa-core", - "version": "dev-develop", + "version": "dev-feature/mejoras-backend-3", "dist": { "type": "path", "url": "../core", @@ -2194,22 +2739,22 @@ }, { "name": "vlucas/phpdotenv", - "version": "v3.6.6", + "version": "v3.6.7", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "4669484ccbc38fe7c4e0c50456778f2010566aad" + "reference": "2065beda6cbe75e2603686907b2e45f6f3a5ad82" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/4669484ccbc38fe7c4e0c50456778f2010566aad", - "reference": "4669484ccbc38fe7c4e0c50456778f2010566aad", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/2065beda6cbe75e2603686907b2e45f6f3a5ad82", + "reference": "2065beda6cbe75e2603686907b2e45f6f3a5ad82", "shasum": "" }, "require": { "php": "^5.4 || ^7.0 || ^8.0", "phpoption/phpoption": "^1.5.2", - "symfony/polyfill-ctype": "^1.16" + "symfony/polyfill-ctype": "^1.17" }, "require-dev": { "ext-filter": "*", @@ -2263,7 +2808,7 @@ "type": "tidelift" } ], - "time": "2020-06-02T14:08:54+00:00" + "time": "2020-07-14T19:04:52+00:00" } ], "packages-dev": [], diff --git a/worker/config/parameters.yml b/worker/config/parameters.yml index c7cbc0b6c9b96d1c1dd699ae90c46edb9d074ed6..7ec32fbecbebc0702563032d80de8e71da565008 100644 --- a/worker/config/parameters.yml +++ b/worker/config/parameters.yml @@ -24,4 +24,7 @@ services: helo: $env(MAILER_HELO)$ redis: host: $env(REDIS_HOST)$ - port: $env(REDIS_PORT)$ \ No newline at end of file + port: $env(REDIS_PORT)$ + +credentials: + api_basic_tupa: $env(CREDENCIALES_API_BASIC_TUPA)$ \ No newline at end of file diff --git a/worker/src/UNAM/Tupa/Worker/Factory.php b/worker/src/UNAM/Tupa/Worker/Factory.php index adc9dbdd21942d16a88c15ad0ca23e81b8ad493a..0b30f6682c0221bba7a0d9ceecb93f48e924291e 100644 --- a/worker/src/UNAM/Tupa/Worker/Factory.php +++ b/worker/src/UNAM/Tupa/Worker/Factory.php @@ -14,6 +14,7 @@ use Monolog\Handler\StreamHandler; use Monolog\Logger; use Pimple\Container; use Symfony\Component\Config\Definition\Processor; +use UNAM\Tupa\Core\Config\Builder\CredentialsConfigBuilder; use UNAM\Tupa\Core\Config\Builder\WorkerConfigBuilder; use UNAM\Tupa\Core\Util\Varios; use UNAM\Tupa\Worker\Config\Builder\RedisConfigBuilder; @@ -158,6 +159,13 @@ class Factory return $processor->processConfiguration($configuration, ['worker' => $config]); }; + $container['credentials-config'] = function ($c) { + $config = $c['parameters-config']['credentials']; + $processor = new Processor(); + $configuration = new CredentialsConfigBuilder(); + return $processor->processConfiguration($configuration, ['credentials' => $config]); + }; + $container['varios'] = function ($c) { return new Varios($c['main-logger']); }; @@ -198,6 +206,7 @@ class Factory $configuraciones = array( WorkerConfiguracion::WORKER_INDEX => $c['worker-config'], WorkerConfiguracion::SERVICES_INDEX => $c['services-config'], + WorkerConfiguracion::CREDENTIAL_INDEX => $c['credentials-config'], ); return new WorkerConfiguracion($configuraciones); diff --git a/worker/src/UNAM/Tupa/Worker/Processors/ChangeStatusRegistroProcessor.php b/worker/src/UNAM/Tupa/Worker/Processors/ChangeStatusRegistroProcessor.php index bc0bbba57e27f38d28d25e20a7b519668ba5de21..c8047dd24c0ba5072d6f3ccdc92dfe819f1f1135 100644 --- a/worker/src/UNAM/Tupa/Worker/Processors/ChangeStatusRegistroProcessor.php +++ b/worker/src/UNAM/Tupa/Worker/Processors/ChangeStatusRegistroProcessor.php @@ -3,6 +3,7 @@ namespace UNAM\Tupa\Worker\Processors; +use GuzzleHttp\Client; use Interop\Queue\Processor; use Interop\Queue\Message; use Interop\Queue\Context; @@ -25,47 +26,56 @@ class ChangeStatusRegistroProcessor implements Processor protected $logger; const OPERADOR_PORTAL = 'portal'; + /** + * @var Client + */ + private $client; + + const API_VERSION = 'v1'; + private $workerConfig; /** * SendMailProcessor constructor. * @param LoggerInterface|null $logger + * @param Client $client + * @param $workerConfig */ - public function __construct(LoggerInterface $logger = null) + public function __construct(LoggerInterface $logger = null, Client $client, $workerConfig) { + $this->client = $client; $this->logger = $logger; + $this->workerConfig = $workerConfig; } /** * @param Message $message * @param Context $context * @return object|string + * @throws \GuzzleHttp\Exception\GuzzleException */ public function process(Message $message, Context $context) { $params = json_decode($message->getBody(), true); + $version = self::API_VERSION; if (is_array($params)) { try { - require_once(\getenv('TOBA_DIR').'/php/nucleo/toba_nucleo.php'); - \toba_nucleo::instancia()->iniciar_contexto_desde_consola(\getenv('TOBA_INSTANCIA'), 'tupa'); + $user = $this->workerConfig->getUserApiTupaBasic(); + $pass = $this->workerConfig->getPassApiTupaBasic(); + $url = $this->workerConfig->getUrlApiTupaBasic(); + $uri = "{$url}{$version}/registros/{$params['identificador']}"; - try { - $cliente_rest = new \cliente_rest(\toba::servicio_web_rest('TUPA')); - - $dao = new Tupa($cliente_rest); + if ($params['estado'] == Registro::ESTADO_SOLICITUD_ERROR) { + $uri .= "/errorsolicitud"; + } else { + $uri .= "/errorregistro"; + } - if ($params['estado'] == Registro::ESTADO_REGISTRO_ERROR) { - $dao->errorSolicitudRegistro($params['identificador'], self::OPERADOR_PORTAL); - } + $this->client->request('PUT', $uri, ['body' => json_encode(self::OPERADOR_PORTAL), 'auth' => [$user, $pass]]); - $this->logger->info("Se cambió el estado del identificador: {$params['identificador']} al estado {$params['estado']}"); - } catch (\toba_error $e) { - $this->logger->error($e->getMessage()); - } catch (\Exception $e) { - $this->logger->error($e->getMessage()); - } + $this->logger->info("Se cambió el estado del identificador: {$params['identificador']} al estado {$params['estado']}"); } catch (\Exception $e) { - $this->logger->error($e->getMessage(), $params); + $this->logger->error($e->getMessage()); } return self::ACK; diff --git a/worker/src/UNAM/Tupa/Worker/Processors/SendMailProcessor.php b/worker/src/UNAM/Tupa/Worker/Processors/SendMailProcessor.php index 45d228dbc5dbdb63e815d53392bc1369c70ad25e..56a3bff4c79a89a4cd1372618de845403cbdd60b 100644 --- a/worker/src/UNAM/Tupa/Worker/Processors/SendMailProcessor.php +++ b/worker/src/UNAM/Tupa/Worker/Processors/SendMailProcessor.php @@ -9,6 +9,7 @@ use Interop\Queue\Context; use Psr\Log\LoggerInterface; use SIU\Manejador\ConfigToba\Lector; use UNAM\Tupa\Core\Jobs\Messages; +use UNAM\Tupa\Core\Negocio\Solicitudes\Notificacion; use UNAM\Tupa\Core\Negocio\Solicitudes\Registro; use UNAM\Tupa\Worker\Controller\Mailer; use UNAM\Tupa\Worker\Util\EmailTemplate; @@ -76,7 +77,7 @@ class SendMailProcessor implements Processor if (empty($result['failures'])) { $this->retries($params); } else { - $this->transport->sendMessageToQueue(Registro::QUEUE_CAMBIO_ESTADO_REGISTRO, json_encode(['estado' => Registro::ESTADO_REGISTRO_ERROR, 'identificador' => $params['datos']['identificador']])); + $this->cambiarEstadoSolicitud($params); } } else { $this->logger->debug('Se envió exitosamente el mensaje', $params); @@ -107,10 +108,19 @@ class SendMailProcessor implements Processor } else { unset($params['retries']); $this->logger->error("LÃmites de reintentos alcanzado ({$this->retries})", $params); - $this->transport->sendMessageToQueue(Registro::QUEUE_CAMBIO_ESTADO_REGISTRO, json_encode(['estado' => Registro::ESTADO_REGISTRO_ERROR, 'identificador' => $params['datos']['identificador']])); + $this->cambiarEstadoSolicitud($params); } } catch (\Exception $e) { $this->logger->error($e->getMessage(), $params); } } + + private function cambiarEstadoSolicitud(array $params) + { + if (isset($params['tipo']) && $params['tipo'] == Notificacion::TIPO_SOLICITUD_REGISTRO) { + $this->transport->sendMessageToQueue(Registro::QUEUE_CAMBIO_ESTADO_REGISTRO, json_encode(['estado' => Registro::ESTADO_SOLICITUD_ERROR, 'identificador' => $params['datos']['identificador']])); + } else { + $this->transport->sendMessageToQueue(Registro::QUEUE_CAMBIO_ESTADO_REGISTRO, json_encode(['estado' => Registro::ESTADO_REGISTRO_ERROR, 'identificador' => $params['datos']['identificador']])); + } + } } diff --git a/worker/templates/.env.dist b/worker/templates/.env.dist index d0dc9b119b1968ba4e8d73d80949c492cecca341..7e1cded3054f67afbbbb3b79bdf95b4da92b0348 100644 --- a/worker/templates/.env.dist +++ b/worker/templates/.env.dist @@ -21,3 +21,6 @@ WORKER_QUEUE_MAIL_RETRASO=2000 #WORKER_QUEUE_MAIL_EXPIRACION=5000 #WORKER_QUEUE_MAIL_PRIORIDAD=1 WORKER_QUEUE_MAIL_DRY_RUN=0 + +##### CONFIG API ##### +CREDENCIALES_API_BASIC_TUPA=[["tupausr","tupapass","http://tupa-api-backend/api-url/"]] \ No newline at end of file