From f33170d32461914f854dcb891d95b8b4291ae892 Mon Sep 17 00:00:00 2001 From: enfoqueNativo Date: Fri, 3 May 2019 18:39:00 -0300 Subject: [PATCH 01/24] Agrega paquete Guzzle/psr7 --- composer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 9bd844f..124fb4c 100644 --- a/composer.json +++ b/composer.json @@ -6,7 +6,8 @@ "php": ">=5.6.0", "doctrine/cache": "~1.4", "siu-toba/ssl-cert-utils": "1.0", - "siu-toba/jwt-util": "~1.0.0" + "siu-toba/jwt-util": "~1.0.0", + "guzzlehttp/psr7": "~1.5" }, "autoload": { "psr-4": { From 2cbb2e8bd7dd722d12ec1ba2a32eac5eb4803d3c Mon Sep 17 00:00:00 2001 From: enfoqueNativo Date: Fri, 3 May 2019 18:39:28 -0300 Subject: [PATCH 02/24] Modifica request, respuesta y vista --- src/SIUToba/rest/docs/sin_nombre.php | 214 ++++++++++++++++++++++ src/SIUToba/rest/http/request.php | 109 +++++------ src/SIUToba/rest/http/respuesta.php | 134 ++++---------- src/SIUToba/rest/http/respuesta_rest.php | 47 ++--- src/SIUToba/rest/http/vista_json.php | 7 +- src/SIUToba/rest/http/vista_raw.php | 2 +- src/SIUToba/rest/http/vista_respuesta.php | 3 +- src/SIUToba/rest/http/vista_xml.php | 2 +- src/SIUToba/rest/rest.php | 10 +- 9 files changed, 335 insertions(+), 193 deletions(-) create mode 100644 src/SIUToba/rest/docs/sin_nombre.php diff --git a/src/SIUToba/rest/docs/sin_nombre.php b/src/SIUToba/rest/docs/sin_nombre.php new file mode 100644 index 0000000..d03f033 --- /dev/null +++ b/src/SIUToba/rest/docs/sin_nombre.php @@ -0,0 +1,214 @@ +list = array(); + } + + function getResourceList() + { + $this->list = $this->getHeader(); + $this->list['paths'] = array(); + $this->list['definitions'] = array(); + + $lista_apis = $this->get_lista_apis(); + foreach ($lista_apis as $path) { + $this->add_modelos($path); + $this->add_apis($path); + } + + $this->reordenar_lista_apis($list['paths']); + return $this->list; + } + + protected function getHeader() + { + $list = array(); + $list['swagger'] = "2.0"; + $list['info'] = array('title' => 'API Title', 'version' => '1.0'); //TODO: Read from settings + $list['basePath'] = $this->api_url; + $list['produces'] = array("application/json"); + return $list; + } + + protected function get_lista_apis() + { + $list = array(); + $prefijo = rest::app()->config('prefijo_controladores'); + foreach ($this->api_root as $root) { + $path = realpath($root); + if ($path === false) { + continue; + } + $archivos_api = $this->obtener_clases_directorio($path); + foreach ($archivos_api as $nombre => $objeto) { + if ('php' !== pathinfo($nombre, PATHINFO_EXTENSION)) { + continue; + } + + if (!$this->empieza_con($prefijo, pathinfo($nombre, PATHINFO_BASENAME))) { + continue; + } + + $nombre = str_replace('\\', '/', $nombre); // windows! ... + $path = $this->get_url_de_clase($root, $nombre); + $path = ltrim($path, '/'); + + $list[] = $path; + } + } + return $list; + } + + + protected function add_apis($path) + { + + /** @var $reflexion anotaciones_docs */ + $reflexion = $this->get_annotaciones_de_path($path); + $metodos = $reflexion->get_metodos(); + + $montaje = $this->get_montaje_de_path($path); + $prefijo_montaje = $montaje ? '/' . $montaje : ''; + + foreach ($metodos as $metodo) { + $parametros = $metodo['parametros']; + $nombre_metodo = $metodo['nombre']; + + $alias = ''; + $partes_nombre_alias = explode('__', $nombre_metodo); + if (count($partes_nombre_alias) > 1) { + $alias = $partes_nombre_alias[1]; + $nombre_metodo = $partes_nombre_alias[0]; + } + + $partes_nombre = explode('_', $nombre_metodo); + $prefijo_metodo = array_shift($partes_nombre); + if ($es_coleccion = $this->termina_con(ruteador::SUFIJO_COLECCION, $nombre_metodo)) { + array_pop($partes_nombre); //SUFIJO_COLECCION + } + + /////------------PARAMETERS --------------------------------- + $params_path = array(); + $partes_path = explode('/', $path); + + if ($montaje) { + array_shift($partes_path); + } + + foreach ($partes_nombre as $parte) { + $partes_path[] = $parte; + } + + $nro_parametro = 0; + $api_path = $prefijo_montaje; // $path; + + foreach ($partes_path as $parte) { + $parte = str_replace('_', '-', $parte); //no permito '_' en las colecciones + $api_path .= "/" . $parte; + if (isset($parametros[$nro_parametro])) { + $param_name = $parametros[$nro_parametro++]; + $api_path .= "/{" . $param_name . "}"; + $params_path[] = $this->get_parametro_path($param_name, $parte); + } + } + if ($alias) { + $api_path .= '/' . $alias; + } + ////-------------------------------------------------------- + $params_query = $reflexion->get_parametros_metodo($metodo, 'query'); + $params_body = $reflexion->get_parametros_metodo($metodo, 'body'); + if (! empty($params_body)) { //Agrego los schemas para los tipos locales + $params_body = $this->add_tipos_en_modelo($params_body); + } + + $operation = array(); + $operation['tags'] = array(str_replace('_', '-', $path)); //cambio el _ para mostrarlo + $operation['method'] = strtolower($prefijo_metodo); + $operation['summary'] = $reflexion->get_summary_metodo($metodo); + $operation['description'] = $reflexion->get_notes_metodo($metodo); + + $operation['operationId'] = $nombre_metodo; + $operation['parameters'] = array_merge($params_path, $params_body, $params_query); + + $operation['responses'] = $reflexion->get_respuestas_metodo($metodo); + + $this->list['paths'][$api_path][$operation['method']] = $operation; + } + } + + protected function get_parametro_path($param_name, $parte) + { + $api_parameter = array(); + $api_parameter['name'] = $param_name; + $api_parameter['in'] = "path"; + $api_parameter['description'] = "ID del recurso $parte"; + $api_parameter['type'] = "string"; + $api_parameter['required'] = true; + + return $api_parameter; + } + + /** + * @param $path + * + * @return anotaciones_docs + */ + protected function get_annotaciones_de_path($path) + { + $lector = rest::app()->lector_recursos; //new lector_recursos_archivo($this->api_root); + $archivo = $lector->get_recurso(explode('/', $path)); + + return new anotaciones_docs($archivo['archivo']); + } + + + /** + * @param $path + * + * @return anotaciones_docs + */ + protected function add_modelos($path) + { + $lector = rest::app()->lector_recursos; //new lector_recursos_archivo($this->api_root); + $archivo = $lector->get_recurso(explode('/', $path)); + + $i = new rest_instanciador(); + $i->archivo = $archivo['archivo']; + $objeto = $i->get_instancia(); + + if (method_exists($objeto, '_get_modelos')) { + $modelo = new modelo_recursos(); + $specs = $modelo->to_swagger($objeto->_get_modelos()); + $this->list['definitions'] = array_merge($this->list['definitions'], $specs); + } else { + rest::app()->logger->debug('El objeto no tiene el metodo _get_modelos. Clase: ' . get_class($objeto)); + + return array(); + } + } + + /** + * @param $params List of body params + * @return array List of body params with schema definitions + */ + protected function add_tipos_en_modelo($params) + { + $non_predefined_types = array_keys($this->list['definitions']); + $param_keys = array_keys($params); + foreach($param_keys as $key) { + if (isset($params[$key]['type']) && in_array($params[$key]['type'], $non_predefined_types)) { + $params[$key]['schema'] = array('$ref' => "#/definitions/". trim($params[$key]['type'])); + } + } + + return $params; + } + +} +?> \ No newline at end of file diff --git a/src/SIUToba/rest/http/request.php b/src/SIUToba/rest/http/request.php index 14ade41..ff55280 100644 --- a/src/SIUToba/rest/http/request.php +++ b/src/SIUToba/rest/http/request.php @@ -3,11 +3,12 @@ namespace SIUToba\rest\http; use SIUToba\rest\lib\rest_error; +use GuzzleHttp\Psr7\ServerRequest; /** * Clase basada en Slim - a micro PHP 5 framework para abstraer el Request. */ -class request +class request extends ServerRequest { const METHOD_HEAD = 'HEAD'; const METHOD_GET = 'GET'; @@ -25,7 +26,7 @@ class request * * @var array */ - protected static $special = array( + /*protected static $special = array( 'CONTENT_TYPE', 'CONTENT_LENGTH', 'PHP_AUTH_USER', @@ -33,26 +34,41 @@ class request 'PHP_AUTH_DIGEST', 'AUTH_TYPE', ); - +*/ protected $union; //get + post - protected $body; - - public $headers; - protected $encoding; - protected $behind_proxy; + + protected $behind_proxy; private $request_uri; private $host; private $port; private $protocol; - - public function __construct($behind_proxy = false) + + public function __construct($metodo, $uri, $headers=[], $body = null, $protocolo='1.1', $serverGlobal=[]) + { + parent::__construct($metodo, $uri, $headers, $body, $protocolo, $serverGlobal); + + /*$this->headers = $this->extract_headers(); + $this->behind_proxy = $behind_proxy;*/ + } + + public static function fromGlobals() { - $this->headers = $this->extract_headers(); - $this->behind_proxy = $behind_proxy; + $method = isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : 'GET'; + $headers = getallheaders(); + $uri = ServerRequest::getUriFromGlobals(); + $body = new CachingStream(new LazyOpenStream('php://input', 'r+')); + $protocol = isset($_SERVER['SERVER_PROTOCOL']) ? str_replace('HTTP/', '', $_SERVER['SERVER_PROTOCOL']) : '1.1'; + $serverRequest = new request($method, $uri, $headers, $body, $protocol, $_SERVER); + + return $serverRequest + ->withCookieParams($_COOKIE) + ->withQueryParams($_GET) + ->withParsedBody($_POST) + ->withUploadedFiles(ServerRequest::normalizeFiles($_FILES)); } - + public function set_encoding_datos($encoding) { $this->encoding = $encoding; @@ -65,7 +81,7 @@ public function get_encoding_datos() public function get_method() { - return $_SERVER['REQUEST_METHOD']; + return $this->getMethod(); } /** @@ -89,7 +105,7 @@ public function params($key = null, $default = null) */ public function get($key = null, $default = null) { - return $this->get_valor_o_default($_GET, $key, $default); + return $this->get_valor_o_default($this->getQueryParams(), $key, $default); } /** @@ -99,8 +115,7 @@ public function get($key = null, $default = null) */ public function post($key = null, $default = null) { - $datos = $this->get_valor_o_default($_POST, $key, $default); - + $datos = $this->get_valor_o_default($this->getParsedBody(), $key, $default); return $this->manejar_encoding($datos); } @@ -109,14 +124,13 @@ public function post($key = null, $default = null) */ public function get_body_json() { - $body = $this->get_body(); - $json = json_decode($body, true); - if ($body && null === $json) { - throw new rest_error(400, "No se pudo decodificar el mensaje '$body'"); - } - $arreglo = $this->manejar_encoding($json); + $body = $this->getParsedBody(); + if (is_null($body) || ! is_array($body)) { + throw new rest_error(400, "No se pudo decodificar el mensaje"); + } - return $arreglo; + $arreglo = $this->manejar_encoding($body); + return $arreglo; } /** @@ -125,8 +139,8 @@ public function get_body_json() * Si key es nulo devuelve todos. Sino devuelve el parametro key si existe o su default */ public function headers($key = null, $default = null) - { - return $this->get_valor_o_default($this->headers, $key, $default); + { + return ($this->hasHeader($key)) ? $this->getHeader($key): $default; } /** @@ -136,14 +150,7 @@ public function headers($key = null, $default = null) */ public function get_body() { - if (!$this->body) { - $this->body = file_get_contents('php://input'); - if (!$this->body) { - $this->body = ''; - } - } - - return $this->body; + return $this->getBody(); } /** @@ -153,19 +160,7 @@ public function get_body() */ public function get_host() { - if (! isset($this->host)) { - if (isset($_SERVER['HTTP_HOST'])) { - if (strpos($_SERVER['HTTP_HOST'], ':') !== false) { - $hostParts = explode(':', $_SERVER['HTTP_HOST']); - $this->host = $hostParts[0]; - } else { - $this->host = $_SERVER['HTTP_HOST']; - } - } else { - $this->host = $_SERVER['SERVER_NAME']; - } - } - return $this->host; + return $this->headers('host'); } public function set_host($host) @@ -182,6 +177,7 @@ public function set_host($host) */ public function get_puerto() { + return $this->getUri()->getPort(); if (! isset($this->port)) { $this->port = (int) $_SERVER['SERVER_PORT']; } @@ -202,6 +198,7 @@ public function set_puerto($port) */ public function get_esquema() { + return $this->getUri()->getScheme(); if (!isset($this->protocol)) { $this->protocol = (empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] === 'off') ? 'http' : 'https'; } @@ -217,6 +214,7 @@ public function set_esquema($proto) public function get_request_uri() { + return $this->getUri()->__toString(); if (! isset($this->request_uri)) { $this->request_uri = $_SERVER["REQUEST_URI"]; } @@ -237,18 +235,11 @@ public function set_request_uri($uri) */ public function get_url() { - $url = $this->get_esquema().'://'.$this->get_host(); - if (($this->get_esquema() === 'https' && $this->get_puerto() !== 443) || ($this->get_esquema() === 'http' && $this->get_puerto() !== 80)) { - $url .= sprintf(':%s', $this->get_puerto()); - } - - return $url; + $uri = $this->getUri(); + return Uri::composeComponents($uri->getScheme(), $uri->getAuthority(), $uri->getPath(), '', ''); } - - //----------------------------------------------------------------------------------// - // PROTECTED METHODS - //----------------------------------------------------------------------------------// - protected function extract_headers() + + /* protected function extract_headers() { $results = array(); foreach ($_SERVER as $key => $value) { @@ -262,7 +253,7 @@ protected function extract_headers() } return $results; - } + }*/ protected function get_valor_o_default($arreglo, $key = null, $default = null) { diff --git a/src/SIUToba/rest/http/respuesta.php b/src/SIUToba/rest/http/respuesta.php index a2c5a1b..e581d05 100644 --- a/src/SIUToba/rest/http/respuesta.php +++ b/src/SIUToba/rest/http/respuesta.php @@ -3,29 +3,16 @@ namespace SIUToba\rest\http; use SIUToba\rest\lib\rest_error_interno; +use GuzzleHttp\Psr7; +use GuzzleHttp\Psr7\Response; /** * Abstae la respuesta HTTP. Permite setearle estados, headers * y contenido que subclases puede imprimir con otro formato o * con los helpers apropiados. */ -class respuesta +class respuesta extends Response { - /** - * @var int HTTP status code - */ - protected $status; - - /** - * @var array - */ - public $headers; - - /** - * @var mixed Los datos del cuerpo - */ - protected $data; - protected $encoding; /** @@ -33,61 +20,6 @@ class respuesta */ protected $api_version; - /** - * @var array codigos HTTP para los encabezados - */ - protected static $messages = array( - //Informational 1xx - 100 => '100 Continue', - 101 => '101 Switching Protocols', - //Successful 2xx - 200 => '200 OK', - 201 => '201 Created', - 202 => '202 Accepted', - 203 => '203 Non-Authoritative Information', - 204 => '204 No Content', - 205 => '205 Reset Content', - 206 => '206 Partial Content', - //Redirection 3xx - 300 => '300 Multiple Choices', - 301 => '301 Moved Permanently', - 302 => '302 Found', - 303 => '303 See Other', - 304 => '304 Not Modified', - 305 => '305 Use Proxy', - 306 => '306 (Unused)', - 307 => '307 Temporary Redirect', - //Client Error 4xx - 400 => '400 Bad Request', - 401 => '401 Unauthorized', - 402 => '402 Payment Required', - 403 => '403 Forbidden', - 404 => '404 Not Found', - 405 => '405 Method Not Allowed', - 406 => '406 Not Acceptable', - 407 => '407 Proxy Authentication Required', - 408 => '408 Request Timeout', - 409 => '409 Conflict', - 410 => '410 Gone', - 411 => '411 Length Required', - 412 => '412 Precondition Failed', - 413 => '413 Request Entity Too Large', - 414 => '414 Request-URI Too Long', - 415 => '415 Unsupported Media Type', - 416 => '416 Requested Range Not Satisfiable', - 417 => '417 Expectation Failed', - 418 => '418 I\'m a teapot', - 422 => '422 Unprocessable Entity', - 423 => '423 Locked', - //Server Error 5xx - 500 => '500 Internal Server Error', - 501 => '501 Not Implemented', - 502 => '502 Bad Gateway', - 503 => '503 Service Unavailable', - 504 => '504 Gateway Timeout', - 505 => '505 HTTP Version Not Supported', - ); - /** * Constructor. * @@ -97,9 +29,7 @@ class respuesta */ public function __construct($data = null, $status = 200, $headers = array()) { - $this->set_status($status); - $this->headers = array_merge(array('Content-Type' => 'text/html'), $headers); - $this->set_data($data); + parent::__construct($status, $headers, $data); } public function set_encoding_datos($encoding) @@ -114,41 +44,39 @@ public function get_encoding_datos() public function get_status() { - return $this->status; + return $this->getStatusCode(); } public function set_status($status) { - $this->status = (int) $status; - - return $this; + return $this->withStatus($status); } - public function add_headers(array $headers) + public function add_headers(array $headers) { - $this->headers = array_merge($this->headers, $headers); - - return $this; + $new = $this; + foreach($headers as $header) { + $new = $new->withAddedHeader($header[0], $header[1]); // headerName => valor + } + return $new; } public function get_data() { - return $this->data; + return $this->getBody(); } public function set_data($content) { - $this->data = $content; - - return $this; + $content = $this->getParaStream($content); + return $this->withBody(Psr7\stream_for($content)); } public function set_api_version($api_version) { - $this->api_version = $api_version; - + $this->api_version = $api_version; // Agrego la version de la API a los headers - $this->add_headers(array('API-Version' => $this->api_version)); + return $this->withHeader('API-Version' , $this->api_version); } /** @@ -156,15 +84,15 @@ public function set_api_version($api_version) */ public function finalizar() { - if (in_array($this->status, array(204, 304))) { - unset($this->headers['Content-Type']); - unset($this->headers['Content-Length']); - $this->set_data(''); + $new = $this; + if (in_array($this->getStatusCode(), array(204, 304))) { + $new = $this->withoutHeader('Content-Type')->withoutHeader('Content-Length')->withBody(Psr7\stream_for('')); } - if (!isset($this->data)) { + if (!isset($new->stream)) { //Accede a la variable directamente porque cuando es vacio tiene un stream_for('') throw new rest_error_interno("El contenido de la respuesta no puede ser nulo. Si no se desea una respuesta, inicializar en '' o arreglo vacio"); } + return $new; } /** @@ -176,10 +104,24 @@ public function finalizar() */ public static function getMessageForCode($status) { - if (isset(self::$messages[$status])) { - return self::$messages[$status]; + if (isset(self::$phrases[$status])) { + return self::$phrases[$status]; } else { return; } } + + /** + * Devuelve el parametro de manera compatible para la funcion stream_for + * Esto es un Iterador en caso de arreglo o el mismo parametro + * @param mixed $valores + * @return mixed + */ + protected function getParaStream($valores) + { + if (is_array($valores)) { + $valores = new \ArrayIterator($valores); //Esto genera un pumpStream, hay que ver como hacer para generar un Multipart + } + return $valores; + } } diff --git a/src/SIUToba/rest/http/respuesta_rest.php b/src/SIUToba/rest/http/respuesta_rest.php index 2cbc78c..33738e4 100644 --- a/src/SIUToba/rest/http/respuesta_rest.php +++ b/src/SIUToba/rest/http/respuesta_rest.php @@ -1,7 +1,7 @@ get_list($data); - } else { - $this->not_found(); - } - - return $this; + if ($data === false) { + $this->not_found(); + } + return $this->get_list($data); } /** @@ -37,10 +34,8 @@ public function get($data) */ public function get_list($data) { - $this->data = $data; - $this->status = 200; - - return $this; + $data = $this->getParaStream($data); + return $this->withStatus(200)->withBody(Psr7\stream_for($data)); } /** @@ -48,10 +43,8 @@ public function get_list($data) */ public function post($data) { - $this->data = $data; - $this->status = 201; //created - return $this; - //se podria incluir un header con un Location, pero hay que hacer una api para URLs primero + $data = $this->getParaStream($data); + return $this->withStatus(201)->withBody(Psr7\stream_for($data)); } /** @@ -62,13 +55,12 @@ public function post($data) */ public function put($data = null) { - if (! isset($data)) { - $this->status = 204; //sin contenido + if (! isset($data) || is_null($data)) { + return $this->withStatus(204); } else { - $this->data = $data; - $this->status = 200; //Ok + $data = $this->getParaStream($data); + return $this->withStatus(200)->withBody(Psr7\stream_for($data)); } - return $this; } /** @@ -78,7 +70,7 @@ public function put($data = null) */ public function delete() { - $this->put(); + return $this->withStatus(204); } /** @@ -87,9 +79,8 @@ public function delete() */ public function error_negocio($errores, $status = 400) { - $this->data = $errores; - $this->status = $status; // - return $this; + $errores = $this->getParaStream($errores); + return $this->withStatus($status)->withBody(Psr7\stream_for($errores)); } /** @@ -108,9 +99,7 @@ public function not_found($mensaje = '', $errores = array()) */ public function redirect($url, $status = 302) { - $this->set_status($status); - $this->headers['Location'] = $url; - - return $this; + return $this->withStatus($status)->withHeader('Location', $url); } + } diff --git a/src/SIUToba/rest/http/vista_json.php b/src/SIUToba/rest/http/vista_json.php index f9e68d6..17f1d52 100644 --- a/src/SIUToba/rest/http/vista_json.php +++ b/src/SIUToba/rest/http/vista_json.php @@ -13,8 +13,8 @@ protected function get_content_type() public function get_cuerpo() { - $data = $this->respuesta->get_data(); - if (!empty($data)) { + $data = $this->respuesta->get_data()->getContents(); + /*if (!empty($data)) { //Esto espera un array y todo lo que viene de stream es un string en el mejor de los casos. $data = $this->utf8_encode_fields($data); } @@ -28,7 +28,8 @@ public function get_cuerpo() $output = json_encode($data); } - return $output; + return $output; */ + return $data; } protected function prettyPrint($json) diff --git a/src/SIUToba/rest/http/vista_raw.php b/src/SIUToba/rest/http/vista_raw.php index d897fb0..f46358b 100644 --- a/src/SIUToba/rest/http/vista_raw.php +++ b/src/SIUToba/rest/http/vista_raw.php @@ -21,7 +21,7 @@ protected function get_content_type() public function get_cuerpo() { - return $this->respuesta->get_data(); + return $this->respuesta->get_data()->getContents(); } } diff --git a/src/SIUToba/rest/http/vista_respuesta.php b/src/SIUToba/rest/http/vista_respuesta.php index f72e079..cb77838 100644 --- a/src/SIUToba/rest/http/vista_respuesta.php +++ b/src/SIUToba/rest/http/vista_respuesta.php @@ -35,7 +35,8 @@ protected function escribir_encabezados() } //Send headers - foreach ($this->respuesta->headers as $name => $value) { + $headers = $this->respuesta->getHeaders(); + foreach ($headers as $name => $value) { $hValues = explode("\n", $value); foreach ($hValues as $hVal) { header("$name: $hVal", false); diff --git a/src/SIUToba/rest/http/vista_xml.php b/src/SIUToba/rest/http/vista_xml.php index d3e0b2f..4969cf5 100644 --- a/src/SIUToba/rest/http/vista_xml.php +++ b/src/SIUToba/rest/http/vista_xml.php @@ -13,7 +13,7 @@ protected function get_content_type() public function get_cuerpo() { - $data = $this->respuesta->get_data(); + $data = $this->respuesta->get_data()->getContents(); $xml_root = new SimpleXMLElement(""); $this->array_to_xml($data, $xml_root); diff --git a/src/SIUToba/rest/rest.php b/src/SIUToba/rest/rest.php index 67f3090..06b23dc 100644 --- a/src/SIUToba/rest/rest.php +++ b/src/SIUToba/rest/rest.php @@ -115,7 +115,7 @@ public function __construct($settings = array()) // Request default $this->container->singleton('request', function ($c) { - $req = new request(); + $req = request::fromGlobals(); $req->set_encoding_datos($c['settings']['encoding']); return $req; @@ -123,10 +123,14 @@ public function __construct($settings = array()) // Respuesta default $this->container->singleton('response', function ($c) { - $respuesta = new respuesta_rest(); + /*$respuesta = new respuesta_rest(); $respuesta->set_encoding_datos($c['settings']['encoding']); - $respuesta->set_api_version($c['settings']['api_version']); + $respuesta->set_api_version($c['settings']['api_version']);*/ + $respuesta = new respuesta_rest(); + $respuesta = $respuesta->set_api_version($c['settings']['api_version']); + $respuesta->set_encoding_datos($c['settings']['encoding']); + return $respuesta; }); From 5af41c9720c646ea2c4bcbd4928b23c8820d949f Mon Sep 17 00:00:00 2001 From: enfoqueNativo Date: Fri, 3 May 2019 18:40:28 -0300 Subject: [PATCH 03/24] Modifica los test basicos --- tests/http/respuestaTest.php | 4 ++-- tests/http/respuesta_restTest.php | 19 ++++++++++--------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/tests/http/respuestaTest.php b/tests/http/respuestaTest.php index 1fac626..c831db2 100644 --- a/tests/http/respuestaTest.php +++ b/tests/http/respuestaTest.php @@ -20,10 +20,10 @@ public function testFinalizarValidacionVacio() { $r = new respuesta("data", 204); $r->finalizar(); - $this->assertEmpty($r->get_data()); + $this->assertEmpty($r->get_data()->__toString()); $r = new respuesta("data", 304); $r->finalizar(); - $this->assertEmpty($r->get_data()); + $this->assertEmpty($r->get_data()->__toString()); } } diff --git a/tests/http/respuesta_restTest.php b/tests/http/respuesta_restTest.php index 83ee177..04d1ca5 100644 --- a/tests/http/respuesta_restTest.php +++ b/tests/http/respuesta_restTest.php @@ -44,34 +44,35 @@ public function testNotFound() public function testPutOK() { - $errores = false; + //$errores = false; $r = new respuesta_rest(); - $r->put(); + $r = $r->put(); $this->assertEquals(204, $r->get_status()); - $this->assertEmpty($r->get_data()); + $this->assertEmpty($r->get_data()->__toString()); //Hay que testear un stream empty } public function testDeleteOK() { $r = new respuesta_rest(); - $r->delete(); + $r = $r->delete(); $this->assertEquals(204, $r->get_status()); - $this->assertEmpty($r->get_data()); + $this->assertEmpty($r->get_data()->__toString()); //Hay que testear un stream empty } public function testRedirect() { $r = new respuesta_rest(); - $r->redirect('hola'); - $this->assertArrayHasKey('Location', $r->headers); - $this->assertEquals($r->headers['Location'], 'hola'); + $r = $r->redirect('hola'); + $this->assertArrayHasKey('Location', $r->getHeaders()); + $this->assertTrue($r->hasHeader('Location')); + $this->assertEquals($r->getHeader('Location'), ['hola']); } public function testErrorNegocio() { $r = new respuesta_rest(); $error = array('error' => 'e'); - $r->error_negocio($error); + $r = $r->error_negocio($error); $this->assertEquals(400, $r->get_status()); $this->assertEquals($error, $r->get_data()); } From 7b28b13861cb45d1a4aebabb578b0948947d4a52 Mon Sep 17 00:00:00 2001 From: enfoqueNativo Date: Mon, 6 May 2019 15:27:15 -0300 Subject: [PATCH 04/24] Resuelve problema con streams en la respuesta - Transforma arrays => json en el constructor para evitar problema con stream. - Hace rewind del stream al recuperar el body para garantizar que recupere todo - Se adaptan la vista_json y vista_xml para que sigan devolviendo lo mismo que antes - rest_error::configurar_respuesta ahora recibe el parametro por referencia (por inmutabilidad de la rta) --- src/SIUToba/rest/http/respuesta.php | 9 ++++++--- src/SIUToba/rest/http/vista_json.php | 14 +++++++++----- src/SIUToba/rest/http/vista_xml.php | 7 ++++++- src/SIUToba/rest/lib/rest_error.php | 7 +++---- 4 files changed, 24 insertions(+), 13 deletions(-) diff --git a/src/SIUToba/rest/http/respuesta.php b/src/SIUToba/rest/http/respuesta.php index e581d05..db17846 100644 --- a/src/SIUToba/rest/http/respuesta.php +++ b/src/SIUToba/rest/http/respuesta.php @@ -29,6 +29,7 @@ class respuesta extends Response */ public function __construct($data = null, $status = 200, $headers = array()) { + $data = $this->getParaStream($data); parent::__construct($status, $headers, $data); } @@ -63,7 +64,9 @@ public function add_headers(array $headers) public function get_data() { - return $this->getBody(); + $bd = $this->getBody(); + $bd->rewind(); + return $bd; } public function set_data($content) @@ -113,14 +116,14 @@ public static function getMessageForCode($status) /** * Devuelve el parametro de manera compatible para la funcion stream_for - * Esto es un Iterador en caso de arreglo o el mismo parametro + * Esto es un json en caso de arreglo o el mismo parametro * @param mixed $valores * @return mixed */ protected function getParaStream($valores) { if (is_array($valores)) { - $valores = new \ArrayIterator($valores); //Esto genera un pumpStream, hay que ver como hacer para generar un Multipart + $valores = json_encode($valores, true); } return $valores; } diff --git a/src/SIUToba/rest/http/vista_json.php b/src/SIUToba/rest/http/vista_json.php index 17f1d52..f812cee 100644 --- a/src/SIUToba/rest/http/vista_json.php +++ b/src/SIUToba/rest/http/vista_json.php @@ -13,9 +13,14 @@ protected function get_content_type() public function get_cuerpo() { - $data = $this->respuesta->get_data()->getContents(); - /*if (!empty($data)) { //Esto espera un array y todo lo que viene de stream es un string en el mejor de los casos. - $data = $this->utf8_encode_fields($data); + $stream = $this->respuesta->get_data(); //Obtengo el body de la respuesta (es un Stream) + $data = $stream->getContents(); + + if ( $data != '' && $data !== false) { + $tmp = json_decode($data, true); //Verifico si originalmente era un array convertido en json + if (false !== $tmp) { + $data = $this->utf8_encode_fields($tmp); + } } if ($this->pretty_print) { @@ -28,8 +33,7 @@ public function get_cuerpo() $output = json_encode($data); } - return $output; */ - return $data; + return $output; } protected function prettyPrint($json) diff --git a/src/SIUToba/rest/http/vista_xml.php b/src/SIUToba/rest/http/vista_xml.php index 4969cf5..0377efd 100644 --- a/src/SIUToba/rest/http/vista_xml.php +++ b/src/SIUToba/rest/http/vista_xml.php @@ -15,7 +15,12 @@ public function get_cuerpo() { $data = $this->respuesta->get_data()->getContents(); $xml_root = new SimpleXMLElement(""); - $this->array_to_xml($data, $xml_root); + if ( $data != '' && $data !== false) { + $tmp = json_decode($data, true); //Verifico si originalmente era un array convertido en json + if (false !== $tmp) { + $this->array_to_xml($tmp, $xml_root); + } + } return $xml_root->asXML(); } diff --git a/src/SIUToba/rest/lib/rest_error.php b/src/SIUToba/rest/lib/rest_error.php index cf04cbd..b53d999 100644 --- a/src/SIUToba/rest/lib/rest_error.php +++ b/src/SIUToba/rest/lib/rest_error.php @@ -31,19 +31,18 @@ public function get_datalle() return $this->detalle; } - public function configurar_respuesta(respuesta_rest $rta) + public function configurar_respuesta(respuesta_rest &$rta) { $datos = array( 'error' => $this->code, 'mensaje' => $rta->getMessageForCode($this->code), - 'descripcion' => $this->getMessage(), ); + 'descripcion' => $this->getMessage() ); if (!empty($this->detalle)) { $datos['detalle'] = $this->detalle; } - $rta->set_data($datos); - $rta->set_status($this->code); + $rta = $rta->set_data($datos)->set_status($this->code); return $this; } From ac4edfb7f8fac6cff8e3a3d29ef53484295bfa5b Mon Sep 17 00:00:00 2001 From: enfoqueNativo Date: Mon, 6 May 2019 15:28:54 -0300 Subject: [PATCH 05/24] Adaptacion de rest_errorTest y respuesta_restTest por cambios en la respuesta - Se agrega un json_decode a los test que recuperan el body de la respuesta directamente. --- tests/http/respuesta_restTest.php | 10 +++++----- tests/lib/rest_errorTest.php | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/http/respuesta_restTest.php b/tests/http/respuesta_restTest.php index 04d1ca5..a454c66 100644 --- a/tests/http/respuesta_restTest.php +++ b/tests/http/respuesta_restTest.php @@ -17,10 +17,10 @@ public function testGet() { $data = array(1); $r = new respuesta_rest(); - $r->get($data); - + $r = $r->get($data); //Devuelve una nueva instancia + $this->assertEquals(200, $r->get_status()); - $this->assertEquals($data, $r->get_data()); + $this->assertEquals($data, json_decode($r->get_data()->getContents(), true)); } /** @@ -44,9 +44,9 @@ public function testNotFound() public function testPutOK() { - //$errores = false; $r = new respuesta_rest(); $r = $r->put(); + $this->assertEquals(204, $r->get_status()); $this->assertEmpty($r->get_data()->__toString()); //Hay que testear un stream empty } @@ -74,6 +74,6 @@ public function testErrorNegocio() $error = array('error' => 'e'); $r = $r->error_negocio($error); $this->assertEquals(400, $r->get_status()); - $this->assertEquals($error, $r->get_data()); + $this->assertEquals($error, json_decode($r->get_data()->__toString(), true)); } } diff --git a/tests/lib/rest_errorTest.php b/tests/lib/rest_errorTest.php index d011e60..b9c9371 100644 --- a/tests/lib/rest_errorTest.php +++ b/tests/lib/rest_errorTest.php @@ -25,11 +25,11 @@ public function testConfiguracionRespuesta() $status = 400; $mensaje = "mi mensaje"; $arreglo = array('hola' => 'mundo'); - $error = new rest_error($status, $mensaje, $arreglo); - $r = new respuesta_rest(); - $error->configurar_respuesta($r); + $error = new rest_error($status, $mensaje, $arreglo); + $r = new respuesta_rest(); + $error->configurar_respuesta($r); - $data = $r->get_data(); + $data = json_decode($r->get_data()->getContents(), true); $this->assertEquals($mensaje, $data['descripcion']); $this->assertEquals($status, $r->get_status()); $this->assertEquals($arreglo, $data['detalle']); @@ -44,12 +44,12 @@ public function testConfiguracionRespuestaSinDetalle() $r = new respuesta_rest(); $error->configurar_respuesta($r); - $data = $r->get_data(); + $data = json_decode($r->get_data()->getContents(), true); $this->assertArrayNotHasKey('detalle', $data); $error = new rest_error($status, $mensaje); $error->configurar_respuesta($r); - $data = $r->get_data(); + $data = json_decode($r->get_data()->getContents(), true); $this->assertArrayNotHasKey('detalle', $data); } } From b07f90e1c5c7959bfbb3f42eecae11632853959d Mon Sep 17 00:00:00 2001 From: enfoqueNativo Date: Thu, 22 Aug 2019 16:26:47 -0300 Subject: [PATCH 06/24] Actualiza a Guzzlehttp/psr7@1.6.1 y actualiza respuesta y test --- composer.json | 2 +- src/SIUToba/rest/http/respuesta.php | 41 ++++++++++++++--------------- tests/http/respuestaTest.php | 6 ++--- 3 files changed, 24 insertions(+), 25 deletions(-) diff --git a/composer.json b/composer.json index 124fb4c..7aa1f42 100644 --- a/composer.json +++ b/composer.json @@ -7,7 +7,7 @@ "doctrine/cache": "~1.4", "siu-toba/ssl-cert-utils": "1.0", "siu-toba/jwt-util": "~1.0.0", - "guzzlehttp/psr7": "~1.5" + "guzzlehttp/psr7": "~1.6" }, "autoload": { "psr-4": { diff --git a/src/SIUToba/rest/http/respuesta.php b/src/SIUToba/rest/http/respuesta.php index db17846..47c1d5e 100644 --- a/src/SIUToba/rest/http/respuesta.php +++ b/src/SIUToba/rest/http/respuesta.php @@ -14,7 +14,7 @@ class respuesta extends Response { protected $encoding; - + /** * @var string Verison de la API */ @@ -30,7 +30,7 @@ class respuesta extends Response public function __construct($data = null, $status = 200, $headers = array()) { $data = $this->getParaStream($data); - parent::__construct($status, $headers, $data); + parent::__construct($status, $headers, $data); } public function set_encoding_datos($encoding) @@ -56,7 +56,7 @@ public function set_status($status) public function add_headers(array $headers) { $new = $this; - foreach($headers as $header) { + foreach($headers as $header) { $new = $new->withAddedHeader($header[0], $header[1]); // headerName => valor } return $new; @@ -74,10 +74,10 @@ public function set_data($content) $content = $this->getParaStream($content); return $this->withBody(Psr7\stream_for($content)); } - + public function set_api_version($api_version) { - $this->api_version = $api_version; + $this->api_version = $api_version; // Agrego la version de la API a los headers return $this->withHeader('API-Version' , $this->api_version); } @@ -90,8 +90,7 @@ public function finalizar() $new = $this; if (in_array($this->getStatusCode(), array(204, 304))) { $new = $this->withoutHeader('Content-Type')->withoutHeader('Content-Length')->withBody(Psr7\stream_for('')); - } - if (!isset($new->stream)) { //Accede a la variable directamente porque cuando es vacio tiene un stream_for('') + } elseif ($new->getBody()->getSize() === 0) { //Si tiene un stream_for('') para cualquier cosa no 204/304 es que no seteo nada throw new rest_error_interno("El contenido de la respuesta no puede ser nulo. Si no se desea una respuesta, inicializar en '' o arreglo vacio"); } @@ -113,18 +112,18 @@ public static function getMessageForCode($status) return; } } - - /** - * Devuelve el parametro de manera compatible para la funcion stream_for - * Esto es un json en caso de arreglo o el mismo parametro - * @param mixed $valores - * @return mixed - */ - protected function getParaStream($valores) - { - if (is_array($valores)) { - $valores = json_encode($valores, true); - } - return $valores; - } + + /** + * Devuelve el parametro de manera compatible para la funcion stream_for + * Esto es un json en caso de arreglo o el mismo parametro + * @param mixed $valores + * @return mixed + */ + protected function getParaStream($valores) + { + if (is_array($valores)) { + $valores = json_encode($valores, true); + } + return $valores; + } } diff --git a/tests/http/respuestaTest.php b/tests/http/respuestaTest.php index c831db2..6ced32c 100644 --- a/tests/http/respuestaTest.php +++ b/tests/http/respuestaTest.php @@ -19,11 +19,11 @@ public function testFinalizarError() public function testFinalizarValidacionVacio() { $r = new respuesta("data", 204); - $r->finalizar(); + $r = $r->finalizar(); //Recupera el nuevo objeto respuesta $this->assertEmpty($r->get_data()->__toString()); $r = new respuesta("data", 304); - $r->finalizar(); - $this->assertEmpty($r->get_data()->__toString()); + $r->finalizar(); //Sigue con el objeto original + $this->assertTrue($r->get_data()->__toString() === 'data'); } } From 14c191d8914b1d39e70b6a29b29b953c96be1859 Mon Sep 17 00:00:00 2001 From: enfoqueNativo Date: Wed, 28 Aug 2019 19:09:10 -0300 Subject: [PATCH 07/24] Cambios minimos para hacer funcionar la doc via swagger - Agrega 'use' faltantes - Fix al metodo respuesta::add_headers - Fix al metodo vista_respuesta::escribir_encabezados - Fix en metodos que no recibian la asignacion del objeto clonado - La clase 'rest.php' instancia el response de manera temprana, ya que el singleton no sirve con el esquema psr7. - Se envia la respuesta como parametro por referencia en rest_error::configurar_respuesta y proveedor_autenticacion::requerir_autenticacion --- src/SIUToba/rest/http/request.php | 24 ++----- src/SIUToba/rest/http/respuesta.php | 43 +++++++------ src/SIUToba/rest/http/vista_respuesta.php | 11 ++-- src/SIUToba/rest/lib/ruteador.php | 5 +- src/SIUToba/rest/rest.php | 62 +++++++------------ .../autenticacion_basic_http.php | 9 ++- .../autenticacion_digest_http.php | 2 +- .../rest_error_autenticacion.php | 6 +- .../seguridad/proveedor_autenticacion.php | 4 +- 9 files changed, 71 insertions(+), 95 deletions(-) diff --git a/src/SIUToba/rest/http/request.php b/src/SIUToba/rest/http/request.php index ff55280..9c718d5 100644 --- a/src/SIUToba/rest/http/request.php +++ b/src/SIUToba/rest/http/request.php @@ -4,6 +4,9 @@ use SIUToba\rest\lib\rest_error; use GuzzleHttp\Psr7\ServerRequest; +use GuzzleHttp\Psr7\CachingStream; +use GuzzleHttp\Psr7\LazyOpenStream; +use GuzzleHttp\Psr7\Uri; /** * Clase basada en Slim - a micro PHP 5 framework para abstraer el Request. @@ -52,7 +55,7 @@ public function __construct($metodo, $uri, $headers=[], $body = null, $protocolo /*$this->headers = $this->extract_headers(); $this->behind_proxy = $behind_proxy;*/ } - + public static function fromGlobals() { $method = isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : 'GET'; @@ -68,7 +71,7 @@ public static function fromGlobals() ->withParsedBody($_POST) ->withUploadedFiles(ServerRequest::normalizeFiles($_FILES)); } - + public function set_encoding_datos($encoding) { $this->encoding = $encoding; @@ -214,6 +217,7 @@ public function set_esquema($proto) public function get_request_uri() { + return $this->getUri()->getPath(); return $this->getUri()->__toString(); if (! isset($this->request_uri)) { $this->request_uri = $_SERVER["REQUEST_URI"]; @@ -239,22 +243,6 @@ public function get_url() return Uri::composeComponents($uri->getScheme(), $uri->getAuthority(), $uri->getPath(), '', ''); } - /* protected function extract_headers() - { - $results = array(); - foreach ($_SERVER as $key => $value) { - $key = strtoupper($key); - if (strpos($key, 'X_') === 0 || strpos($key, 'HTTP_') === 0 || in_array($key, static::$special)) { - if ($key === 'HTTP_CONTENT_TYPE' || $key === 'HTTP_CONTENT_LENGTH') { - continue; - } - $results[$key] = $value; - } - } - - return $results; - }*/ - protected function get_valor_o_default($arreglo, $key = null, $default = null) { if ($key) { diff --git a/src/SIUToba/rest/http/respuesta.php b/src/SIUToba/rest/http/respuesta.php index 47c1d5e..15b5789 100644 --- a/src/SIUToba/rest/http/respuesta.php +++ b/src/SIUToba/rest/http/respuesta.php @@ -36,6 +36,7 @@ public function __construct($data = null, $status = 200, $headers = array()) public function set_encoding_datos($encoding) { $this->encoding = $encoding; + return $this; } public function get_encoding_datos() @@ -55,9 +56,9 @@ public function set_status($status) public function add_headers(array $headers) { - $new = $this; - foreach($headers as $header) { - $new = $new->withAddedHeader($header[0], $header[1]); // headerName => valor + $new = clone $this; + foreach($headers as $header => $valor) { + $new = $new->withAddedHeader($header, $valor); // headerName => valor } return $new; } @@ -79,7 +80,7 @@ public function set_api_version($api_version) { $this->api_version = $api_version; // Agrego la version de la API a los headers - return $this->withHeader('API-Version' , $this->api_version); + return $this->withAddedHeader('API-Version' , $this->api_version); } /** @@ -87,7 +88,7 @@ public function set_api_version($api_version) */ public function finalizar() { - $new = $this; + $new = clone $this; if (in_array($this->getStatusCode(), array(204, 304))) { $new = $this->withoutHeader('Content-Type')->withoutHeader('Content-Length')->withBody(Psr7\stream_for('')); } elseif ($new->getBody()->getSize() === 0) { //Si tiene un stream_for('') para cualquier cosa no 204/304 es que no seteo nada @@ -106,24 +107,26 @@ public function finalizar() */ public static function getMessageForCode($status) { - if (isset(self::$phrases[$status])) { + /*if (isset(self::$phrases[$status])) { return self::$phrases[$status]; } else { return; - } + }*/ + return ; } - /** - * Devuelve el parametro de manera compatible para la funcion stream_for - * Esto es un json en caso de arreglo o el mismo parametro - * @param mixed $valores - * @return mixed - */ - protected function getParaStream($valores) - { - if (is_array($valores)) { - $valores = json_encode($valores, true); - } - return $valores; - } + /** + * Devuelve el parametro de manera compatible para la funcion stream_for + * Esto es un json en caso de arreglo o el mismo parametro + * @param mixed $valores + * @return mixed + */ + protected function getParaStream($valores) + { + if (is_array($valores)) { + $valores = json_encode($valores, \JSON_UNESCAPED_UNICODE); + //var_dump(\json_last_error_msg()); + } + return $valores; + } } diff --git a/src/SIUToba/rest/http/vista_respuesta.php b/src/SIUToba/rest/http/vista_respuesta.php index cb77838..65626af 100644 --- a/src/SIUToba/rest/http/vista_respuesta.php +++ b/src/SIUToba/rest/http/vista_respuesta.php @@ -13,7 +13,7 @@ public function __construct(respuesta $respuesta) public function escribir() { - $this->respuesta->add_headers(array('Content-Type' => $this->get_content_type())); + $this->respuesta = $this->respuesta->add_headers(array('Content-Type' => $this->get_content_type())); $this->escribir_encabezados(); echo $this->get_cuerpo(); } @@ -27,18 +27,15 @@ protected function escribir_encabezados() $status = $this->respuesta->get_status(); //Send status if (strpos(PHP_SAPI, 'cgi') === 0) { - header(sprintf('Status: %s', respuesta::getMessageForCode($status))); - //echo sprintf('Status: %s', self::getMessageForCode($this->status)); + header(sprintf('Status: %s', $status)); } else { - header(sprintf('HTTP/%s %s', '1.1', respuesta::getMessageForCode($status))); - //echo sprintf('HTTP/%s %s', '1.1', self::getMessageForCode($this->status)); + header(sprintf('HTTP/%s %s', '1.1', $status)); } //Send headers $headers = $this->respuesta->getHeaders(); foreach ($headers as $name => $value) { - $hValues = explode("\n", $value); - foreach ($hValues as $hVal) { + foreach ($value as $hVal) { header("$name: $hVal", false); } } diff --git a/src/SIUToba/rest/lib/ruteador.php b/src/SIUToba/rest/lib/ruteador.php index a947d68..d8b0225 100644 --- a/src/SIUToba/rest/lib/ruteador.php +++ b/src/SIUToba/rest/lib/ruteador.php @@ -2,6 +2,8 @@ namespace SIUToba\rest\lib; +use GuzzleHttp\Psr7\UriResolver; + class ruteador { const SUFIJO_COLECCION = '_list'; @@ -19,8 +21,9 @@ public function __construct($lector, $instanciador) $this->instanciador = $instanciador; } - public function buscar_controlador($method, $url) + public function buscar_controlador($method, $urlInicial) { + $url = UriResolver::removeDotSegments($urlInicial); $partes_url = explode('/', $url); $instanciador = $this->instanciador; diff --git a/src/SIUToba/rest/rest.php b/src/SIUToba/rest/rest.php index 06b23dc..18cd0a7 100644 --- a/src/SIUToba/rest/rest.php +++ b/src/SIUToba/rest/rest.php @@ -7,10 +7,10 @@ use SIUToba\rest\http\request; use SIUToba\rest\http\respuesta_rest; use SIUToba\rest\http\vista_json; -use SIUToba\rest\http\vista_respuesta; +//use SIUToba\rest\http\vista_respuesta; use SIUToba\rest\http\vista_xml; use SIUToba\rest\lib\lector_recursos_archivo; -use SIUToba\rest\lib\logger; +//use SIUToba\rest\lib\logger; use SIUToba\rest\lib\logger_vacio; use SIUToba\rest\lib\rest_error; use SIUToba\rest\lib\rest_error_interno; @@ -21,7 +21,7 @@ use SIUToba\rest\seguridad\autorizacion\autorizacion_anonima; use SIUToba\rest\seguridad\autorizacion\rest_error_autorizacion; use SIUToba\rest\seguridad\firewall; -use SIUToba\rest\seguridad\proveedor_autorizacion; +//use SIUToba\rest\seguridad\proveedor_autorizacion; use SIUToba\rest\seguridad\rest_usuario; /** @@ -108,7 +108,6 @@ public static function get_default_settings() public function __construct($settings = array()) { self::$instancia = $this; -// $this->autoload(); $this->container = new Set(); $this->container['settings'] = array_merge(static::get_default_settings(), $settings); @@ -123,14 +122,9 @@ public function __construct($settings = array()) // Respuesta default $this->container->singleton('response', function ($c) { - /*$respuesta = new respuesta_rest(); - $respuesta->set_encoding_datos($c['settings']['encoding']); - $respuesta->set_api_version($c['settings']['api_version']);*/ - $respuesta = new respuesta_rest(); - $respuesta = $respuesta->set_api_version($c['settings']['api_version']); - $respuesta->set_encoding_datos($c['settings']['encoding']); - + $respuesta = $respuesta->set_encoding_datos($c['settings']['encoding'])->set_api_version($c['settings']['api_version']); + return $respuesta; }); @@ -242,16 +236,16 @@ public function procesar() $this->logger->debug("Iniciando el pedido"); try { $method = $this->request->get_method(); + $respuesta = $this->response; //Fuerzo instanciacion de la respuesta ya que un singleton no sirve mas + $this->set_response($respuesta->withStatus(200)); + $url = $this->get_url_relativa(); $url = ltrim($url, '/'); - $this->logger->debug("Procesando URL '/$url'"); - $partes_url = explode('/', $url); - $this->controlar_acceso($url); - - if ($partes_url[0] == $this->settings['prefijo_api_docs']) { + $partes_url = explode('/', $url); + if ($partes_url[0] == $this->container['settings']['prefijo_api_docs']) { $this->mostrar_documentacion($url); } else { $recurso = $this->router->buscar_controlador($method, $url); @@ -259,30 +253,30 @@ public function procesar() $recurso->ejecutar_accion(); } } catch (rest_error_autenticacion $ex) { - $ex->configurar_respuesta($this->response); + $ex->configurar_respuesta($respuesta); $this->logger->info("Excepcion de Autenticacion. Autenticar y reintentar"); - $this->logger->info(var_export($this->response, true)); + $this->logger->info(var_export($respuesta, true)); $this->logger->info($ex->getMessage()); } catch (rest_error_autorizacion $ex) { - $ex->configurar_respuesta($this->response); + $ex->configurar_respuesta($respuesta); $this->logger->info("Error de Autorizacion."); } catch (rest_error $ex) { // Excepciones controladas, partel del flujo normal de la API - $ex->configurar_respuesta($this->response); - $this->logger->info("La api retornó un error. Status: ".$this->response->get_status()); - $this->logger->info(var_export($this->response->get_data(), true)); + $ex->configurar_respuesta($respuesta); + $this->logger->info("La api retornó un error. Status: ".$respuesta->get_status()); + $this->logger->info(var_export($respuesta->get_data(), true)); } catch (Exception $ex) { // Excepcion del codigo del proyecto - Error de programación, no tiene que entrar aca en el flujo normal $this->logger->error("Error al ejecutar el pedido. ".$ex->getMessage()); $this->logger->error($ex->getTraceAsString()); $error = new rest_error(500, "Error Interno en el servidor: ".$ex->getMessage()); - $error->configurar_respuesta($this->response); + $error->configurar_respuesta($respuesta); } $this->response->finalizar(); $this->vista->escribir(); $this->logger->debug("Pedido finalizado"); if ($this->config('debug')) { - $this->logger->debug(var_export($this->response, true)); + $this->logger->debug(var_export($respuesta, true)); } if (method_exists($this->logger, 'guardar')) { // es el logger de toba $this->logger->guardar(); @@ -311,7 +305,10 @@ private function get_url_relativa() { $uri = $this->request->get_request_uri(); $url = strtok($uri, '?'); - $url_api = $this->settings['url_api']; + $url_api = $this->container['settings']['url_api']; + + /* $resultado = GuzzleHttp\Psr7\UriResolver::relativize(new GuzzleHttp\Psr7\Uri($url_api), new GuzzleHttp\Psr7\Uri($uri)); + return $resultado->__toString();*/ if (substr($url, 0, strlen($url_api)) == $url_api) { return substr($url, strlen($url_api)); @@ -319,20 +316,9 @@ private function get_url_relativa() throw new rest_error_interno("Este controlador no está configurado para manejar esta URL. La url es: '$uri', la url de la API es '$url_api'"); } -// protected function autoload() -// { -// include_once 'bootstrap.php'; -//// if (file_exists(__DIR__ . '/vendor/autoload.php')) { -//// require 'vendor/autoload.php'; -//// } else { -//// die("Falta correr 'composer install' en php/lib/rest"); -//// } -// bootstrap::registerAutoloader(); -// } - public function config($clave) { - return $this->settings[$clave]; + return $this->container['settings'][$clave]; } public function __get($name) @@ -384,7 +370,7 @@ protected function mostrar_documentacion($url) $controlador = $this->controlador_documentacion; $controlador->set_config($config); $url = strstr($url, '/'); - $controlador->get_documentacion($url); + $this->set_response($controlador->get_documentacion($url)); } /** diff --git a/src/SIUToba/rest/seguridad/autenticacion/autenticacion_basic_http.php b/src/SIUToba/rest/seguridad/autenticacion/autenticacion_basic_http.php index 3370b74..67cac2f 100644 --- a/src/SIUToba/rest/seguridad/autenticacion/autenticacion_basic_http.php +++ b/src/SIUToba/rest/seguridad/autenticacion/autenticacion_basic_http.php @@ -43,12 +43,11 @@ public function get_usuario(request $request = null) * * @return mixed */ - public function requerir_autenticacion(respuesta_rest $rta) + public function requerir_autenticacion(respuesta_rest &$rta) { - $rta->add_headers(array( - 'WWW-Authenticate' => 'Basic realm="Usuario de la API"', - )); - $rta->set_data(array('mensaje' => 'autenticaci�n cancelada')); + $rta = $rta + ->add_headers(array('WWW-Authenticate' => 'Basic realm="Usuario de la API"')) + ->set_data(array('mensaje' => 'autenticación cancelada')); } /** diff --git a/src/SIUToba/rest/seguridad/autenticacion/autenticacion_digest_http.php b/src/SIUToba/rest/seguridad/autenticacion/autenticacion_digest_http.php index 1b0e5ea..d6dbc00 100644 --- a/src/SIUToba/rest/seguridad/autenticacion/autenticacion_digest_http.php +++ b/src/SIUToba/rest/seguridad/autenticacion/autenticacion_digest_http.php @@ -52,7 +52,7 @@ public function get_usuario(request $request = null) * * @return mixed */ - public function requerir_autenticacion(respuesta_rest $rta) + public function requerir_autenticacion(respuesta_rest &$rta) { //importante las comillas dobles $header = 'Digest realm="'.$this->realm.'",qop="auth",nonce="'.uniqid().'",opaque="'.md5($this->realm).'"'; diff --git a/src/SIUToba/rest/seguridad/autenticacion/rest_error_autenticacion.php b/src/SIUToba/rest/seguridad/autenticacion/rest_error_autenticacion.php index 37e50e2..a3b4270 100644 --- a/src/SIUToba/rest/seguridad/autenticacion/rest_error_autenticacion.php +++ b/src/SIUToba/rest/seguridad/autenticacion/rest_error_autenticacion.php @@ -10,14 +10,14 @@ class rest_error_autenticacion extends rest_error { protected $proveedor_autenticacion; - public function __construct(proveedor_autenticacion $autenticador, $mensaje = "Se requiere autenticación") + public function __construct(proveedor_autenticacion $autenticador, $mensaje = "Se requiere autenticación") { - $mensaje = (empty($mensaje)) ? 'Se require autenticación' : $mensaje; + $mensaje = (empty($mensaje)) ? 'Se require autenticación' : $mensaje; parent::__construct(401, $mensaje); $this->proveedor_autenticacion = $autenticador; } - public function configurar_respuesta(respuesta_rest $rta) + public function configurar_respuesta(respuesta_rest &$rta) { parent::configurar_respuesta($rta); $this->proveedor_autenticacion->requerir_autenticacion($rta); diff --git a/src/SIUToba/rest/seguridad/proveedor_autenticacion.php b/src/SIUToba/rest/seguridad/proveedor_autenticacion.php index 346873b..b1d2d96 100644 --- a/src/SIUToba/rest/seguridad/proveedor_autenticacion.php +++ b/src/SIUToba/rest/seguridad/proveedor_autenticacion.php @@ -48,13 +48,13 @@ protected function set_error($mensaje) * * @return mixed */ - abstract public function requerir_autenticacion(respuesta_rest $rta); + abstract public function requerir_autenticacion(respuesta_rest &$rta); /** * Indica si la petición/headers debe manejarse con este mecanismo de autenticación. * * @param request $request la petición - * + * * @return boolean true si este mecanismo atiende la petición de autenticación */ abstract public function atiende_pedido(request $request); From ac13d213490cc96a39d6b8db9daba8ab0fc9b69e Mon Sep 17 00:00:00 2001 From: enfoqueNativo Date: Wed, 28 Aug 2019 19:11:34 -0300 Subject: [PATCH 08/24] Faltaba asignar el objeto clonado en los metodos --- src/SIUToba/rest/lib/rest_error.php | 2 +- .../autenticacion/autenticacion_api_key.php | 4 ++-- .../autenticacion/autenticacion_basic_http.php | 4 ++-- .../autenticacion/autenticacion_digest_http.php | 8 +++----- .../seguridad/autenticacion/autenticacion_jwt.php | 4 ++-- .../autenticacion/autenticacion_oauth2.php | 13 ++++++------- .../seguridad/autenticacion/autenticacion_ssl.php | 4 ++-- .../autenticacion/rest_error_autenticacion.php | 4 ++-- 8 files changed, 20 insertions(+), 23 deletions(-) diff --git a/src/SIUToba/rest/lib/rest_error.php b/src/SIUToba/rest/lib/rest_error.php index b53d999..080b35f 100644 --- a/src/SIUToba/rest/lib/rest_error.php +++ b/src/SIUToba/rest/lib/rest_error.php @@ -42,7 +42,7 @@ public function configurar_respuesta(respuesta_rest &$rta) $datos['detalle'] = $this->detalle; } - $rta = $rta->set_data($datos)->set_status($this->code); + $rta = $rta->set_status($this->code)->set_data($datos); return $this; } diff --git a/src/SIUToba/rest/seguridad/autenticacion/autenticacion_api_key.php b/src/SIUToba/rest/seguridad/autenticacion/autenticacion_api_key.php index 288e6b4..798f304 100644 --- a/src/SIUToba/rest/seguridad/autenticacion/autenticacion_api_key.php +++ b/src/SIUToba/rest/seguridad/autenticacion/autenticacion_api_key.php @@ -47,9 +47,9 @@ public function get_usuario(request $request = null) * * @return mixed */ - public function requerir_autenticacion(respuesta_rest $rta) + public function requerir_autenticacion(respuesta_rest &$rta) { - $rta->set_data(array('mensaje' => $this->mensaje)); + $rta = $rta->set_data(array('mensaje' => $this->mensaje)); } /** diff --git a/src/SIUToba/rest/seguridad/autenticacion/autenticacion_basic_http.php b/src/SIUToba/rest/seguridad/autenticacion/autenticacion_basic_http.php index 67cac2f..e7da106 100644 --- a/src/SIUToba/rest/seguridad/autenticacion/autenticacion_basic_http.php +++ b/src/SIUToba/rest/seguridad/autenticacion/autenticacion_basic_http.php @@ -46,8 +46,8 @@ public function get_usuario(request $request = null) public function requerir_autenticacion(respuesta_rest &$rta) { $rta = $rta - ->add_headers(array('WWW-Authenticate' => 'Basic realm="Usuario de la API"')) - ->set_data(array('mensaje' => 'autenticación cancelada')); + ->add_headers(array('WWW-Authenticate' => 'Basic realm="Usuario de la API"')) + ->set_data(array('mensaje' => 'autenticación cancelada')); } /** diff --git a/src/SIUToba/rest/seguridad/autenticacion/autenticacion_digest_http.php b/src/SIUToba/rest/seguridad/autenticacion/autenticacion_digest_http.php index d6dbc00..196ca81 100644 --- a/src/SIUToba/rest/seguridad/autenticacion/autenticacion_digest_http.php +++ b/src/SIUToba/rest/seguridad/autenticacion/autenticacion_digest_http.php @@ -56,11 +56,9 @@ public function requerir_autenticacion(respuesta_rest &$rta) { //importante las comillas dobles $header = 'Digest realm="'.$this->realm.'",qop="auth",nonce="'.uniqid().'",opaque="'.md5($this->realm).'"'; - - $rta->add_headers(array( - 'WWW-Authenticate' => $header, - )); - $rta->set_data(array('mensaje' => 'autenticaci�n cancelada')); + $rta = $rta + ->add_headers(array('WWW-Authenticate' => $header)) + ->set_data(array('mensaje' => 'autenticaci�n cancelada')); } protected function http_digest_parse($digest_header) diff --git a/src/SIUToba/rest/seguridad/autenticacion/autenticacion_jwt.php b/src/SIUToba/rest/seguridad/autenticacion/autenticacion_jwt.php index 82dd402..0a41399 100644 --- a/src/SIUToba/rest/seguridad/autenticacion/autenticacion_jwt.php +++ b/src/SIUToba/rest/seguridad/autenticacion/autenticacion_jwt.php @@ -57,9 +57,9 @@ public function get_usuario(request $request = null) * * @return mixed */ - public function requerir_autenticacion(respuesta_rest $rta) + public function requerir_autenticacion(respuesta_rest &$rta) { - $rta->set_data(array('mensaje' => $this->mensaje)); + $rta = $rta->set_data(array('mensaje' => $this->mensaje)); } /** diff --git a/src/SIUToba/rest/seguridad/autenticacion/autenticacion_oauth2.php b/src/SIUToba/rest/seguridad/autenticacion/autenticacion_oauth2.php index be31924..9b5872f 100644 --- a/src/SIUToba/rest/seguridad/autenticacion/autenticacion_oauth2.php +++ b/src/SIUToba/rest/seguridad/autenticacion/autenticacion_oauth2.php @@ -46,7 +46,7 @@ public function get_usuario(request $request = null) $well_formed_header = preg_match('/Bearer (.+)/i', $auth_header, $result); $token = $result[1]; - + $info = $this->decoder->decode($token); if ($info === null) { @@ -67,13 +67,12 @@ public function get_usuario(request $request = null) * * @return mixed */ - public function requerir_autenticacion(respuesta_rest $rta) + public function requerir_autenticacion(respuesta_rest &$rta) { - $rta->set_status(401); - // quiz� haya que agregar m�s detalles al error: http://hdknr.github.io/docs/identity/bearer.html#id5 - $rta->add_headers(array( - 'WWW-Authenticate' => 'Bearer', - )); + // quizá haya que agregar más detalles al error: http://hdknr.github.io/docs/identity/bearer.html#id5 + $rta = $rta + ->set_status(401) + ->add_headers(array('WWW-Authenticate' => 'Bearer')); } /** diff --git a/src/SIUToba/rest/seguridad/autenticacion/autenticacion_ssl.php b/src/SIUToba/rest/seguridad/autenticacion/autenticacion_ssl.php index 8efb209..fc28f7d 100644 --- a/src/SIUToba/rest/seguridad/autenticacion/autenticacion_ssl.php +++ b/src/SIUToba/rest/seguridad/autenticacion/autenticacion_ssl.php @@ -107,9 +107,9 @@ function get_usuario_huella($usuario) * * @return mixed */ - public function requerir_autenticacion(respuesta_rest $rta) + public function requerir_autenticacion(respuesta_rest &$rta) { - $rta->set_data(array('mensaje' => 'autenticación cancelada, falta información')); + $rta = $rta->set_data(array('mensaje' => 'autenticación cancelada, falta información')); } /** diff --git a/src/SIUToba/rest/seguridad/autenticacion/rest_error_autenticacion.php b/src/SIUToba/rest/seguridad/autenticacion/rest_error_autenticacion.php index a3b4270..9be846a 100644 --- a/src/SIUToba/rest/seguridad/autenticacion/rest_error_autenticacion.php +++ b/src/SIUToba/rest/seguridad/autenticacion/rest_error_autenticacion.php @@ -10,9 +10,9 @@ class rest_error_autenticacion extends rest_error { protected $proveedor_autenticacion; - public function __construct(proveedor_autenticacion $autenticador, $mensaje = "Se requiere autenticación") + public function __construct(proveedor_autenticacion $autenticador, $mensaje = "Se requiere autenticación") { - $mensaje = (empty($mensaje)) ? 'Se require autenticación' : $mensaje; + $mensaje = (empty($mensaje)) ? 'Se require autenticación' : $mensaje; parent::__construct(401, $mensaje); $this->proveedor_autenticacion = $autenticador; } From 52407c41d6cad9e0fae2cb5394ed8bdc0f8a50fe Mon Sep 17 00:00:00 2001 From: enfoqueNativo Date: Thu, 29 Aug 2019 15:11:08 -0300 Subject: [PATCH 09/24] Agrega funciones para codificar a UTF8 solo si es necesario --- src/SIUToba/rest/lib/funciones_basicas.php | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/SIUToba/rest/lib/funciones_basicas.php diff --git a/src/SIUToba/rest/lib/funciones_basicas.php b/src/SIUToba/rest/lib/funciones_basicas.php new file mode 100644 index 0000000..31a9cbb --- /dev/null +++ b/src/SIUToba/rest/lib/funciones_basicas.php @@ -0,0 +1,35 @@ + \ No newline at end of file From a78ad354e80b1ea47b8905b6736af53e2c7a9ba6 Mon Sep 17 00:00:00 2001 From: enfoqueNativo Date: Thu, 29 Aug 2019 15:18:15 -0300 Subject: [PATCH 10/24] Muevo instanciacion previa solo a los catch --- src/SIUToba/rest/rest.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/SIUToba/rest/rest.php b/src/SIUToba/rest/rest.php index 18cd0a7..2bf3807 100644 --- a/src/SIUToba/rest/rest.php +++ b/src/SIUToba/rest/rest.php @@ -24,6 +24,8 @@ //use SIUToba\rest\seguridad\proveedor_autorizacion; use SIUToba\rest\seguridad\rest_usuario; +include_once 'lib/funciones_basicas.php'; + /** * @property lector_recursos_archivo lector_recursos * @property request request @@ -236,8 +238,6 @@ public function procesar() $this->logger->debug("Iniciando el pedido"); try { $method = $this->request->get_method(); - $respuesta = $this->response; //Fuerzo instanciacion de la respuesta ya que un singleton no sirve mas - $this->set_response($respuesta->withStatus(200)); $url = $this->get_url_relativa(); $url = ltrim($url, '/'); @@ -253,24 +253,32 @@ public function procesar() $recurso->ejecutar_accion(); } } catch (rest_error_autenticacion $ex) { + $respuesta = $this->response; //Fuerzo instanciacion ya que necesito pasarlo por referencia $ex->configurar_respuesta($respuesta); $this->logger->info("Excepcion de Autenticacion. Autenticar y reintentar"); $this->logger->info(var_export($respuesta, true)); $this->logger->info($ex->getMessage()); + $this->set_response($respuesta); } catch (rest_error_autorizacion $ex) { + $respuesta = $this->response; //Fuerzo instanciacion ya que necesito pasarlo por referencia $ex->configurar_respuesta($respuesta); $this->logger->info("Error de Autorizacion."); + $this->set_response($respuesta); } catch (rest_error $ex) { // Excepciones controladas, partel del flujo normal de la API + $respuesta = $this->response; //Fuerzo instanciacion ya que necesito pasarlo por referencia $ex->configurar_respuesta($respuesta); - $this->logger->info("La api retornó un error. Status: ".$respuesta->get_status()); + $this->logger->info("La api retornó un error. Status: ".$respuesta->get_status()); $this->logger->info(var_export($respuesta->get_data(), true)); + $this->set_response($respuesta); } catch (Exception $ex) { + $respuesta = $this->response; //Fuerzo instanciacion ya que necesito pasarlo por referencia // Excepcion del codigo del proyecto - Error de programación, no tiene que entrar aca en el flujo normal $this->logger->error("Error al ejecutar el pedido. ".$ex->getMessage()); $this->logger->error($ex->getTraceAsString()); $error = new rest_error(500, "Error Interno en el servidor: ".$ex->getMessage()); $error->configurar_respuesta($respuesta); + $this->set_response($respuesta); } $this->response->finalizar(); $this->vista->escribir(); From 68b86d4733dcb6ff463a7d706a245854e4bbc2f9 Mon Sep 17 00:00:00 2001 From: enfoqueNativo Date: Thu, 29 Aug 2019 15:23:32 -0300 Subject: [PATCH 11/24] Agrego conversion utf8 a los mensajes por defecto --- src/SIUToba/rest/lib/rest_error.php | 2 +- .../rest/seguridad/autenticacion/autenticacion_api_key.php | 2 +- .../seguridad/autenticacion/autenticacion_basic_http.php | 2 +- .../seguridad/autenticacion/autenticacion_digest_http.php | 4 ++-- .../rest/seguridad/autenticacion/autenticacion_jwt.php | 6 +++--- .../rest/seguridad/autenticacion/autenticacion_ssl.php | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/SIUToba/rest/lib/rest_error.php b/src/SIUToba/rest/lib/rest_error.php index 080b35f..81b6f18 100644 --- a/src/SIUToba/rest/lib/rest_error.php +++ b/src/SIUToba/rest/lib/rest_error.php @@ -41,7 +41,7 @@ public function configurar_respuesta(respuesta_rest &$rta) if (!empty($this->detalle)) { $datos['detalle'] = $this->detalle; } - + $datos = \array_map('utf8_e_seguro', $datos); $rta = $rta->set_status($this->code)->set_data($datos); return $this; diff --git a/src/SIUToba/rest/seguridad/autenticacion/autenticacion_api_key.php b/src/SIUToba/rest/seguridad/autenticacion/autenticacion_api_key.php index 798f304..436aafc 100644 --- a/src/SIUToba/rest/seguridad/autenticacion/autenticacion_api_key.php +++ b/src/SIUToba/rest/seguridad/autenticacion/autenticacion_api_key.php @@ -49,7 +49,7 @@ public function get_usuario(request $request = null) */ public function requerir_autenticacion(respuesta_rest &$rta) { - $rta = $rta->set_data(array('mensaje' => $this->mensaje)); + $rta = $rta->set_data(array('mensaje' => \utf8_e_seguro($this->mensaje))); } /** diff --git a/src/SIUToba/rest/seguridad/autenticacion/autenticacion_basic_http.php b/src/SIUToba/rest/seguridad/autenticacion/autenticacion_basic_http.php index e7da106..2d4617a 100644 --- a/src/SIUToba/rest/seguridad/autenticacion/autenticacion_basic_http.php +++ b/src/SIUToba/rest/seguridad/autenticacion/autenticacion_basic_http.php @@ -47,7 +47,7 @@ public function requerir_autenticacion(respuesta_rest &$rta) { $rta = $rta ->add_headers(array('WWW-Authenticate' => 'Basic realm="Usuario de la API"')) - ->set_data(array('mensaje' => 'autenticación cancelada')); + ->set_data(array('mensaje' => \utf8_e_seguro('autenticación cancelada'))); } /** diff --git a/src/SIUToba/rest/seguridad/autenticacion/autenticacion_digest_http.php b/src/SIUToba/rest/seguridad/autenticacion/autenticacion_digest_http.php index 196ca81..3354adb 100644 --- a/src/SIUToba/rest/seguridad/autenticacion/autenticacion_digest_http.php +++ b/src/SIUToba/rest/seguridad/autenticacion/autenticacion_digest_http.php @@ -57,8 +57,8 @@ public function requerir_autenticacion(respuesta_rest &$rta) //importante las comillas dobles $header = 'Digest realm="'.$this->realm.'",qop="auth",nonce="'.uniqid().'",opaque="'.md5($this->realm).'"'; $rta = $rta - ->add_headers(array('WWW-Authenticate' => $header)) - ->set_data(array('mensaje' => 'autenticaci�n cancelada')); + ->add_headers(array('WWW-Authenticate' => \utf8_e_seguro($header))) + ->set_data(array('mensaje' => \utf8_e_seguro('autenticación cancelada'))); } protected function http_digest_parse($digest_header) diff --git a/src/SIUToba/rest/seguridad/autenticacion/autenticacion_jwt.php b/src/SIUToba/rest/seguridad/autenticacion/autenticacion_jwt.php index 0a41399..2a13bd9 100644 --- a/src/SIUToba/rest/seguridad/autenticacion/autenticacion_jwt.php +++ b/src/SIUToba/rest/seguridad/autenticacion/autenticacion_jwt.php @@ -38,9 +38,9 @@ public function get_usuario(request $request = null) return $usuario; } if (isset($token)) { - $this->mensaje = "No se encontro usuario válido en el token"; + $this->mensaje = "No se encontro usuario válido en el token"; } else { - $this->mensaje = 'Debe proveer un token válido'; + $this->mensaje = 'Debe proveer un token válido'; } } catch (\Exception $exc) { @@ -59,7 +59,7 @@ public function get_usuario(request $request = null) */ public function requerir_autenticacion(respuesta_rest &$rta) { - $rta = $rta->set_data(array('mensaje' => $this->mensaje)); + $rta = $rta->set_data(array('mensaje' => \utf8_e_seguro($this->mensaje))); } /** diff --git a/src/SIUToba/rest/seguridad/autenticacion/autenticacion_ssl.php b/src/SIUToba/rest/seguridad/autenticacion/autenticacion_ssl.php index fc28f7d..fb929eb 100644 --- a/src/SIUToba/rest/seguridad/autenticacion/autenticacion_ssl.php +++ b/src/SIUToba/rest/seguridad/autenticacion/autenticacion_ssl.php @@ -109,7 +109,7 @@ function get_usuario_huella($usuario) */ public function requerir_autenticacion(respuesta_rest &$rta) { - $rta = $rta->set_data(array('mensaje' => 'autenticación cancelada, falta información')); + $rta = $rta->set_data(array('mensaje' => \utf8_e_seguro('autenticación cancelada, falta información'))); } /** From 339c3c131a1b7b364f54643b359dec3ac142d0ae Mon Sep 17 00:00:00 2001 From: enfoqueNativo Date: Thu, 29 Aug 2019 15:29:00 -0300 Subject: [PATCH 12/24] Agrega funciones de encodeo/decodeo seguro a vista_json y request --- src/SIUToba/rest/http/request.php | 2 +- src/SIUToba/rest/http/vista_json.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/SIUToba/rest/http/request.php b/src/SIUToba/rest/http/request.php index 9c718d5..5291a01 100644 --- a/src/SIUToba/rest/http/request.php +++ b/src/SIUToba/rest/http/request.php @@ -275,7 +275,7 @@ protected function utf8_decode_fields($entrada) return $salida; } elseif (is_string($entrada)) { - return utf8_decode($entrada); + return \utf8_d_seguro($entrada); } else { return $entrada; } diff --git a/src/SIUToba/rest/http/vista_json.php b/src/SIUToba/rest/http/vista_json.php index f812cee..cf9dd20 100644 --- a/src/SIUToba/rest/http/vista_json.php +++ b/src/SIUToba/rest/http/vista_json.php @@ -16,9 +16,9 @@ public function get_cuerpo() $stream = $this->respuesta->get_data(); //Obtengo el body de la respuesta (es un Stream) $data = $stream->getContents(); - if ( $data != '' && $data !== false) { + if ( $data != '' && $data !== false) { $tmp = json_decode($data, true); //Verifico si originalmente era un array convertido en json - if (false !== $tmp) { + if (false !== $tmp) { $data = $this->utf8_encode_fields($tmp); } } @@ -104,7 +104,7 @@ protected function utf8_encode_fields(array $elements) if (is_array($elements[$key])) { $elements[$key] = $this->utf8_encode_fields($elements[$key]); } elseif (mb_detect_encoding($elements[$key], "UTF-8", true) != "UTF-8") { - $elements[$key] = utf8_encode($elements[$key]); + $elements[$key] = \utf8_e_seguro($elements[$key]); } } return $elements; From 7cfe4439fb341451b967d48109a0a037e5101c91 Mon Sep 17 00:00:00 2001 From: enfoqueNativo Date: Thu, 29 Aug 2019 15:36:21 -0300 Subject: [PATCH 13/24] Agrego conversion a la generacion de doc --- src/SIUToba/rest/docs/anotaciones_docs.php | 68 +++++++++++++++------- 1 file changed, 47 insertions(+), 21 deletions(-) diff --git a/src/SIUToba/rest/docs/anotaciones_docs.php b/src/SIUToba/rest/docs/anotaciones_docs.php index 5bbfe71..63a5a52 100644 --- a/src/SIUToba/rest/docs/anotaciones_docs.php +++ b/src/SIUToba/rest/docs/anotaciones_docs.php @@ -105,7 +105,7 @@ protected function extraer_anotaciones($doc) $pos = strpos($annotation, ' '); $nombre = substr($annotation, 0, $pos); $contenido = substr($annotation, $pos + 1); - $retorno [$nombre][] = trim($contenido); + $retorno [$nombre][] = \utf8_e_seguro(trim($contenido)); } return $retorno; @@ -134,13 +134,13 @@ public function get_metodos() $parametros = array(); $parameters = $metodo->getParameters(); foreach ($parameters as $p) { - $parametros[] = $p->getName(); + $parametros[] = \utf8_e_seguro($p->getName()); } $anotaciones = $this->get_annotations_metodo($metodo); $nuevo_metodo = array( - 'nombre' => $metodo->getName(), + 'nombre' => \utf8_e_seguro($metodo->getName()), 'parametros' => $parametros, 'anotaciones' => $anotaciones, ); @@ -199,22 +199,23 @@ protected function get_parametro_tipo($parametro, $type) } $api_parameter = array(); - $tipo_dato = tipo_datos_docs::get_tipo_datos($matches[2]); - switch ($type) { - case 'query': - $api_parameter['name'] = ltrim($matches[1], '$'); - $api_parameter['in'] = $type; - $api_parameter['schema'] = $tipo_dato; - break; - /* case 'path': - $api_parameter['in'] = $type;*/ - case 'body': - $api_parameter['content'] = array('*/*' => ['schema' => $tipo_dato]); - break; - } - - $api_parameter['description'] = $matches[4] ?: '[sin descripcion]'; - if (!empty($matches[3])) { + $tipo_dato = tipo_datos_docs::get_tipo_datos($matches[2]); + $api_parameter['description'] = $matches[4] ?: '[sin descripcion]'; + switch($type) { + case 'query': + $api_parameter['name'] = ltrim($matches[1], '$'); + $api_parameter['in'] = $type; + $api_parameter['schema'] = $tipo_dato; + break; + /* case 'path': + $api_parameter['in'] = $type;*/ + case 'body': + $api_parameter['content'] = array('*/*' => ['schema' => $tipo_dato]); + break; + } + + $api_parameter = \array_map('utf8_e_seguro', $api_parameter); + if (!empty($matches[3])) { $modificadores = $matches[3]; if (preg_match('/required/', $modificadores)) { $api_parameter['required'] = true; @@ -272,7 +273,7 @@ public function get_respuestas_metodo($metodo) continue; } - $status = $matches[1]; + $status = \utf8_e_seguro($matches[1]); if ($matches[2] == 'array') { $items = tipo_datos_docs::get_tipo_datos($matches[3]); @@ -283,7 +284,7 @@ public function get_respuestas_metodo($metodo) } else { $schema = tipo_datos_docs::get_tipo_datos($matches[3]); } - $mje = $matches[4]; + $mje = \utf8_e_seguro($matches[4]); $resObj = array('description' => $mje); if (! empty($schema)) { @@ -301,4 +302,29 @@ protected function termina_con($needle, $haystack) { return substr($haystack, -strlen($needle)) === $needle; } + + /** + * @param $tipo + * + * @return array + */ + protected function get_tipo_datos($tipo) + { + $tipo = preg_replace("#[\{\}\"\s]#",'', $tipo); + if (trim($tipo) == '') { + return; + } + + $refs = explode(':', $tipo); + if (false === $refs) { + $tipoRef = array('type' => \utf8_e_seguro(trim($tipo))); //Basic type - no name + } else { + if (substr($refs[0], 0, 1) == '$') { + $tipoRef = array('$ref' => "#/definitions/". \utf8_e_seguro(trim($refs[1]))); //Referred type {"$ref": "Defined@Model"} + } else { + $tipoRef = array('type' => \utf8_e_seguro(trim($refs[1]))); //Basic type - named {"id" : "integer"} + } + } + return $tipoRef; + } } From 8bd1369cc40abaf350e47bc5c090289f637a8102 Mon Sep 17 00:00:00 2001 From: enfoqueNativo Date: Thu, 29 Aug 2019 15:37:04 -0300 Subject: [PATCH 14/24] Quita constante para devolver comportamiento default --- src/SIUToba/rest/http/respuesta.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SIUToba/rest/http/respuesta.php b/src/SIUToba/rest/http/respuesta.php index 15b5789..6fd6d40 100644 --- a/src/SIUToba/rest/http/respuesta.php +++ b/src/SIUToba/rest/http/respuesta.php @@ -124,7 +124,7 @@ public static function getMessageForCode($status) protected function getParaStream($valores) { if (is_array($valores)) { - $valores = json_encode($valores, \JSON_UNESCAPED_UNICODE); + $valores = json_encode($valores); //var_dump(\json_last_error_msg()); } return $valores; From 36bde47221a50acc7b33c5db106a97d18d265abc Mon Sep 17 00:00:00 2001 From: enfoqueNativo Date: Thu, 29 Aug 2019 16:12:58 -0300 Subject: [PATCH 15/24] Quito msg de debug y corrijo aplicacion de funcion para que no reciba un array --- src/SIUToba/rest/lib/funciones_basicas.php | 4 ++-- src/SIUToba/rest/lib/rest_error.php | 9 ++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/SIUToba/rest/lib/funciones_basicas.php b/src/SIUToba/rest/lib/funciones_basicas.php index 31a9cbb..88e7f12 100644 --- a/src/SIUToba/rest/lib/funciones_basicas.php +++ b/src/SIUToba/rest/lib/funciones_basicas.php @@ -7,7 +7,7 @@ */ function utf8_e_seguro($s) { - echo 'paso por enconde ' . PHP_EOL; + //echo 'paso por enconde ' . PHP_EOL; if (mb_detect_encoding($s, "UTF-8", true) == "UTF-8") { return $s; } @@ -24,7 +24,7 @@ function utf8_e_seguro($s) */ function utf8_d_seguro($s) { - echo 'paso por Decode ' . PHP_EOL; + //echo 'paso por Decode ' . PHP_EOL; if (mb_detect_encoding($s, "UTF-8", true) == "UTF-8") { return \utf8_decode($s); } diff --git a/src/SIUToba/rest/lib/rest_error.php b/src/SIUToba/rest/lib/rest_error.php index 81b6f18..9daa719 100644 --- a/src/SIUToba/rest/lib/rest_error.php +++ b/src/SIUToba/rest/lib/rest_error.php @@ -34,14 +34,13 @@ public function get_datalle() public function configurar_respuesta(respuesta_rest &$rta) { $datos = array( - 'error' => $this->code, - 'mensaje' => $rta->getMessageForCode($this->code), - 'descripcion' => $this->getMessage() ); + 'error' => \utf8_e_seguro($this->code), + 'mensaje' => \utf8_e_seguro($rta->getMessageForCode($this->code)), + 'descripcion' => \utf8_e_seguro($this->getMessage())); if (!empty($this->detalle)) { - $datos['detalle'] = $this->detalle; + $datos['detalle'] = \array_map('utf8_e_seguro', $this->detalle); } - $datos = \array_map('utf8_e_seguro', $datos); $rta = $rta->set_status($this->code)->set_data($datos); return $this; From 335fb7c44ba77f6a11f61c997394b1d5f7c3c140 Mon Sep 17 00:00:00 2001 From: enfoqueNativo Date: Thu, 29 Aug 2019 16:13:22 -0300 Subject: [PATCH 16/24] Agrego el archivo de funciones basicas a los test --- tests/docs/annotaciones_docsTest.php | 6 ++++++ tests/lib/rest_errorTest.php | 10 ++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/tests/docs/annotaciones_docsTest.php b/tests/docs/annotaciones_docsTest.php index 4518b3e..2bf2e0a 100644 --- a/tests/docs/annotaciones_docsTest.php +++ b/tests/docs/annotaciones_docsTest.php @@ -7,6 +7,12 @@ class annotaciones_docsTest extends TestCase { + protected function setUp() + { + include_once __DIR__.'/../../src/SIUToba/rest/lib/funciones_basicas.php'; + parent::setUp(); + } + /** * @return anotaciones_docs */ diff --git a/tests/lib/rest_errorTest.php b/tests/lib/rest_errorTest.php index b9c9371..e6b6576 100644 --- a/tests/lib/rest_errorTest.php +++ b/tests/lib/rest_errorTest.php @@ -8,6 +8,12 @@ class rest_errorTest extends TestCase { + protected function setUp() + { + include_once \realpath(__DIR__.'/../../src/SIUToba/rest/lib/funciones_basicas.php'); + parent::setUp(); + } + public function testInicializacion() { $status = 400; @@ -25,9 +31,9 @@ public function testConfiguracionRespuesta() $status = 400; $mensaje = "mi mensaje"; $arreglo = array('hola' => 'mundo'); - $error = new rest_error($status, $mensaje, $arreglo); + $error = new rest_error($status, $mensaje, $arreglo); $r = new respuesta_rest(); - $error->configurar_respuesta($r); + $error->configurar_respuesta($r); $data = json_decode($r->get_data()->getContents(), true); $this->assertEquals($mensaje, $data['descripcion']); From 6e8e67ba6a6cc9a1f72140d53a96169a2cad09cd Mon Sep 17 00:00:00 2001 From: enfoqueNativo Date: Fri, 20 Sep 2019 15:01:34 -0300 Subject: [PATCH 17/24] Cambio ref a psr7 para testing externo --- composer.json | 2 +- composer.lock | 558 ++++++++++++++++++++++++++++++++++++-------------- 2 files changed, 404 insertions(+), 156 deletions(-) diff --git a/composer.json b/composer.json index 7aa1f42..288c329 100644 --- a/composer.json +++ b/composer.json @@ -7,7 +7,7 @@ "doctrine/cache": "~1.4", "siu-toba/ssl-cert-utils": "1.0", "siu-toba/jwt-util": "~1.0.0", - "guzzlehttp/psr7": "~1.6" + "guzzlehttp/psr7": "1.x-dev" }, "autoload": { "psr-4": { diff --git a/composer.lock b/composer.lock index 0251959..a1c6f9c 100644 --- a/composer.lock +++ b/composer.lock @@ -1,41 +1,45 @@ { "_readme": [ "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "hash": "8d9f9caa3a599cb1083bcd64212bbbea", - "content-hash": "520bd38299e1851dcddc62fbf4e46fbd", + "content-hash": "5fd4a57a09f626a04a54e51ab690f7e4", "packages": [ { "name": "doctrine/cache", - "version": "v1.6.1", + "version": "v1.8.0", "source": { "type": "git", "url": "https://github.com/doctrine/cache.git", - "reference": "b6f544a20f4807e81f7044d31e679ccbb1866dc3" + "reference": "d768d58baee9a4862ca783840eca1b9add7a7f57" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/cache/zipball/b6f544a20f4807e81f7044d31e679ccbb1866dc3", - "reference": "b6f544a20f4807e81f7044d31e679ccbb1866dc3", + "url": "https://api.github.com/repos/doctrine/cache/zipball/d768d58baee9a4862ca783840eca1b9add7a7f57", + "reference": "d768d58baee9a4862ca783840eca1b9add7a7f57", "shasum": "" }, "require": { - "php": "~5.5|~7.0" + "php": "~7.1" }, "conflict": { "doctrine/common": ">2.2,<2.4" }, "require-dev": { - "phpunit/phpunit": "~4.8|~5.0", - "predis/predis": "~1.0", - "satooshi/php-coveralls": "~0.6" + "alcaeus/mongo-php-adapter": "^1.1", + "doctrine/coding-standard": "^4.0", + "mongodb/mongodb": "^1.1", + "phpunit/phpunit": "^7.0", + "predis/predis": "~1.0" + }, + "suggest": { + "alcaeus/mongo-php-adapter": "Required to use legacy MongoDB driver" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.6.x-dev" + "dev-master": "1.8.x-dev" } }, "autoload": { @@ -70,30 +74,33 @@ } ], "description": "Caching library offering an object-oriented API for many cache backends", - "homepage": "http://www.doctrine-project.org", + "homepage": "https://www.doctrine-project.org", "keywords": [ "cache", "caching" ], - "time": "2016-10-29 11:16:17" + "time": "2018-08-21T18:01:43+00:00" }, { "name": "firebase/php-jwt", - "version": "v4.0.0", + "version": "v5.0.0", "source": { "type": "git", "url": "https://github.com/firebase/php-jwt.git", - "reference": "dccf163dc8ed7ed6a00afc06c51ee5186a428d35" + "reference": "9984a4d3a32ae7673d6971ea00bae9d0a1abba0e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/firebase/php-jwt/zipball/dccf163dc8ed7ed6a00afc06c51ee5186a428d35", - "reference": "dccf163dc8ed7ed6a00afc06c51ee5186a428d35", + "url": "https://api.github.com/repos/firebase/php-jwt/zipball/9984a4d3a32ae7673d6971ea00bae9d0a1abba0e", + "reference": "9984a4d3a32ae7673d6971ea00bae9d0a1abba0e", "shasum": "" }, "require": { "php": ">=5.3.0" }, + "require-dev": { + "phpunit/phpunit": " 4.8.35" + }, "type": "library", "autoload": { "psr-4": { @@ -118,26 +125,190 @@ ], "description": "A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to the current spec.", "homepage": "https://github.com/firebase/php-jwt", - "time": "2016-07-18 04:51:16" + "time": "2017-06-27T22:17:23+00:00" + }, + { + "name": "guzzlehttp/psr7", + "version": "1.x-dev", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "2595b33c1c924889b474d324f3d719fa40b6954e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/2595b33c1c924889b474d324f3d719fa40b6954e", + "reference": "2595b33c1c924889b474d324f3d719fa40b6954e", + "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-08-13T16:05:52+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": "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": "siu-toba/jwt-util", - "version": "v1.0.1", + "version": "v1.0.3", "source": { "type": "git", "url": "https://github.com/SIU-Toba/jwt-util.git", - "reference": "f08725656de7d6b82f3de3615f09f0ce47680b8f" + "reference": "4f2b619df2ea4c26d625462e9cafd489fe9d86da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/SIU-Toba/jwt-util/zipball/f08725656de7d6b82f3de3615f09f0ce47680b8f", - "reference": "f08725656de7d6b82f3de3615f09f0ce47680b8f", + "url": "https://api.github.com/repos/SIU-Toba/jwt-util/zipball/4f2b619df2ea4c26d625462e9cafd489fe9d86da", + "reference": "4f2b619df2ea4c26d625462e9cafd489fe9d86da", "shasum": "" }, "require": { - "firebase/php-jwt": "^4.0", + "firebase/php-jwt": "^5.0", "php": ">=5.6.0" }, + "require-dev": { + "phpunit/phpunit": "5.7.*" + }, "type": "library", "autoload": { "psr-4": { @@ -156,7 +327,7 @@ ], "description": "Una pequeña librería que autentica con Web Tokens JSON (JWT)", "homepage": "http://www.siu.edu.ar", - "time": "2017-01-09 19:54:14" + "time": "2018-04-25T02:23:49+00:00" }, { "name": "siu-toba/ssl-cert-utils", @@ -190,38 +361,40 @@ } ], "description": "Utilidades para manipular y sacar información de certificados SSL", - "time": "2016-04-12 18:08:51" + "time": "2016-04-12T18:08:51+00:00" } ], "packages-dev": [ { "name": "doctrine/instantiator", - "version": "1.0.5", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" + "reference": "a2c590166b2133a4633738648b6b064edae0814a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/a2c590166b2133a4633738648b6b064edae0814a", + "reference": "a2c590166b2133a4633738648b6b064edae0814a", "shasum": "" }, "require": { - "php": ">=5.3,<8.0-DEV" + "php": "^7.1" }, "require-dev": { - "athletic/athletic": "~0.1.8", + "doctrine/coding-standard": "^6.0", "ext-pdo": "*", "ext-phar": "*", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~2.0" + "phpbench/phpbench": "^0.13", + "phpstan/phpstan-phpunit": "^0.11", + "phpstan/phpstan-shim": "^0.11", + "phpunit/phpunit": "^7.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.2.x-dev" } }, "autoload": { @@ -241,46 +414,52 @@ } ], "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://github.com/doctrine/instantiator", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", "keywords": [ "constructor", "instantiate" ], - "time": "2015-06-14 21:17:01" + "time": "2019-03-17T17:37:11+00:00" }, { "name": "myclabs/deep-copy", - "version": "1.6.0", + "version": "1.9.3", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "5a5a9fc8025a08d8919be87d6884d5a92520cefe" + "reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/5a5a9fc8025a08d8919be87d6884d5a92520cefe", - "reference": "5a5a9fc8025a08d8919be87d6884d5a92520cefe", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/007c053ae6f31bba39dfa19a7726f56e9763bbea", + "reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea", "shasum": "" }, "require": { - "php": ">=5.4.0" + "php": "^7.1" + }, + "replace": { + "myclabs/deep-copy": "self.version" }, "require-dev": { - "doctrine/collections": "1.*", - "phpunit/phpunit": "~4.1" + "doctrine/collections": "^1.0", + "doctrine/common": "^2.6", + "phpunit/phpunit": "^7.1" }, "type": "library", "autoload": { "psr-4": { "DeepCopy\\": "src/DeepCopy/" - } + }, + "files": [ + "src/DeepCopy/deep_copy.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "description": "Create deep copies (clones) of your objects", - "homepage": "https://github.com/myclabs/DeepCopy", "keywords": [ "clone", "copy", @@ -288,39 +467,37 @@ "object", "object graph" ], - "time": "2017-01-26 22:05:40" + "time": "2019-08-09T12:45:53+00:00" }, { "name": "phpdocumentor/reflection-common", - "version": "1.0", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c" + "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/144c307535e82c8fdcaacbcfc1d6d8eeb896687c", - "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/63a995caa1ca9e5590304cd845c15ad6d482a62a", + "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a", "shasum": "" }, "require": { - "php": ">=5.5" + "php": ">=7.1" }, "require-dev": { - "phpunit/phpunit": "^4.6" + "phpunit/phpunit": "~6" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.x-dev" } }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src" - ] + "phpDocumentor\\Reflection\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -342,33 +519,39 @@ "reflection", "static analysis" ], - "time": "2015-12-27 11:43:31" + "time": "2018-08-07T13:53:10+00:00" }, { "name": "phpdocumentor/reflection-docblock", - "version": "3.1.1", + "version": "4.3.2", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e" + "reference": "b83ff7cfcfee7827e1e78b637a5904fe6a96698e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/8331b5efe816ae05461b7ca1e721c01b46bafb3e", - "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/b83ff7cfcfee7827e1e78b637a5904fe6a96698e", + "reference": "b83ff7cfcfee7827e1e78b637a5904fe6a96698e", "shasum": "" }, "require": { - "php": ">=5.5", - "phpdocumentor/reflection-common": "^1.0@dev", - "phpdocumentor/type-resolver": "^0.2.0", + "php": "^7.0", + "phpdocumentor/reflection-common": "^1.0.0 || ^2.0.0", + "phpdocumentor/type-resolver": "~0.4 || ^1.0.0", "webmozart/assert": "^1.0" }, "require-dev": { - "mockery/mockery": "^0.9.4", - "phpunit/phpunit": "^4.4" + "doctrine/instantiator": "^1.0.5", + "mockery/mockery": "^1.0", + "phpunit/phpunit": "^6.4" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.x-dev" + } + }, "autoload": { "psr-4": { "phpDocumentor\\Reflection\\": [ @@ -387,41 +570,40 @@ } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2016-09-30 07:12:33" + "time": "2019-09-12T14:27:41+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "0.2.1", + "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb" + "reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb", - "reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/2e32a6d48972b2c1976ed5d8967145b6cec4a4a9", + "reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9", "shasum": "" }, "require": { - "php": ">=5.5", - "phpdocumentor/reflection-common": "^1.0" + "php": "^7.1", + "phpdocumentor/reflection-common": "^2.0" }, "require-dev": { - "mockery/mockery": "^0.9.4", - "phpunit/phpunit": "^5.2||^4.8.24" + "ext-tokenizer": "^7.1", + "mockery/mockery": "~1", + "phpunit/phpunit": "^7.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.x-dev" } }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] + "phpDocumentor\\Reflection\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -434,42 +616,43 @@ "email": "me@mikevanriel.com" } ], - "time": "2016-11-25 06:54:22" + "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", + "time": "2019-08-22T18:11:29+00:00" }, { "name": "phpspec/prophecy", - "version": "v1.7.0", + "version": "1.8.1", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "93d39f1f7f9326d746203c7c056f300f7f126073" + "reference": "1927e75f4ed19131ec9bcc3b002e07fb1173ee76" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/93d39f1f7f9326d746203c7c056f300f7f126073", - "reference": "93d39f1f7f9326d746203c7c056f300f7f126073", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/1927e75f4ed19131ec9bcc3b002e07fb1173ee76", + "reference": "1927e75f4ed19131ec9bcc3b002e07fb1173ee76", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", "php": "^5.3|^7.0", - "phpdocumentor/reflection-docblock": "^2.0|^3.0.2", - "sebastian/comparator": "^1.1|^2.0", + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", + "sebastian/comparator": "^1.1|^2.0|^3.0", "sebastian/recursion-context": "^1.0|^2.0|^3.0" }, "require-dev": { "phpspec/phpspec": "^2.5|^3.2", - "phpunit/phpunit": "^4.8 || ^5.6.5" + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.6.x-dev" + "dev-master": "1.8.x-dev" } }, "autoload": { - "psr-0": { - "Prophecy\\": "src/" + "psr-4": { + "Prophecy\\": "src/Prophecy" } }, "notification-url": "https://packagist.org/downloads/", @@ -497,7 +680,7 @@ "spy", "stub" ], - "time": "2017-03-02 20:05:34" + "time": "2019-06-13T12:50:23+00:00" }, { "name": "phpunit/php-code-coverage", @@ -560,20 +743,20 @@ "testing", "xunit" ], - "time": "2017-04-02 07:44:40" + "time": "2017-04-02T07:44:40+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "1.4.2", + "version": "1.4.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5" + "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/3cc8f69b3028d0f96a9078e6295d86e9bf019be5", - "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4", + "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4", "shasum": "" }, "require": { @@ -607,7 +790,7 @@ "filesystem", "iterator" ], - "time": "2016-10-03 07:40:28" + "time": "2017-11-27T13:52:08+00:00" }, { "name": "phpunit/php-text-template", @@ -648,7 +831,7 @@ "keywords": [ "template" ], - "time": "2015-06-21 13:50:34" + "time": "2015-06-21T13:50:34+00:00" }, { "name": "phpunit/php-timer", @@ -697,33 +880,33 @@ "keywords": [ "timer" ], - "time": "2017-02-26 11:10:40" + "time": "2017-02-26T11:10:40+00:00" }, { "name": "phpunit/php-token-stream", - "version": "1.4.11", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "e03f8f67534427a787e21a385a67ec3ca6978ea7" + "reference": "791198a2c6254db10131eecfe8c06670700904db" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/e03f8f67534427a787e21a385a67ec3ca6978ea7", - "reference": "e03f8f67534427a787e21a385a67ec3ca6978ea7", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/791198a2c6254db10131eecfe8c06670700904db", + "reference": "791198a2c6254db10131eecfe8c06670700904db", "shasum": "" }, "require": { "ext-tokenizer": "*", - "php": ">=5.3.3" + "php": "^7.0" }, "require-dev": { - "phpunit/phpunit": "~4.2" + "phpunit/phpunit": "^6.2.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -746,20 +929,20 @@ "keywords": [ "tokenizer" ], - "time": "2017-02-27 10:12:30" + "time": "2017-11-27T05:48:46+00:00" }, { "name": "phpunit/phpunit", - "version": "5.7.19", + "version": "5.7.27", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "69c4f49ff376af2692bad9cebd883d17ebaa98a1" + "reference": "b7803aeca3ccb99ad0a506fa80b64cd6a56bbc0c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/69c4f49ff376af2692bad9cebd883d17ebaa98a1", - "reference": "69c4f49ff376af2692bad9cebd883d17ebaa98a1", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b7803aeca3ccb99ad0a506fa80b64cd6a56bbc0c", + "reference": "b7803aeca3ccb99ad0a506fa80b64cd6a56bbc0c", "shasum": "" }, "require": { @@ -777,14 +960,14 @@ "phpunit/php-timer": "^1.0.6", "phpunit/phpunit-mock-objects": "^3.2", "sebastian/comparator": "^1.2.4", - "sebastian/diff": "~1.2", + "sebastian/diff": "^1.4.3", "sebastian/environment": "^1.3.4 || ^2.0", "sebastian/exporter": "~2.0", "sebastian/global-state": "^1.1", "sebastian/object-enumerator": "~2.0", "sebastian/resource-operations": "~1.0", - "sebastian/version": "~1.0.3|~2.0", - "symfony/yaml": "~2.1|~3.0" + "sebastian/version": "^1.0.6|^2.0.1", + "symfony/yaml": "~2.1|~3.0|~4.0" }, "conflict": { "phpdocumentor/reflection-docblock": "3.0.2" @@ -828,20 +1011,20 @@ "testing", "xunit" ], - "time": "2017-04-03 02:22:27" + "time": "2018-02-01T05:50:59+00:00" }, { "name": "phpunit/phpunit-mock-objects", - "version": "3.4.3", + "version": "3.4.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "3ab72b65b39b491e0c011e2e09bb2206c2aa8e24" + "reference": "a23b761686d50a560cc56233b9ecf49597cc9118" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/3ab72b65b39b491e0c011e2e09bb2206c2aa8e24", - "reference": "3ab72b65b39b491e0c011e2e09bb2206c2aa8e24", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/a23b761686d50a560cc56233b9ecf49597cc9118", + "reference": "a23b761686d50a560cc56233b9ecf49597cc9118", "shasum": "" }, "require": { @@ -887,7 +1070,8 @@ "mock", "xunit" ], - "time": "2016-12-08 20:27:08" + "abandoned": true, + "time": "2017-06-30T09:13:00+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -932,7 +1116,7 @@ ], "description": "Looks up which function or method a line of code belongs to", "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "time": "2017-03-04 06:30:41" + "time": "2017-03-04T06:30:41+00:00" }, { "name": "sebastian/comparator", @@ -996,27 +1180,27 @@ "compare", "equality" ], - "time": "2017-01-29 09:50:25" + "time": "2017-01-29T09:50:25+00:00" }, { "name": "sebastian/diff", - "version": "1.4.1", + "version": "1.4.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e" + "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e", - "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7f066a26a962dbe58ddea9f72a4e82874a3975a4", + "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^5.3.3 || ^7.0" }, "require-dev": { - "phpunit/phpunit": "~4.8" + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" }, "type": "library", "extra": { @@ -1048,7 +1232,7 @@ "keywords": [ "diff" ], - "time": "2015-12-08 07:14:41" + "time": "2017-05-22T07:24:03+00:00" }, { "name": "sebastian/environment", @@ -1098,7 +1282,7 @@ "environment", "hhvm" ], - "time": "2016-11-26 07:53:53" + "time": "2016-11-26T07:53:53+00:00" }, { "name": "sebastian/exporter", @@ -1165,7 +1349,7 @@ "export", "exporter" ], - "time": "2016-11-19 08:54:04" + "time": "2016-11-19T08:54:04+00:00" }, { "name": "sebastian/global-state", @@ -1216,7 +1400,7 @@ "keywords": [ "global state" ], - "time": "2015-10-12 03:26:01" + "time": "2015-10-12T03:26:01+00:00" }, { "name": "sebastian/object-enumerator", @@ -1262,7 +1446,7 @@ ], "description": "Traverses array structures and object graphs to enumerate all referenced objects", "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "time": "2017-02-18 15:18:39" + "time": "2017-02-18T15:18:39+00:00" }, { "name": "sebastian/recursion-context", @@ -1315,7 +1499,7 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2016-11-19 07:33:16" + "time": "2016-11-19T07:33:16+00:00" }, { "name": "sebastian/resource-operations", @@ -1357,7 +1541,7 @@ ], "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "time": "2015-07-28 20:34:47" + "time": "2015-07-28T20:34:47+00:00" }, { "name": "sebastian/version", @@ -1400,27 +1584,89 @@ ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", - "time": "2016-10-03 07:35:21" + "time": "2016-10-03T07:35:21+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.12.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "550ebaac289296ce228a706d0867afc34687e3f4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/550ebaac289296ce228a706d0867afc34687e3f4", + "reference": "550ebaac289296ce228a706d0867afc34687e3f4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.12-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "time": "2019-08-06T08:03:45+00:00" }, { "name": "symfony/yaml", - "version": "v3.2.6", + "version": "v4.3.4", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "093e416ad096355149e265ea2e4cc1f9ee40ab1a" + "reference": "5a0b7c32dc3ec56fd4abae8a4a71b0cf05013686" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/093e416ad096355149e265ea2e4cc1f9ee40ab1a", - "reference": "093e416ad096355149e265ea2e4cc1f9ee40ab1a", + "url": "https://api.github.com/repos/symfony/yaml/zipball/5a0b7c32dc3ec56fd4abae8a4a71b0cf05013686", + "reference": "5a0b7c32dc3ec56fd4abae8a4a71b0cf05013686", "shasum": "" }, "require": { - "php": ">=5.5.9" + "php": "^7.1.3", + "symfony/polyfill-ctype": "~1.8" + }, + "conflict": { + "symfony/console": "<3.4" }, "require-dev": { - "symfony/console": "~2.8|~3.0" + "symfony/console": "~3.4|~4.0" }, "suggest": { "symfony/console": "For validating YAML files using the lint command" @@ -1428,7 +1674,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-master": "4.3-dev" } }, "autoload": { @@ -1455,28 +1701,28 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2017-03-07 16:47:02" + "time": "2019-08-20T14:27:59+00:00" }, { "name": "webmozart/assert", - "version": "1.2.0", + "version": "1.5.0", "source": { "type": "git", "url": "https://github.com/webmozart/assert.git", - "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f" + "reference": "88e6d84706d09a236046d686bbea96f07b3a34f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/2db61e59ff05fe5126d152bd0655c9ea113e550f", - "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f", + "url": "https://api.github.com/repos/webmozart/assert/zipball/88e6d84706d09a236046d686bbea96f07b3a34f4", + "reference": "88e6d84706d09a236046d686bbea96f07b3a34f4", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0" + "php": "^5.3.3 || ^7.0", + "symfony/polyfill-ctype": "^1.8" }, "require-dev": { - "phpunit/phpunit": "^4.6", - "sebastian/version": "^1.0.1" + "phpunit/phpunit": "^4.8.36 || ^7.5.13" }, "type": "library", "extra": { @@ -1505,16 +1751,18 @@ "check", "validate" ], - "time": "2016-11-23 20:04:58" + "time": "2019-08-24T08:43:50+00:00" } ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": { + "guzzlehttp/psr7": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=5.5.0" + "php": ">=5.6.0" }, "platform-dev": [] } From 5961cb9c0ccd6360ec1ac31fad7e833c00482539 Mon Sep 17 00:00:00 2001 From: enfoqueNativo Date: Mon, 23 Sep 2019 15:32:49 -0300 Subject: [PATCH 18/24] Agrega conversion utf-8 a los valores en el hidratador --- src/SIUToba/rest/lib/rest_hidratador.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/SIUToba/rest/lib/rest_hidratador.php b/src/SIUToba/rest/lib/rest_hidratador.php index 310ccca..06a4f21 100644 --- a/src/SIUToba/rest/lib/rest_hidratador.php +++ b/src/SIUToba/rest/lib/rest_hidratador.php @@ -76,7 +76,7 @@ protected static function aplicar_spec_fila($spec, $fila) } if (is_array($campo) && isset($campo['_mapeo'])) { // "nombre" => array('_mapeo' => "otro nombre", - $nueva_fila[$key] = $fila[$campo['_mapeo']]; + $nueva_fila[$key] = \array_map('utf8_e_seguro', $fila[$campo['_mapeo']]); continue; } if (is_array($campo) && isset($campo['_compuesto'])) { @@ -86,12 +86,11 @@ protected static function aplicar_spec_fila($spec, $fila) } //pasa como viene if (is_array($campo)) { - $nueva_fila[$key] = $fila[$key]; // 'key' => array().. + $nueva_fila[$key] = utf8_e_seguro($fila[$key]); // 'key' => array().. } else { - $nueva_fila[$campo] = $fila[$campo]; // 2 => 'campo' + $nueva_fila[$campo] = utf8_e_seguro($fila[$campo]); // 2 => 'campo' } } - return $nueva_fila; } From 1d629ce8d3936f07c8d61432872a235bd97b54dc Mon Sep 17 00:00:00 2001 From: enfoqueNativo Date: Mon, 23 Sep 2019 15:33:14 -0300 Subject: [PATCH 19/24] Agrega la recuperacion de la respuesta en el caso comun --- src/SIUToba/rest/rest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/SIUToba/rest/rest.php b/src/SIUToba/rest/rest.php index 2bf3807..61204ae 100644 --- a/src/SIUToba/rest/rest.php +++ b/src/SIUToba/rest/rest.php @@ -250,7 +250,8 @@ public function procesar() } else { $recurso = $this->router->buscar_controlador($method, $url); $this->logger->debug("Controlador encontrado {$recurso->archivo} :: {$recurso->accion} (".implode(',', $recurso->parametros).")"); - $recurso->ejecutar_accion(); + $respuesta = $recurso->ejecutar_accion(); + $this->set_response($respuesta); } } catch (rest_error_autenticacion $ex) { $respuesta = $this->response; //Fuerzo instanciacion ya que necesito pasarlo por referencia From cc9f860af3ffd994ec3e78d8f3ae4232e5e1fb85 Mon Sep 17 00:00:00 2001 From: Richard Date: Wed, 24 Jun 2020 18:28:12 -0300 Subject: [PATCH 20/24] Fix test por cambios en documentacion --- tests/docs/annotaciones_docsTest.php | 14 +++++++------- tests/http/respuestaTest.php | 6 ++++-- tests/http/respuesta_restTest.php | 9 ++++++--- tests/lib/rest_errorTest.php | 2 +- tests/lib/rest_filtro_sqlTest.php | 17 ++++++++++++----- tests/lib/rest_validadorTest.php | 11 +++++++---- tests/lib/ruteadorTest.php | 2 +- tests/lib/ruteador_ejemploTest.php | 2 +- tests/seguridad/firewallTest.php | 10 +++++++--- 9 files changed, 46 insertions(+), 27 deletions(-) diff --git a/tests/docs/annotaciones_docsTest.php b/tests/docs/annotaciones_docsTest.php index 2bf2e0a..6d5c766 100644 --- a/tests/docs/annotaciones_docsTest.php +++ b/tests/docs/annotaciones_docsTest.php @@ -7,7 +7,7 @@ class annotaciones_docsTest extends TestCase { - protected function setUp() + protected function setUp(): void { include_once __DIR__.'/../../src/SIUToba/rest/lib/funciones_basicas.php'; parent::setUp(); @@ -59,7 +59,7 @@ public function testParametrosMetodos() // @param_query $juego string nombre del juego $this->assertEquals('query', $pq['in']); $this->assertEquals('juego', $pq['name']); - $this->assertEquals('string', $pq['type']); + $this->assertEquals('string', $pq['schema']['type']); $this->assertEquals('nombre del juego', $pq['description']); $params_body = $a->get_parametros_metodo($metodos[0], 'body'); @@ -67,9 +67,9 @@ public function testParametrosMetodos() //@param_body $limit integer Limitar a esta cantidad de registros $params_body1 = $params_body[0]; - $this->assertEquals('body', $params_body1['in']); - $this->assertEquals('limit', $params_body1['name']); - $this->assertEquals('integer', $params_body1['type']); + $this->assertTrue(is_array($params_body1['content']['*/*']['schema'])); + $this->assertArrayHasKey('type',$params_body1['content']['*/*']['schema']); + $this->assertEquals('integer', $params_body1['content']['*/*']['schema']['type']); $this->assertEquals('Limitar a esta cantidad de registros', $params_body1['description']); } @@ -80,13 +80,13 @@ public function testRespuestasMetodos() $respuestas = $a->get_respuestas_metodo($metodos[0]); $schema = array('type' => 'array', - 'items' => array('$ref' => '#/definitions/Persona'), ); + 'items' => array('$ref' => '#/components/schemas/Persona'), ); $this->assertEquals(3, count($respuestas)); $this->assertArrayHasKey('200', $respuestas); $this->assertEquals('descripcion', $respuestas['200']['description']); - $this->assertEquals($schema, $respuestas['200']['schema']); + $this->assertEquals($schema, $respuestas['200']['content']['*/*']['schema']); $this->assertArrayHasKey('404', $respuestas); $this->assertEquals('No se pudo encontrar a la persona', $respuestas['404']['description']); diff --git a/tests/http/respuestaTest.php b/tests/http/respuestaTest.php index 6ced32c..6a39ba0 100644 --- a/tests/http/respuestaTest.php +++ b/tests/http/respuestaTest.php @@ -2,16 +2,18 @@ namespace SIUToba\rest\tests\http; -use \PHPUnit\Framework\TestCase; +use PHPUnit\Framework\TestCase; use SIUToba\rest\http\respuesta; +use SIUToba\rest\lib\rest_error_interno; class respuestaTest extends TestCase { /** - * @expectedException SIUToba\rest\lib\rest_error_interno + * @expectedException rest_error_interno */ public function testFinalizarError() { + $this->expectException(rest_error_interno::class); $r = new respuesta(); $r->finalizar(); //no se seteo la respuesta } diff --git a/tests/http/respuesta_restTest.php b/tests/http/respuesta_restTest.php index a454c66..3dc89b3 100644 --- a/tests/http/respuesta_restTest.php +++ b/tests/http/respuesta_restTest.php @@ -8,8 +8,9 @@ namespace SIUToba\rest\tests\http; -use \PHPUnit\Framework\TestCase; +use PHPUnit\Framework\TestCase; use SIUToba\rest\http\respuesta_rest; +use SIUToba\rest\lib\rest_error; class respuesta_restTest extends TestCase { @@ -24,20 +25,22 @@ public function testGet() } /** - * @expectedException SIUToba\rest\lib\rest_error + * @expectedException rest_error */ public function testGetNotFound() { + $this->expectException(rest_error::class); $data = false; $r = new respuesta_rest(); $r->get($data); } /** - * @expectedException SIUToba\rest\lib\rest_error + * @expectedException rest_error */ public function testNotFound() { + $this->expectException(rest_error::class); $r = new respuesta_rest(); $r->not_found("mje"); } diff --git a/tests/lib/rest_errorTest.php b/tests/lib/rest_errorTest.php index e6b6576..3f6726f 100644 --- a/tests/lib/rest_errorTest.php +++ b/tests/lib/rest_errorTest.php @@ -8,7 +8,7 @@ class rest_errorTest extends TestCase { - protected function setUp() + protected function setUp(): void { include_once \realpath(__DIR__.'/../../src/SIUToba/rest/lib/funciones_basicas.php'); parent::setUp(); diff --git a/tests/lib/rest_filtro_sqlTest.php b/tests/lib/rest_filtro_sqlTest.php index 8da0cbe..4fd2ca5 100644 --- a/tests/lib/rest_filtro_sqlTest.php +++ b/tests/lib/rest_filtro_sqlTest.php @@ -2,7 +2,8 @@ namespace SIUToba\rest\tests\lib; -use \PHPUnit\Framework\TestCase; +use PHPUnit\Framework\TestCase; +use SIUToba\rest\lib\rest_error; use SIUToba\rest\lib\rest_filtro_sql; use SIUToba\rest\rest; @@ -15,17 +16,19 @@ class rest_filtro_sqlTest extends TestCase */ protected $filtro; - protected function setUp() + protected function setUp(): void { parent::setUp(); $this->request = $this->get_mock_request(); } /** - * @expectedException SIUToba\rest\lib\rest_error + * @expectedException rest_error */ public function testParametroIncorrecto() { + $this->expectException(rest_error::class); + $param = "nombre"; $this->filtro->agregar_campo($param); $this->agregar_parametro_request($param, 'no_existe;pepe'); @@ -112,10 +115,12 @@ public function testOrderByVacio() } /** - * @expectedException SIUToba\rest\lib\rest_error + * @expectedException rest_error */ public function testOrderByInvalido() { + $this->expectException(rest_error::class); + $this->filtro->agregar_campo('nombre'); $this->filtro->agregar_campo('apellido'); @@ -125,10 +130,12 @@ public function testOrderByInvalido() } /** - * @expectedException SIUToba\rest\lib\rest_error + * @expectedException rest_error */ public function testLimitError() { + $this->expectException(rest_error::class); + $this->request->expects($this->exactly(2)) ->method('get') ->with($this->logicalOr($this->equalTo('limit'), $this->equalTo('page'))) diff --git a/tests/lib/rest_validadorTest.php b/tests/lib/rest_validadorTest.php index ff147cc..3ceb5c9 100644 --- a/tests/lib/rest_validadorTest.php +++ b/tests/lib/rest_validadorTest.php @@ -2,7 +2,7 @@ namespace SIUToba\rest\tests\lib; -use \PHPUnit\Framework\TestCase; +use PHPUnit\Framework\TestCase; use SIUToba\rest\lib\rest_error; use SIUToba\rest\lib\rest_validador; @@ -36,10 +36,11 @@ public function testLongitudOk() } /** - * @expectedException SIUToba\rest\lib\rest_error + * @expectedException rest_error */ public function testLongitudError() { + $this->expectException(rest_error::class); $regla = array( 'campo' => array('_validar' => array(rest_validador::TIPO_LONGITUD => array('min' => 1, 'max' => 2))), ); @@ -49,10 +50,11 @@ public function testLongitudError() } /** - * @expectedException SIUToba\rest\lib\rest_error + * @expectedException rest_error */ public function testLongitudError2() { + $this->expectException(rest_error::class); $regla = array( 'campo' => array('_validar' => array(rest_validador::TIPO_LONGITUD => array('min' => 2))), ); @@ -74,10 +76,11 @@ public function testArrayOk() } /** - * @expectedException SIUToba\rest\lib\rest_error + * @expectedException rest_error */ public function testLongitudError3() { + $this->expectException(rest_error::class); $regla = array( 'campo' => array('_validar' => array(rest_validador::TIPO_ARREGLO => array('min' => 2, 'max' => 3))) ); diff --git a/tests/lib/ruteadorTest.php b/tests/lib/ruteadorTest.php index b2d785c..130be57 100644 --- a/tests/lib/ruteadorTest.php +++ b/tests/lib/ruteadorTest.php @@ -19,7 +19,7 @@ class ruteadorTest extends TestCase protected $instanciador; - public function setUp() + protected function setUp(): void { $this->instanciador = $this->getMockBuilder('SIUToba\rest\lib\rest_instanciador') diff --git a/tests/lib/ruteador_ejemploTest.php b/tests/lib/ruteador_ejemploTest.php index ed6b0c1..17f5163 100644 --- a/tests/lib/ruteador_ejemploTest.php +++ b/tests/lib/ruteador_ejemploTest.php @@ -24,7 +24,7 @@ class ruteador_ejemploTest extends TestCase protected $BASE_DIR; - public function setUp() + protected function setUp(): void { $this->BASE_DIR = array(realpath(__DIR__ . '/../_ejemplo/rest'), realpath(__DIR__ . '/../_ejemplo/rest_extension')); diff --git a/tests/seguridad/firewallTest.php b/tests/seguridad/firewallTest.php index ecaea11..3d32be5 100644 --- a/tests/seguridad/firewallTest.php +++ b/tests/seguridad/firewallTest.php @@ -2,7 +2,9 @@ namespace SIUToba\rest\tests\seguridad; -use \PHPUnit\Framework\TestCase; +use PHPUnit\Framework\TestCase; +use SIUToba\rest\seguridad\autenticacion\rest_error_autenticacion; +use SIUToba\rest\seguridad\autorizacion\rest_error_autorizacion; use SIUToba\rest\seguridad\firewall; class firewallTest extends TestCase @@ -76,20 +78,22 @@ public function testAutenticarOk() } /** - * @expectedException SIUToba\rest\seguridad\autenticacion\rest_error_autenticacion + * @expectedException rest_error_autenticacion */ public function atestAutenticarError() { + $this->expectException(rest_error_autenticacion::class); $f = $this->get_instancia_manejar(null, false); $usuario = $f->manejar('/', null); $this->assertEquals(null, $usuario); } /** - * @expectedException SIUToba\rest\seguridad\autorizacion\rest_error_autorizacion + * @expectedException rest_error_autorizacion */ public function testAutorizarError() { + $this->expectException(rest_error_autorizacion::class); $f = $this->get_instancia_manejar('usuario', false); $usuario = $f->manejar('/', null); $this->assertEquals(null, $usuario); From a7e5af851b0559a3d8f3180e1d2b9393a95ae101 Mon Sep 17 00:00:00 2001 From: Richard Date: Wed, 24 Jun 2020 18:31:28 -0300 Subject: [PATCH 21/24] Agrega conversion a utf-8 en valores devueltos y CS-Fixer --- src/SIUToba/rest/docs/anotaciones_docs.php | 65 ++++++++++------------ src/SIUToba/rest/docs/tipo_datos_docs.php | 10 ++-- src/SIUToba/rest/lib/rest_hidratador.php | 5 +- 3 files changed, 37 insertions(+), 43 deletions(-) diff --git a/src/SIUToba/rest/docs/anotaciones_docs.php b/src/SIUToba/rest/docs/anotaciones_docs.php index 63a5a52..bf173d6 100644 --- a/src/SIUToba/rest/docs/anotaciones_docs.php +++ b/src/SIUToba/rest/docs/anotaciones_docs.php @@ -199,23 +199,23 @@ protected function get_parametro_tipo($parametro, $type) } $api_parameter = array(); - $tipo_dato = tipo_datos_docs::get_tipo_datos($matches[2]); - $api_parameter['description'] = $matches[4] ?: '[sin descripcion]'; - switch($type) { - case 'query': - $api_parameter['name'] = ltrim($matches[1], '$'); - $api_parameter['in'] = $type; - $api_parameter['schema'] = $tipo_dato; - break; - /* case 'path': - $api_parameter['in'] = $type;*/ - case 'body': - $api_parameter['content'] = array('*/*' => ['schema' => $tipo_dato]); - break; - } - - $api_parameter = \array_map('utf8_e_seguro', $api_parameter); - if (!empty($matches[3])) { + $tipo_dato = tipo_datos_docs::get_tipo_datos($matches[2]); + $api_parameter['description'] = $matches[4] ?: '[sin descripcion]'; + switch ($type) { + case 'query': + $api_parameter['name'] = ltrim($matches[1], '$'); + $api_parameter['in'] = $type; + $api_parameter['schema'] = $tipo_dato; + break; + /* case 'path': + $api_parameter['in'] = $type;*/ + case 'body': + $api_parameter['content'] = array('*/*' => ['schema' => $tipo_dato]); + break; + } + + $api_parameter = $this->encoding_estructura($api_parameter); + if (!empty($matches[3])) { $modificadores = $matches[3]; if (preg_match('/required/', $modificadores)) { $api_parameter['required'] = true; @@ -302,29 +302,22 @@ protected function termina_con($needle, $haystack) { return substr($haystack, -strlen($needle)) === $needle; } - - /** - * @param $tipo - * - * @return array - */ - protected function get_tipo_datos($tipo) + + private function encoding_estructura($estructura) { - $tipo = preg_replace("#[\{\}\"\s]#",'', $tipo); - if (trim($tipo) == '') { - return; + if (!is_array($estructura)) { + return \utf8_e_seguro($estructura); } - - $refs = explode(':', $tipo); - if (false === $refs) { - $tipoRef = array('type' => \utf8_e_seguro(trim($tipo))); //Basic type - no name - } else { - if (substr($refs[0], 0, 1) == '$') { - $tipoRef = array('$ref' => "#/definitions/". \utf8_e_seguro(trim($refs[1]))); //Referred type {"$ref": "Defined@Model"} + + $keys = array_keys($estructura); + foreach ($keys as $index) { + if (is_array($estructura[$index])) { + $estructura[$index] = $this->encoding_estructura($estructura[$index]); } else { - $tipoRef = array('type' => \utf8_e_seguro(trim($refs[1]))); //Basic type - named {"id" : "integer"} + $estructura[$index] = \utf8_e_seguro($estructura[$index]); } } - return $tipoRef; + + return $estructura; } } diff --git a/src/SIUToba/rest/docs/tipo_datos_docs.php b/src/SIUToba/rest/docs/tipo_datos_docs.php index a413adf..2908e12 100644 --- a/src/SIUToba/rest/docs/tipo_datos_docs.php +++ b/src/SIUToba/rest/docs/tipo_datos_docs.php @@ -36,7 +36,7 @@ class tipo_datos_docs */ public static function get_tipo_datos($tipo) { - $tipo = preg_replace("#[\{\}\"\s]#",'', $tipo); + $tipo = preg_replace("#[\{\}\"\s]#", '', $tipo); if (trim($tipo) == '') { return; } @@ -46,10 +46,10 @@ public static function get_tipo_datos($tipo) $tipoRef = self::get_tipo_formato(trim($tipo)); //Basic type - no name } else { if (substr($refs[0], 0, 1) == '$') { - $tipoRef = array('$ref' => "#/components/schemas/". trim($refs[1])); //Referred type {"$ref": "Defined@Model"} + $tipoRef = array('$ref' => "#/components/schemas/". \utf8_e_seguro(trim($refs[1]))); //Referred type {"$ref": "Defined@Model"} } else { - $tipoEncontrado = (count($refs) > 1) ? $refs[1] : $refs[0]; - $tipoRef = self::get_tipo_formato(trim($tipoEncontrado)); //Basic type - named {"id" : "integer"} + $tipoEncontrado = (count($refs) > 1) ? $refs[1] : $refs[0]; + $tipoRef = self::get_tipo_formato(trim($tipoEncontrado)); //Basic type - named {"id" : "integer"} } } return $tipoRef; @@ -72,4 +72,4 @@ public static function get_tipo_formato($tipo) } return ['type' => $tipo]; //Tipo definido por el usuario } -} \ No newline at end of file +} diff --git a/src/SIUToba/rest/lib/rest_hidratador.php b/src/SIUToba/rest/lib/rest_hidratador.php index 06a4f21..32fe898 100644 --- a/src/SIUToba/rest/lib/rest_hidratador.php +++ b/src/SIUToba/rest/lib/rest_hidratador.php @@ -38,7 +38,7 @@ public static function hidratar_fila($spec, $fuente) */ public static function deshidratar_fila($data, $spec_hidratar, $damn_thing = array()) { - $nueva_fila = array(); + $nueva_fila = array(); foreach ($spec_hidratar as $key => $campo) { if (!is_array($campo)) { //si no proveen todos los campos no los incluyo. if (isset($data[(string) $campo])) { @@ -76,7 +76,8 @@ protected static function aplicar_spec_fila($spec, $fila) } if (is_array($campo) && isset($campo['_mapeo'])) { // "nombre" => array('_mapeo' => "otro nombre", - $nueva_fila[$key] = \array_map('utf8_e_seguro', $fila[$campo['_mapeo']]); + $aux_val = $fila[$campo['_mapeo']]; + $nueva_fila[$key] = (!is_array($aux_val)) ? utf8_e_seguro($aux_val) : \array_map('utf8_e_seguro', $aux_val); continue; } if (is_array($campo) && isset($campo['_compuesto'])) { From 230bc565cb19024e80b95d15761d60040eda89fb Mon Sep 17 00:00:00 2001 From: Richard Date: Wed, 24 Jun 2020 18:32:05 -0300 Subject: [PATCH 22/24] Actaliza version de phpunit y actualiza lock --- composer.json | 2 +- composer.lock | 1098 ++++++++++++++++++++++++++++++++++--------------- 2 files changed, 756 insertions(+), 344 deletions(-) diff --git a/composer.json b/composer.json index 288c329..d170c64 100644 --- a/composer.json +++ b/composer.json @@ -15,6 +15,6 @@ } }, "require-dev": { - "phpunit/phpunit": "^5.0" + "phpunit/phpunit": "^9.0" } } diff --git a/composer.lock b/composer.lock index a1c6f9c..a3de9d3 100644 --- a/composer.lock +++ b/composer.lock @@ -4,31 +4,31 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "5fd4a57a09f626a04a54e51ab690f7e4", + "content-hash": "71d39eb70768246f02b42ec8de483404", "packages": [ { "name": "doctrine/cache", - "version": "v1.8.0", + "version": "1.10.1", "source": { "type": "git", "url": "https://github.com/doctrine/cache.git", - "reference": "d768d58baee9a4862ca783840eca1b9add7a7f57" + "reference": "35a4a70cd94e09e2259dfae7488afc6b474ecbd3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/cache/zipball/d768d58baee9a4862ca783840eca1b9add7a7f57", - "reference": "d768d58baee9a4862ca783840eca1b9add7a7f57", + "url": "https://api.github.com/repos/doctrine/cache/zipball/35a4a70cd94e09e2259dfae7488afc6b474ecbd3", + "reference": "35a4a70cd94e09e2259dfae7488afc6b474ecbd3", "shasum": "" }, "require": { - "php": "~7.1" + "php": "~7.1 || ^8.0" }, "conflict": { "doctrine/common": ">2.2,<2.4" }, "require-dev": { "alcaeus/mongo-php-adapter": "^1.1", - "doctrine/coding-standard": "^4.0", + "doctrine/coding-standard": "^6.0", "mongodb/mongodb": "^1.1", "phpunit/phpunit": "^7.0", "predis/predis": "~1.0" @@ -39,7 +39,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.8.x-dev" + "dev-master": "1.9.x-dev" } }, "autoload": { @@ -52,6 +52,10 @@ "MIT" ], "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, { "name": "Roman Borschel", "email": "roman@code-factory.org" @@ -60,10 +64,6 @@ "name": "Benjamin Eberlei", "email": "kontakt@beberlei.de" }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, { "name": "Jonathan Wage", "email": "jonwage@gmail.com" @@ -73,33 +73,54 @@ "email": "schmittjoh@gmail.com" } ], - "description": "Caching library offering an object-oriented API for many cache backends", - "homepage": "https://www.doctrine-project.org", + "description": "PHP Doctrine Cache library is a popular cache implementation that supports many different drivers such as redis, memcache, apc, mongodb and others.", + "homepage": "https://www.doctrine-project.org/projects/cache.html", "keywords": [ + "abstraction", + "apcu", "cache", - "caching" + "caching", + "couchdb", + "memcached", + "php", + "redis", + "xcache" + ], + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fcache", + "type": "tidelift" + } ], - "time": "2018-08-21T18:01:43+00:00" + "time": "2020-05-27T16:24:54+00:00" }, { "name": "firebase/php-jwt", - "version": "v5.0.0", + "version": "v5.2.0", "source": { "type": "git", "url": "https://github.com/firebase/php-jwt.git", - "reference": "9984a4d3a32ae7673d6971ea00bae9d0a1abba0e" + "reference": "feb0e820b8436873675fd3aca04f3728eb2185cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/firebase/php-jwt/zipball/9984a4d3a32ae7673d6971ea00bae9d0a1abba0e", - "reference": "9984a4d3a32ae7673d6971ea00bae9d0a1abba0e", + "url": "https://api.github.com/repos/firebase/php-jwt/zipball/feb0e820b8436873675fd3aca04f3728eb2185cb", + "reference": "feb0e820b8436873675fd3aca04f3728eb2185cb", "shasum": "" }, "require": { "php": ">=5.3.0" }, "require-dev": { - "phpunit/phpunit": " 4.8.35" + "phpunit/phpunit": ">=4.8 <=9" }, "type": "library", "autoload": { @@ -125,7 +146,11 @@ ], "description": "A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to the current spec.", "homepage": "https://github.com/firebase/php-jwt", - "time": "2017-06-27T22:17:23+00:00" + "keywords": [ + "jwt", + "php" + ], + "time": "2020-03-25T18:49:23+00:00" }, { "name": "guzzlehttp/psr7", @@ -133,12 +158,12 @@ "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "2595b33c1c924889b474d324f3d719fa40b6954e" + "reference": "188cc82398f157483976ccf61bd04ee80afcf29c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/2595b33c1c924889b474d324f3d719fa40b6954e", - "reference": "2595b33c1c924889b474d324f3d719fa40b6954e", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/188cc82398f157483976ccf61bd04ee80afcf29c", + "reference": "188cc82398f157483976ccf61bd04ee80afcf29c", "shasum": "" }, "require": { @@ -154,7 +179,7 @@ "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8" }, "suggest": { - "zendframework/zend-httphandlerrunner": "Emit PSR-7 responses" + "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" }, "type": "library", "extra": { @@ -196,7 +221,7 @@ "uri", "url" ], - "time": "2019-08-13T16:05:52+00:00" + "time": "2020-05-17T20:05:25+00:00" }, { "name": "psr/http-message", @@ -367,20 +392,20 @@ "packages-dev": [ { "name": "doctrine/instantiator", - "version": "1.2.0", + "version": "1.3.1", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "a2c590166b2133a4633738648b6b064edae0814a" + "reference": "f350df0268e904597e3bd9c4685c53e0e333feea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/a2c590166b2133a4633738648b6b064edae0814a", - "reference": "a2c590166b2133a4633738648b6b064edae0814a", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/f350df0268e904597e3bd9c4685c53e0e333feea", + "reference": "f350df0268e904597e3bd9c4685c53e0e333feea", "shasum": "" }, "require": { - "php": "^7.1" + "php": "^7.1 || ^8.0" }, "require-dev": { "doctrine/coding-standard": "^6.0", @@ -419,20 +444,34 @@ "constructor", "instantiate" ], - "time": "2019-03-17T17:37:11+00:00" + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" + } + ], + "time": "2020-05-29T17:27:14+00:00" }, { "name": "myclabs/deep-copy", - "version": "1.9.3", + "version": "1.9.5", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea" + "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/007c053ae6f31bba39dfa19a7726f56e9763bbea", - "reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/b2c28789e80a97badd14145fda39b545d83ca3ef", + "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef", "shasum": "" }, "require": { @@ -467,28 +506,127 @@ "object", "object graph" ], - "time": "2019-08-09T12:45:53+00:00" + "time": "2020-01-17T21:11:47+00:00" + }, + { + "name": "phar-io/manifest", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", + "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-phar": "*", + "phar-io/version": "^2.0", + "php": "^5.6 || ^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "time": "2018-07-08T19:23:20+00:00" + }, + { + "name": "phar-io/version", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/45a2ec53a73c70ce41d55cedef9063630abaf1b6", + "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "time": "2018-07-08T19:19:57+00:00" }, { "name": "phpdocumentor/reflection-common", - "version": "2.0.0", + "version": "2.1.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a" + "reference": "6568f4687e5b41b054365f9ae03fcb1ed5f2069b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/63a995caa1ca9e5590304cd845c15ad6d482a62a", - "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/6568f4687e5b41b054365f9ae03fcb1ed5f2069b", + "reference": "6568f4687e5b41b054365f9ae03fcb1ed5f2069b", "shasum": "" }, "require": { "php": ">=7.1" }, - "require-dev": { - "phpunit/phpunit": "~6" - }, "type": "library", "extra": { "branch-alias": { @@ -519,44 +657,42 @@ "reflection", "static analysis" ], - "time": "2018-08-07T13:53:10+00:00" + "time": "2020-04-27T09:25:28+00:00" }, { "name": "phpdocumentor/reflection-docblock", - "version": "4.3.2", + "version": "5.1.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "b83ff7cfcfee7827e1e78b637a5904fe6a96698e" + "reference": "cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/b83ff7cfcfee7827e1e78b637a5904fe6a96698e", - "reference": "b83ff7cfcfee7827e1e78b637a5904fe6a96698e", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e", + "reference": "cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e", "shasum": "" }, "require": { - "php": "^7.0", - "phpdocumentor/reflection-common": "^1.0.0 || ^2.0.0", - "phpdocumentor/type-resolver": "~0.4 || ^1.0.0", - "webmozart/assert": "^1.0" + "ext-filter": "^7.1", + "php": "^7.2", + "phpdocumentor/reflection-common": "^2.0", + "phpdocumentor/type-resolver": "^1.0", + "webmozart/assert": "^1" }, "require-dev": { - "doctrine/instantiator": "^1.0.5", - "mockery/mockery": "^1.0", - "phpunit/phpunit": "^6.4" + "doctrine/instantiator": "^1", + "mockery/mockery": "^1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.x-dev" + "dev-master": "5.x-dev" } }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] + "phpDocumentor\\Reflection\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -567,38 +703,41 @@ { "name": "Mike van Riel", "email": "me@mikevanriel.com" + }, + { + "name": "Jaap van Otterdijk", + "email": "account@ijaap.nl" } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2019-09-12T14:27:41+00:00" + "time": "2020-02-22T12:28:44+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "1.0.1", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9" + "reference": "30441f2752e493c639526b215ed81d54f369d693" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/2e32a6d48972b2c1976ed5d8967145b6cec4a4a9", - "reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/30441f2752e493c639526b215ed81d54f369d693", + "reference": "30441f2752e493c639526b215ed81d54f369d693", "shasum": "" }, "require": { - "php": "^7.1", + "php": "^7.2", "phpdocumentor/reflection-common": "^2.0" }, "require-dev": { - "ext-tokenizer": "^7.1", - "mockery/mockery": "~1", - "phpunit/phpunit": "^7.0" + "ext-tokenizer": "^7.2", + "mockery/mockery": "~1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.x-dev" + "dev-1.x": "1.x-dev" } }, "autoload": { @@ -617,37 +756,37 @@ } ], "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "time": "2019-08-22T18:11:29+00:00" + "time": "2020-06-19T20:22:09+00:00" }, { "name": "phpspec/prophecy", - "version": "1.8.1", + "version": "v1.10.3", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "1927e75f4ed19131ec9bcc3b002e07fb1173ee76" + "reference": "451c3cd1418cf640de218914901e51b064abb093" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/1927e75f4ed19131ec9bcc3b002e07fb1173ee76", - "reference": "1927e75f4ed19131ec9bcc3b002e07fb1173ee76", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/451c3cd1418cf640de218914901e51b064abb093", + "reference": "451c3cd1418cf640de218914901e51b064abb093", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", "php": "^5.3|^7.0", - "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", - "sebastian/comparator": "^1.1|^2.0|^3.0", - "sebastian/recursion-context": "^1.0|^2.0|^3.0" + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0", + "sebastian/comparator": "^1.2.3|^2.0|^3.0|^4.0", + "sebastian/recursion-context": "^1.0|^2.0|^3.0|^4.0" }, "require-dev": { - "phpspec/phpspec": "^2.5|^3.2", + "phpspec/phpspec": "^2.5 || ^3.2", "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.8.x-dev" + "dev-master": "1.10.x-dev" } }, "autoload": { @@ -680,44 +819,45 @@ "spy", "stub" ], - "time": "2019-06-13T12:50:23+00:00" + "time": "2020-03-05T15:02:03+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "4.0.8", + "version": "8.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "ef7b2f56815df854e66ceaee8ebe9393ae36a40d" + "reference": "ca6647ffddd2add025ab3f21644a441d7c146cdc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ef7b2f56815df854e66ceaee8ebe9393ae36a40d", - "reference": "ef7b2f56815df854e66ceaee8ebe9393ae36a40d", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ca6647ffddd2add025ab3f21644a441d7c146cdc", + "reference": "ca6647ffddd2add025ab3f21644a441d7c146cdc", "shasum": "" }, "require": { "ext-dom": "*", "ext-xmlwriter": "*", - "php": "^5.6 || ^7.0", - "phpunit/php-file-iterator": "^1.3", - "phpunit/php-text-template": "^1.2", - "phpunit/php-token-stream": "^1.4.2 || ^2.0", - "sebastian/code-unit-reverse-lookup": "^1.0", - "sebastian/environment": "^1.3.2 || ^2.0", - "sebastian/version": "^1.0 || ^2.0" + "php": "^7.3", + "phpunit/php-file-iterator": "^3.0", + "phpunit/php-text-template": "^2.0", + "phpunit/php-token-stream": "^4.0", + "sebastian/code-unit-reverse-lookup": "^2.0", + "sebastian/environment": "^5.0", + "sebastian/version": "^3.0", + "theseer/tokenizer": "^1.1.3" }, "require-dev": { - "ext-xdebug": "^2.1.4", - "phpunit/phpunit": "^5.7" + "phpunit/phpunit": "^9.0" }, "suggest": { - "ext-xdebug": "^2.5.1" + "ext-pcov": "*", + "ext-xdebug": "*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0.x-dev" + "dev-master": "8.0-dev" } }, "autoload": { @@ -732,7 +872,7 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], @@ -743,29 +883,38 @@ "testing", "xunit" ], - "time": "2017-04-02T07:44:40+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-05-23T08:02:54+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "1.4.5", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4" + "reference": "eba15e538f2bb3fe018b7bbb47d2fe32d404bfd2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4", - "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/eba15e538f2bb3fe018b7bbb47d2fe32d404bfd2", + "reference": "eba15e538f2bb3fe018b7bbb47d2fe32d404bfd2", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4.x-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -780,7 +929,7 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], @@ -790,26 +939,99 @@ "filesystem", "iterator" ], - "time": "2017-11-27T13:52:08+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-06-15T12:54:35+00:00" + }, + { + "name": "phpunit/php-invoker", + "version": "3.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "62f696ad0d140e0e513e69eaafdebb674d622b4c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/62f696ad0d140e0e513e69eaafdebb674d622b4c", + "reference": "62f696ad0d140e0e513e69eaafdebb674d622b4c", + "shasum": "" + }, + "require": { + "php": "^7.3" + }, + "require-dev": { + "ext-pcntl": "*", + "phpunit/phpunit": "^9.0" + }, + "suggest": { + "ext-pcntl": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", + "keywords": [ + "process" + ], + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-06-15T13:10:07+00:00" }, { "name": "phpunit/php-text-template", - "version": "1.2.1", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + "reference": "0c69cbf965d5317ba33f24a352539f354a25db09" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/0c69cbf965d5317ba33f24a352539f354a25db09", + "reference": "0c69cbf965d5317ba33f24a352539f354a25db09", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, "autoload": { "classmap": [ "src/" @@ -831,32 +1053,38 @@ "keywords": [ "template" ], - "time": "2015-06-21T13:50:34+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-06-15T12:52:43+00:00" }, { "name": "phpunit/php-timer", - "version": "1.0.9", + "version": "5.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f" + "reference": "b0d089de001ba60ffa3be36b23e1b8150d072238" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", - "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/b0d089de001ba60ffa3be36b23e1b8150d072238", + "reference": "b0d089de001ba60ffa3be36b23e1b8150d072238", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0" + "php": "^7.3" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + "phpunit/phpunit": "^9.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -871,7 +1099,7 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], @@ -880,33 +1108,39 @@ "keywords": [ "timer" ], - "time": "2017-02-26T11:10:40+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-06-07T12:05:53+00:00" }, { "name": "phpunit/php-token-stream", - "version": "2.0.2", + "version": "4.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "791198a2c6254db10131eecfe8c06670700904db" + "reference": "e61c593e9734b47ef462340c24fca8d6a57da14e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/791198a2c6254db10131eecfe8c06670700904db", - "reference": "791198a2c6254db10131eecfe8c06670700904db", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/e61c593e9734b47ef462340c24fca8d6a57da14e", + "reference": "e61c593e9734b47ef462340c24fca8d6a57da14e", "shasum": "" }, "require": { "ext-tokenizer": "*", - "php": "^7.0" + "php": "^7.3" }, "require-dev": { - "phpunit/phpunit": "^6.2.4" + "phpunit/phpunit": "^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -929,55 +1163,64 @@ "keywords": [ "tokenizer" ], - "time": "2017-11-27T05:48:46+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-06-16T07:00:44+00:00" }, { "name": "phpunit/phpunit", - "version": "5.7.27", + "version": "9.2.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "b7803aeca3ccb99ad0a506fa80b64cd6a56bbc0c" + "reference": "ad7cc5ec3ab2597b329880e30442d9054526023b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b7803aeca3ccb99ad0a506fa80b64cd6a56bbc0c", - "reference": "b7803aeca3ccb99ad0a506fa80b64cd6a56bbc0c", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ad7cc5ec3ab2597b329880e30442d9054526023b", + "reference": "ad7cc5ec3ab2597b329880e30442d9054526023b", "shasum": "" }, "require": { + "doctrine/instantiator": "^1.2.0", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", "ext-mbstring": "*", "ext-xml": "*", - "myclabs/deep-copy": "~1.3", - "php": "^5.6 || ^7.0", - "phpspec/prophecy": "^1.6.2", - "phpunit/php-code-coverage": "^4.0.4", - "phpunit/php-file-iterator": "~1.4", - "phpunit/php-text-template": "~1.2", - "phpunit/php-timer": "^1.0.6", - "phpunit/phpunit-mock-objects": "^3.2", - "sebastian/comparator": "^1.2.4", - "sebastian/diff": "^1.4.3", - "sebastian/environment": "^1.3.4 || ^2.0", - "sebastian/exporter": "~2.0", - "sebastian/global-state": "^1.1", - "sebastian/object-enumerator": "~2.0", - "sebastian/resource-operations": "~1.0", - "sebastian/version": "^1.0.6|^2.0.1", - "symfony/yaml": "~2.1|~3.0|~4.0" - }, - "conflict": { - "phpdocumentor/reflection-docblock": "3.0.2" + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.9.1", + "phar-io/manifest": "^1.0.3", + "phar-io/version": "^2.0.1", + "php": "^7.3", + "phpspec/prophecy": "^1.8.1", + "phpunit/php-code-coverage": "^8.0.1", + "phpunit/php-file-iterator": "^3.0", + "phpunit/php-invoker": "^3.0", + "phpunit/php-text-template": "^2.0", + "phpunit/php-timer": "^5.0", + "sebastian/code-unit": "^1.0.2", + "sebastian/comparator": "^4.0", + "sebastian/diff": "^4.0", + "sebastian/environment": "^5.0.1", + "sebastian/exporter": "^4.0", + "sebastian/global-state": "^4.0", + "sebastian/object-enumerator": "^4.0", + "sebastian/resource-operations": "^3.0", + "sebastian/type": "^2.1", + "sebastian/version": "^3.0" }, "require-dev": { - "ext-pdo": "*" + "ext-pdo": "*", + "phpspec/prophecy-phpunit": "^2.0" }, "suggest": { - "ext-xdebug": "*", - "phpunit/php-invoker": "~1.1" + "ext-soap": "*", + "ext-xdebug": "*" }, "bin": [ "phpunit" @@ -985,12 +1228,15 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.7.x-dev" + "dev-master": "9.2-dev" } }, "autoload": { "classmap": [ "src/" + ], + "files": [ + "src/Framework/Assert/Functions.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -1011,41 +1257,42 @@ "testing", "xunit" ], - "time": "2018-02-01T05:50:59+00:00" + "funding": [ + { + "url": "https://phpunit.de/donate.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-06-22T07:10:55+00:00" }, { - "name": "phpunit/phpunit-mock-objects", - "version": "3.4.4", + "name": "sebastian/code-unit", + "version": "1.0.3", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "a23b761686d50a560cc56233b9ecf49597cc9118" + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "d650ef9b1fece15ed4d6eaed6e6b469b7b81183a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/a23b761686d50a560cc56233b9ecf49597cc9118", - "reference": "a23b761686d50a560cc56233b9ecf49597cc9118", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/d650ef9b1fece15ed4d6eaed6e6b469b7b81183a", + "reference": "d650ef9b1fece15ed4d6eaed6e6b469b7b81183a", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.0.2", - "php": "^5.6 || ^7.0", - "phpunit/php-text-template": "^1.2", - "sebastian/exporter": "^1.2 || ^2.0" - }, - "conflict": { - "phpunit/phpunit": "<5.4.0" + "php": "^7.3" }, "require-dev": { - "phpunit/phpunit": "^5.4" - }, - "suggest": { - "ext-soap": "*" + "phpunit/phpunit": "^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2.x-dev" + "dev-master": "1.0-dev" } }, "autoload": { @@ -1060,43 +1307,44 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], - "description": "Mock Object library for PHPUnit", - "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", - "keywords": [ - "mock", - "xunit" + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } ], - "abandoned": true, - "time": "2017-06-30T09:13:00+00:00" + "time": "2020-06-15T13:11:26+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", - "version": "1.0.1", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" + "reference": "c771130f0e8669104a4320b7101a81c2cc2963ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", - "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/c771130f0e8669104a4320b7101a81c2cc2963ef", + "reference": "c771130f0e8669104a4320b7101a81c2cc2963ef", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0" + "php": "^7.3" }, "require-dev": { - "phpunit/phpunit": "^5.7 || ^6.0" + "phpunit/phpunit": "^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -1116,34 +1364,40 @@ ], "description": "Looks up which function or method a line of code belongs to", "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "time": "2017-03-04T06:30:41+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-06-15T12:56:39+00:00" }, { "name": "sebastian/comparator", - "version": "1.2.4", + "version": "4.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be" + "reference": "266d85ef789da8c41f06af4093c43e9798af2784" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", - "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/266d85ef789da8c41f06af4093c43e9798af2784", + "reference": "266d85ef789da8c41f06af4093c43e9798af2784", "shasum": "" }, "require": { - "php": ">=5.3.3", - "sebastian/diff": "~1.2", - "sebastian/exporter": "~1.2 || ~2.0" + "php": "^7.3", + "sebastian/diff": "^4.0", + "sebastian/exporter": "^4.0" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2.x-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -1156,6 +1410,10 @@ "BSD-3-Clause" ], "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, { "name": "Jeff Welch", "email": "whatthejeff@gmail.com" @@ -1167,45 +1425,48 @@ { "name": "Bernhard Schussek", "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" } ], "description": "Provides the functionality to compare PHP values for equality", - "homepage": "http://www.github.com/sebastianbergmann/comparator", + "homepage": "https://github.com/sebastianbergmann/comparator", "keywords": [ "comparator", "compare", "equality" ], - "time": "2017-01-29T09:50:25+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-06-15T15:04:48+00:00" }, { "name": "sebastian/diff", - "version": "1.4.3", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4" + "reference": "3e523c576f29dacecff309f35e4cc5a5c168e78a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7f066a26a962dbe58ddea9f72a4e82874a3975a4", - "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3e523c576f29dacecff309f35e4cc5a5c168e78a", + "reference": "3e523c576f29dacecff309f35e4cc5a5c168e78a", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0" + "php": "^7.3" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + "phpunit/phpunit": "^9.0", + "symfony/process": "^4.2 || ^5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -1218,46 +1479,58 @@ "BSD-3-Clause" ], "authors": [ - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" } ], "description": "Diff implementation", "homepage": "https://github.com/sebastianbergmann/diff", "keywords": [ - "diff" + "diff", + "udiff", + "unidiff", + "unified diff" ], - "time": "2017-05-22T07:24:03+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-05-08T05:01:12+00:00" }, { "name": "sebastian/environment", - "version": "2.0.0", + "version": "5.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac" + "reference": "16eb0fa43e29c33d7f2117ed23072e26fc5ab34e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/5795ffe5dc5b02460c3e34222fee8cbe245d8fac", - "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/16eb0fa43e29c33d7f2117ed23072e26fc5ab34e", + "reference": "16eb0fa43e29c33d7f2117ed23072e26fc5ab34e", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0" + "php": "^7.3" }, "require-dev": { - "phpunit/phpunit": "^5.0" + "phpunit/phpunit": "^9.0" + }, + "suggest": { + "ext-posix": "*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -1282,34 +1555,40 @@ "environment", "hhvm" ], - "time": "2016-11-26T07:53:53+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-06-15T13:00:01+00:00" }, { "name": "sebastian/exporter", - "version": "2.0.0", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4" + "reference": "d12fbca85da932d01d941b59e4b71a0d559db091" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4", - "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/d12fbca85da932d01d941b59e4b71a0d559db091", + "reference": "d12fbca85da932d01d941b59e4b71a0d559db091", "shasum": "" }, "require": { - "php": ">=5.3.3", - "sebastian/recursion-context": "~2.0" + "php": "^7.3", + "sebastian/recursion-context": "^4.0" }, "require-dev": { "ext-mbstring": "*", - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -1322,6 +1601,10 @@ "BSD-3-Clause" ], "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, { "name": "Jeff Welch", "email": "whatthejeff@gmail.com" @@ -1330,17 +1613,13 @@ "name": "Volker Dusch", "email": "github@wallbash.com" }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, { "name": "Adam Harvey", "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" } ], "description": "Provides the functionality to export PHP variables for visualization", @@ -1349,27 +1628,36 @@ "export", "exporter" ], - "time": "2016-11-19T08:54:04+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-06-15T13:12:44+00:00" }, { "name": "sebastian/global-state", - "version": "1.1.1", + "version": "4.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" + "reference": "bdb1e7c79e592b8c82cb1699be3c8743119b8a72" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bdb1e7c79e592b8c82cb1699be3c8743119b8a72", + "reference": "bdb1e7c79e592b8c82cb1699be3c8743119b8a72", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" }, "require-dev": { - "phpunit/phpunit": "~4.2" + "ext-dom": "*", + "phpunit/phpunit": "^9.0" }, "suggest": { "ext-uopz": "*" @@ -1377,7 +1665,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -1400,33 +1688,34 @@ "keywords": [ "global state" ], - "time": "2015-10-12T03:26:01+00:00" + "time": "2020-02-07T06:11:37+00:00" }, { "name": "sebastian/object-enumerator", - "version": "2.0.1", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "1311872ac850040a79c3c058bea3e22d0f09cbb7" + "reference": "15f319d67c49fc55ebcdbffb3377433125588455" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/1311872ac850040a79c3c058bea3e22d0f09cbb7", - "reference": "1311872ac850040a79c3c058bea3e22d0f09cbb7", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/15f319d67c49fc55ebcdbffb3377433125588455", + "reference": "15f319d67c49fc55ebcdbffb3377433125588455", "shasum": "" }, "require": { - "php": ">=5.6", - "sebastian/recursion-context": "~2.0" + "php": "^7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" }, "require-dev": { - "phpunit/phpunit": "~5" + "phpunit/phpunit": "^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -1446,32 +1735,89 @@ ], "description": "Traverses array structures and object graphs to enumerate all referenced objects", "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "time": "2017-02-18T15:18:39+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-06-15T13:15:25+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "14e04b3c25b821cc0702d4837803fe497680b062" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/14e04b3c25b821cc0702d4837803fe497680b062", + "reference": "14e04b3c25b821cc0702d4837803fe497680b062", + "shasum": "" + }, + "require": { + "php": "^7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-06-15T13:08:02+00:00" }, { "name": "sebastian/recursion-context", - "version": "2.0.0", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a" + "reference": "a32789e5f0157c10cf216ce6c5136db12a12b847" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/2c3ba150cbec723aa057506e73a8d33bdb286c9a", - "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/a32789e5f0157c10cf216ce6c5136db12a12b847", + "reference": "a32789e5f0157c10cf216ce6c5136db12a12b847", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^7.3" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -1484,14 +1830,14 @@ "BSD-3-Clause" ], "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, { "name": "Adam Harvey", "email": "aharvey@php.net" @@ -1499,29 +1845,38 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2016-11-19T07:33:16+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-06-15T13:06:44+00:00" }, { "name": "sebastian/resource-operations", - "version": "1.0.0", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52" + "reference": "71421c1745788de4facae1b79af923650bd3ec15" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", - "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/71421c1745788de4facae1b79af923650bd3ec15", + "reference": "71421c1745788de4facae1b79af923650bd3ec15", "shasum": "" }, "require": { - "php": ">=5.6.0" + "php": "^7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -1541,29 +1896,87 @@ ], "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "time": "2015-07-28T20:34:47+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-06-15T13:17:14+00:00" + }, + { + "name": "sebastian/type", + "version": "2.1.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "bad49207c6f854e7a25cef0ea948ac8ebe3ef9d8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/bad49207c6f854e7a25cef0ea948ac8ebe3ef9d8", + "reference": "bad49207c6f854e7a25cef0ea948ac8ebe3ef9d8", + "shasum": "" + }, + "require": { + "php": "^7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-06-01T12:21:09+00:00" }, { "name": "sebastian/version", - "version": "2.0.1", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" + "reference": "0411bde656dce64202b39c2f4473993a9081d39e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/0411bde656dce64202b39c2f4473993a9081d39e", + "reference": "0411bde656dce64202b39c2f4473993a9081d39e", "shasum": "" }, "require": { - "php": ">=5.6" + "php": "^7.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -1584,20 +1997,20 @@ ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", - "time": "2016-10-03T07:35:21+00:00" + "time": "2020-01-21T06:36:37+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.12.0", + "version": "v1.17.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "550ebaac289296ce228a706d0867afc34687e3f4" + "reference": "2edd75b8b35d62fd3eeabba73b26b8f1f60ce13d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/550ebaac289296ce228a706d0867afc34687e3f4", - "reference": "550ebaac289296ce228a706d0867afc34687e3f4", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/2edd75b8b35d62fd3eeabba73b26b8f1f60ce13d", + "reference": "2edd75b8b35d62fd3eeabba73b26b8f1f60ce13d", "shasum": "" }, "require": { @@ -1609,7 +2022,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.12-dev" + "dev-master": "1.17-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -1642,94 +2059,88 @@ "polyfill", "portable" ], - "time": "2019-08-06T08:03:45+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-06-06T08:46:27+00:00" }, { - "name": "symfony/yaml", - "version": "v4.3.4", + "name": "theseer/tokenizer", + "version": "1.1.3", "source": { "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "5a0b7c32dc3ec56fd4abae8a4a71b0cf05013686" + "url": "https://github.com/theseer/tokenizer.git", + "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/5a0b7c32dc3ec56fd4abae8a4a71b0cf05013686", - "reference": "5a0b7c32dc3ec56fd4abae8a4a71b0cf05013686", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/11336f6f84e16a720dae9d8e6ed5019efa85a0f9", + "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9", "shasum": "" }, "require": { - "php": "^7.1.3", - "symfony/polyfill-ctype": "~1.8" - }, - "conflict": { - "symfony/console": "<3.4" - }, - "require-dev": { - "symfony/console": "~3.4|~4.0" - }, - "suggest": { - "symfony/console": "For validating YAML files using the lint command" + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.3-dev" - } - }, "autoload": { - "psr-4": { - "Symfony\\Component\\Yaml\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" + "classmap": [ + "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" } ], - "description": "Symfony Yaml Component", - "homepage": "https://symfony.com", - "time": "2019-08-20T14:27:59+00:00" + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "time": "2019-06-13T22:48:21+00:00" }, { "name": "webmozart/assert", - "version": "1.5.0", + "version": "1.9.0", "source": { "type": "git", "url": "https://github.com/webmozart/assert.git", - "reference": "88e6d84706d09a236046d686bbea96f07b3a34f4" + "reference": "9dc4f203e36f2b486149058bade43c851dd97451" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/88e6d84706d09a236046d686bbea96f07b3a34f4", - "reference": "88e6d84706d09a236046d686bbea96f07b3a34f4", + "url": "https://api.github.com/repos/webmozart/assert/zipball/9dc4f203e36f2b486149058bade43c851dd97451", + "reference": "9dc4f203e36f2b486149058bade43c851dd97451", "shasum": "" }, "require": { "php": "^5.3.3 || ^7.0", "symfony/polyfill-ctype": "^1.8" }, + "conflict": { + "phpstan/phpstan": "<0.12.20", + "vimeo/psalm": "<3.9.1" + }, "require-dev": { "phpunit/phpunit": "^4.8.36 || ^7.5.13" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3-dev" - } - }, "autoload": { "psr-4": { "Webmozart\\Assert\\": "src/" @@ -1751,7 +2162,7 @@ "check", "validate" ], - "time": "2019-08-24T08:43:50+00:00" + "time": "2020-06-16T10:16:42+00:00" } ], "aliases": [], @@ -1764,5 +2175,6 @@ "platform": { "php": ">=5.6.0" }, - "platform-dev": [] + "platform-dev": [], + "plugin-api-version": "1.1.0" } From d8e07f10cf53c636b6136bcbf79d6ec490aa9855 Mon Sep 17 00:00:00 2001 From: Richard Date: Thu, 25 Jun 2020 10:34:31 -0300 Subject: [PATCH 23/24] Actualiza ignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 2734a16..cfd89e9 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ composer.lock nbproject/* .idea /node_modules +.php_cs.cache \ No newline at end of file From ab802dbd060170b0e6753aedeea2fc2a92336740 Mon Sep 17 00:00:00 2001 From: Richard Date: Tue, 30 Jun 2020 19:14:21 -0300 Subject: [PATCH 24/24] Actualiza version de Guzzle/PSR7 y lock --- composer.json | 2 +- composer.lock | 277 ++++++++++++++++++++++++++------------------------ 2 files changed, 144 insertions(+), 135 deletions(-) diff --git a/composer.json b/composer.json index d170c64..e3b8059 100644 --- a/composer.json +++ b/composer.json @@ -7,7 +7,7 @@ "doctrine/cache": "~1.4", "siu-toba/ssl-cert-utils": "1.0", "siu-toba/jwt-util": "~1.0.0", - "guzzlehttp/psr7": "1.x-dev" + "guzzlehttp/psr7": "~1.6" }, "autoload": { "psr-4": { diff --git a/composer.lock b/composer.lock index a3de9d3..1f97a3f 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": "71d39eb70768246f02b42ec8de483404", + "content-hash": "79ad33c074fbaebabfd826eff935397f", "packages": [ { "name": "doctrine/cache", @@ -154,16 +154,16 @@ }, { "name": "guzzlehttp/psr7", - "version": "1.x-dev", + "version": "1.6.1", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "188cc82398f157483976ccf61bd04ee80afcf29c" + "reference": "239400de7a173fe9901b9ac7c06497751f00727a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/188cc82398f157483976ccf61bd04ee80afcf29c", - "reference": "188cc82398f157483976ccf61bd04ee80afcf29c", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/239400de7a173fe9901b9ac7c06497751f00727a", + "reference": "239400de7a173fe9901b9ac7c06497751f00727a", "shasum": "" }, "require": { @@ -179,7 +179,7 @@ "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8" }, "suggest": { - "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" + "zendframework/zend-httphandlerrunner": "Emit PSR-7 responses" }, "type": "library", "extra": { @@ -221,7 +221,7 @@ "uri", "url" ], - "time": "2020-05-17T20:05:25+00:00" + "time": "2019-07-01T23:21:34+00:00" }, { "name": "psr/http-message", @@ -462,20 +462,20 @@ }, { "name": "myclabs/deep-copy", - "version": "1.9.5", + "version": "1.10.1", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef" + "reference": "969b211f9a51aa1f6c01d1d2aef56d3bd91598e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/b2c28789e80a97badd14145fda39b545d83ca3ef", - "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/969b211f9a51aa1f6c01d1d2aef56d3bd91598e5", + "reference": "969b211f9a51aa1f6c01d1d2aef56d3bd91598e5", "shasum": "" }, "require": { - "php": "^7.1" + "php": "^7.1 || ^8.0" }, "replace": { "myclabs/deep-copy": "self.version" @@ -506,7 +506,13 @@ "object", "object graph" ], - "time": "2020-01-17T21:11:47+00:00" + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2020-06-29T13:22:24+00:00" }, { "name": "phar-io/manifest", @@ -612,25 +618,25 @@ }, { "name": "phpdocumentor/reflection-common", - "version": "2.1.0", + "version": "2.2.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "6568f4687e5b41b054365f9ae03fcb1ed5f2069b" + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/6568f4687e5b41b054365f9ae03fcb1ed5f2069b", - "reference": "6568f4687e5b41b054365f9ae03fcb1ed5f2069b", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", "shasum": "" }, "require": { - "php": ">=7.1" + "php": "^7.2 || ^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.x-dev" + "dev-2.x": "2.x-dev" } }, "autoload": { @@ -657,7 +663,7 @@ "reflection", "static analysis" ], - "time": "2020-04-27T09:25:28+00:00" + "time": "2020-06-27T09:03:43+00:00" }, { "name": "phpdocumentor/reflection-docblock", @@ -714,25 +720,24 @@ }, { "name": "phpdocumentor/type-resolver", - "version": "1.2.0", + "version": "1.3.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "30441f2752e493c639526b215ed81d54f369d693" + "reference": "e878a14a65245fbe78f8080eba03b47c3b705651" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/30441f2752e493c639526b215ed81d54f369d693", - "reference": "30441f2752e493c639526b215ed81d54f369d693", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/e878a14a65245fbe78f8080eba03b47c3b705651", + "reference": "e878a14a65245fbe78f8080eba03b47c3b705651", "shasum": "" }, "require": { - "php": "^7.2", + "php": "^7.2 || ^8.0", "phpdocumentor/reflection-common": "^2.0" }, "require-dev": { - "ext-tokenizer": "^7.2", - "mockery/mockery": "~1" + "ext-tokenizer": "*" }, "type": "library", "extra": { @@ -756,7 +761,7 @@ } ], "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "time": "2020-06-19T20:22:09+00:00" + "time": "2020-06-27T10:12:23+00:00" }, { "name": "phpspec/prophecy", @@ -893,20 +898,20 @@ }, { "name": "phpunit/php-file-iterator", - "version": "3.0.2", + "version": "3.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "eba15e538f2bb3fe018b7bbb47d2fe32d404bfd2" + "reference": "8e282e5f5e2db5fb2271b3962ad69875c34a6f41" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/eba15e538f2bb3fe018b7bbb47d2fe32d404bfd2", - "reference": "eba15e538f2bb3fe018b7bbb47d2fe32d404bfd2", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/8e282e5f5e2db5fb2271b3962ad69875c34a6f41", + "reference": "8e282e5f5e2db5fb2271b3962ad69875c34a6f41", "shasum": "" }, "require": { - "php": "^7.3" + "php": "^7.3 || ^8.0" }, "require-dev": { "phpunit/phpunit": "^9.0" @@ -945,24 +950,24 @@ "type": "github" } ], - "time": "2020-06-15T12:54:35+00:00" + "time": "2020-06-26T11:50:37+00:00" }, { "name": "phpunit/php-invoker", - "version": "3.0.1", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "62f696ad0d140e0e513e69eaafdebb674d622b4c" + "reference": "f6eedfed1085dd1f4c599629459a0277d25f9a66" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/62f696ad0d140e0e513e69eaafdebb674d622b4c", - "reference": "62f696ad0d140e0e513e69eaafdebb674d622b4c", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/f6eedfed1085dd1f4c599629459a0277d25f9a66", + "reference": "f6eedfed1085dd1f4c599629459a0277d25f9a66", "shasum": "" }, "require": { - "php": "^7.3" + "php": "^7.3 || ^8.0" }, "require-dev": { "ext-pcntl": "*", @@ -1004,24 +1009,24 @@ "type": "github" } ], - "time": "2020-06-15T13:10:07+00:00" + "time": "2020-06-26T11:53:53+00:00" }, { "name": "phpunit/php-text-template", - "version": "2.0.1", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "0c69cbf965d5317ba33f24a352539f354a25db09" + "reference": "6ff9c8ea4d3212b88fcf74e25e516e2c51c99324" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/0c69cbf965d5317ba33f24a352539f354a25db09", - "reference": "0c69cbf965d5317ba33f24a352539f354a25db09", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/6ff9c8ea4d3212b88fcf74e25e516e2c51c99324", + "reference": "6ff9c8ea4d3212b88fcf74e25e516e2c51c99324", "shasum": "" }, "require": { - "php": "^7.3" + "php": "^7.3 || ^8.0" }, "require-dev": { "phpunit/phpunit": "^9.0" @@ -1059,24 +1064,24 @@ "type": "github" } ], - "time": "2020-06-15T12:52:43+00:00" + "time": "2020-06-26T11:55:37+00:00" }, { "name": "phpunit/php-timer", - "version": "5.0.0", + "version": "5.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "b0d089de001ba60ffa3be36b23e1b8150d072238" + "reference": "cc49734779cbb302bf51a44297dab8c4bbf941e7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/b0d089de001ba60ffa3be36b23e1b8150d072238", - "reference": "b0d089de001ba60ffa3be36b23e1b8150d072238", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/cc49734779cbb302bf51a44297dab8c4bbf941e7", + "reference": "cc49734779cbb302bf51a44297dab8c4bbf941e7", "shasum": "" }, "require": { - "php": "^7.3" + "php": "^7.3 || ^8.0" }, "require-dev": { "phpunit/phpunit": "^9.2" @@ -1114,25 +1119,25 @@ "type": "github" } ], - "time": "2020-06-07T12:05:53+00:00" + "time": "2020-06-26T11:58:13+00:00" }, { "name": "phpunit/php-token-stream", - "version": "4.0.2", + "version": "4.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "e61c593e9734b47ef462340c24fca8d6a57da14e" + "reference": "5672711b6b07b14d5ab694e700c62eeb82fcf374" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/e61c593e9734b47ef462340c24fca8d6a57da14e", - "reference": "e61c593e9734b47ef462340c24fca8d6a57da14e", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/5672711b6b07b14d5ab694e700c62eeb82fcf374", + "reference": "5672711b6b07b14d5ab694e700c62eeb82fcf374", "shasum": "" }, "require": { "ext-tokenizer": "*", - "php": "^7.3" + "php": "^7.3 || ^8.0" }, "require-dev": { "phpunit/phpunit": "^9.0" @@ -1169,7 +1174,7 @@ "type": "github" } ], - "time": "2020-06-16T07:00:44+00:00" + "time": "2020-06-27T06:36:25+00:00" }, { "name": "phpunit/phpunit", @@ -1271,20 +1276,20 @@ }, { "name": "sebastian/code-unit", - "version": "1.0.3", + "version": "1.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "d650ef9b1fece15ed4d6eaed6e6b469b7b81183a" + "reference": "c1e2df332c905079980b119c4db103117e5e5c90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/d650ef9b1fece15ed4d6eaed6e6b469b7b81183a", - "reference": "d650ef9b1fece15ed4d6eaed6e6b469b7b81183a", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/c1e2df332c905079980b119c4db103117e5e5c90", + "reference": "c1e2df332c905079980b119c4db103117e5e5c90", "shasum": "" }, "require": { - "php": "^7.3" + "php": "^7.3 || ^8.0" }, "require-dev": { "phpunit/phpunit": "^9.0" @@ -1319,24 +1324,24 @@ "type": "github" } ], - "time": "2020-06-15T13:11:26+00:00" + "time": "2020-06-26T12:50:45+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", - "version": "2.0.1", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "c771130f0e8669104a4320b7101a81c2cc2963ef" + "reference": "ee51f9bb0c6d8a43337055db3120829fa14da819" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/c771130f0e8669104a4320b7101a81c2cc2963ef", - "reference": "c771130f0e8669104a4320b7101a81c2cc2963ef", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ee51f9bb0c6d8a43337055db3120829fa14da819", + "reference": "ee51f9bb0c6d8a43337055db3120829fa14da819", "shasum": "" }, "require": { - "php": "^7.3" + "php": "^7.3 || ^8.0" }, "require-dev": { "phpunit/phpunit": "^9.0" @@ -1370,24 +1375,24 @@ "type": "github" } ], - "time": "2020-06-15T12:56:39+00:00" + "time": "2020-06-26T12:04:00+00:00" }, { "name": "sebastian/comparator", - "version": "4.0.2", + "version": "4.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "266d85ef789da8c41f06af4093c43e9798af2784" + "reference": "dcc580eadfaa4e7f9d2cf9ae1922134ea962e14f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/266d85ef789da8c41f06af4093c43e9798af2784", - "reference": "266d85ef789da8c41f06af4093c43e9798af2784", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/dcc580eadfaa4e7f9d2cf9ae1922134ea962e14f", + "reference": "dcc580eadfaa4e7f9d2cf9ae1922134ea962e14f", "shasum": "" }, "require": { - "php": "^7.3", + "php": "^7.3 || ^8.0", "sebastian/diff": "^4.0", "sebastian/exporter": "^4.0" }, @@ -1440,24 +1445,24 @@ "type": "github" } ], - "time": "2020-06-15T15:04:48+00:00" + "time": "2020-06-26T12:05:46+00:00" }, { "name": "sebastian/diff", - "version": "4.0.1", + "version": "4.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "3e523c576f29dacecff309f35e4cc5a5c168e78a" + "reference": "1e90b4cf905a7d06c420b1d2e9d11a4dc8a13113" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3e523c576f29dacecff309f35e4cc5a5c168e78a", - "reference": "3e523c576f29dacecff309f35e4cc5a5c168e78a", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/1e90b4cf905a7d06c420b1d2e9d11a4dc8a13113", + "reference": "1e90b4cf905a7d06c420b1d2e9d11a4dc8a13113", "shasum": "" }, "require": { - "php": "^7.3" + "php": "^7.3 || ^8.0" }, "require-dev": { "phpunit/phpunit": "^9.0", @@ -1502,24 +1507,24 @@ "type": "github" } ], - "time": "2020-05-08T05:01:12+00:00" + "time": "2020-06-30T04:46:02+00:00" }, { "name": "sebastian/environment", - "version": "5.1.1", + "version": "5.1.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "16eb0fa43e29c33d7f2117ed23072e26fc5ab34e" + "reference": "0a757cab9d5b7ef49a619f1143e6c9c1bc0fe9d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/16eb0fa43e29c33d7f2117ed23072e26fc5ab34e", - "reference": "16eb0fa43e29c33d7f2117ed23072e26fc5ab34e", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/0a757cab9d5b7ef49a619f1143e6c9c1bc0fe9d2", + "reference": "0a757cab9d5b7ef49a619f1143e6c9c1bc0fe9d2", "shasum": "" }, "require": { - "php": "^7.3" + "php": "^7.3 || ^8.0" }, "require-dev": { "phpunit/phpunit": "^9.0" @@ -1561,29 +1566,29 @@ "type": "github" } ], - "time": "2020-06-15T13:00:01+00:00" + "time": "2020-06-26T12:07:24+00:00" }, { "name": "sebastian/exporter", - "version": "4.0.1", + "version": "4.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "d12fbca85da932d01d941b59e4b71a0d559db091" + "reference": "571d721db4aec847a0e59690b954af33ebf9f023" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/d12fbca85da932d01d941b59e4b71a0d559db091", - "reference": "d12fbca85da932d01d941b59e4b71a0d559db091", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/571d721db4aec847a0e59690b954af33ebf9f023", + "reference": "571d721db4aec847a0e59690b954af33ebf9f023", "shasum": "" }, "require": { - "php": "^7.3", + "php": "^7.3 || ^8.0", "sebastian/recursion-context": "^4.0" }, "require-dev": { "ext-mbstring": "*", - "phpunit/phpunit": "^9.0" + "phpunit/phpunit": "^9.2" }, "type": "library", "extra": { @@ -1634,7 +1639,7 @@ "type": "github" } ], - "time": "2020-06-15T13:12:44+00:00" + "time": "2020-06-26T12:08:55+00:00" }, { "name": "sebastian/global-state", @@ -1692,20 +1697,20 @@ }, { "name": "sebastian/object-enumerator", - "version": "4.0.1", + "version": "4.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "15f319d67c49fc55ebcdbffb3377433125588455" + "reference": "074fed2d0a6d08e1677dd8ce9d32aecb384917b8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/15f319d67c49fc55ebcdbffb3377433125588455", - "reference": "15f319d67c49fc55ebcdbffb3377433125588455", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/074fed2d0a6d08e1677dd8ce9d32aecb384917b8", + "reference": "074fed2d0a6d08e1677dd8ce9d32aecb384917b8", "shasum": "" }, "require": { - "php": "^7.3", + "php": "^7.3 || ^8.0", "sebastian/object-reflector": "^2.0", "sebastian/recursion-context": "^4.0" }, @@ -1741,24 +1746,24 @@ "type": "github" } ], - "time": "2020-06-15T13:15:25+00:00" + "time": "2020-06-26T12:11:32+00:00" }, { "name": "sebastian/object-reflector", - "version": "2.0.1", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "14e04b3c25b821cc0702d4837803fe497680b062" + "reference": "127a46f6b057441b201253526f81d5406d6c7840" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/14e04b3c25b821cc0702d4837803fe497680b062", - "reference": "14e04b3c25b821cc0702d4837803fe497680b062", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/127a46f6b057441b201253526f81d5406d6c7840", + "reference": "127a46f6b057441b201253526f81d5406d6c7840", "shasum": "" }, "require": { - "php": "^7.3" + "php": "^7.3 || ^8.0" }, "require-dev": { "phpunit/phpunit": "^9.0" @@ -1792,24 +1797,24 @@ "type": "github" } ], - "time": "2020-06-15T13:08:02+00:00" + "time": "2020-06-26T12:12:55+00:00" }, { "name": "sebastian/recursion-context", - "version": "4.0.1", + "version": "4.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "a32789e5f0157c10cf216ce6c5136db12a12b847" + "reference": "062231bf61d2b9448c4fa5a7643b5e1829c11d63" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/a32789e5f0157c10cf216ce6c5136db12a12b847", - "reference": "a32789e5f0157c10cf216ce6c5136db12a12b847", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/062231bf61d2b9448c4fa5a7643b5e1829c11d63", + "reference": "062231bf61d2b9448c4fa5a7643b5e1829c11d63", "shasum": "" }, "require": { - "php": "^7.3" + "php": "^7.3 || ^8.0" }, "require-dev": { "phpunit/phpunit": "^9.0" @@ -1851,24 +1856,24 @@ "type": "github" } ], - "time": "2020-06-15T13:06:44+00:00" + "time": "2020-06-26T12:14:17+00:00" }, { "name": "sebastian/resource-operations", - "version": "3.0.1", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "71421c1745788de4facae1b79af923650bd3ec15" + "reference": "0653718a5a629b065e91f774595267f8dc32e213" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/71421c1745788de4facae1b79af923650bd3ec15", - "reference": "71421c1745788de4facae1b79af923650bd3ec15", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0653718a5a629b065e91f774595267f8dc32e213", + "reference": "0653718a5a629b065e91f774595267f8dc32e213", "shasum": "" }, "require": { - "php": "^7.3" + "php": "^7.3 || ^8.0" }, "require-dev": { "phpunit/phpunit": "^9.0" @@ -1902,24 +1907,24 @@ "type": "github" } ], - "time": "2020-06-15T13:17:14+00:00" + "time": "2020-06-26T12:16:22+00:00" }, { "name": "sebastian/type", - "version": "2.1.0", + "version": "2.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "bad49207c6f854e7a25cef0ea948ac8ebe3ef9d8" + "reference": "56b3ba194e0cbaaf3de7ccd353c289d7a84ed022" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/bad49207c6f854e7a25cef0ea948ac8ebe3ef9d8", - "reference": "bad49207c6f854e7a25cef0ea948ac8ebe3ef9d8", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/56b3ba194e0cbaaf3de7ccd353c289d7a84ed022", + "reference": "56b3ba194e0cbaaf3de7ccd353c289d7a84ed022", "shasum": "" }, "require": { - "php": "^7.3" + "php": "^7.3 || ^8.0" }, "require-dev": { "phpunit/phpunit": "^9.2" @@ -1954,24 +1959,24 @@ "type": "github" } ], - "time": "2020-06-01T12:21:09+00:00" + "time": "2020-06-26T12:17:54+00:00" }, { "name": "sebastian/version", - "version": "3.0.0", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "0411bde656dce64202b39c2f4473993a9081d39e" + "reference": "626586115d0ed31cb71483be55beb759b5af5a3c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/0411bde656dce64202b39c2f4473993a9081d39e", - "reference": "0411bde656dce64202b39c2f4473993a9081d39e", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/626586115d0ed31cb71483be55beb759b5af5a3c", + "reference": "626586115d0ed31cb71483be55beb759b5af5a3c", "shasum": "" }, "require": { - "php": "^7.3" + "php": "^7.3 || ^8.0" }, "type": "library", "extra": { @@ -1997,7 +2002,13 @@ ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", - "time": "2020-01-21T06:36:37+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-06-26T12:18:43+00:00" }, { "name": "symfony/polyfill-ctype", @@ -2167,9 +2178,7 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": { - "guzzlehttp/psr7": 20 - }, + "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": {