From f9e32763c253df81864152f2f278de6aa3ad3f30 Mon Sep 17 00:00:00 2001 From: Alexei Raiu Date: Tue, 26 Jul 2022 12:53:52 +0300 Subject: [PATCH 1/8] Fix PHP 8 support in composer constraints. --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index be50a03..d5a5b26 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ "issues": "https://github.com/RusticiSoftware/TinCanPHP/issues" }, "require": { - "php": "~5.5 || ^7.0.3", + "php": "^7.0.3 || ^8", "ext-openssl": "*", "namshi/jose": "^7.2.1", "willdurand/negotiation": "^2.0" From 8406d93f4b94731965c03ccea2613373690435b5 Mon Sep 17 00:00:00 2001 From: Alexei Raiu Date: Tue, 26 Jul 2022 12:59:08 +0300 Subject: [PATCH 2/8] Fix PHP 8 support in composer constraints. --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index d5a5b26..8547918 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ "issues": "https://github.com/RusticiSoftware/TinCanPHP/issues" }, "require": { - "php": "^7.0.3 || ^8", + "php": "~5.5 || ^7 || ^8", "ext-openssl": "*", "namshi/jose": "^7.2.1", "willdurand/negotiation": "^2.0" From d56078fb9a77c495b3a2cb9aab428dd50092beb2 Mon Sep 17 00:00:00 2001 From: Alexei Raiu Date: Tue, 26 Jul 2022 13:52:50 +0300 Subject: [PATCH 3/8] Change composer name. --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 8547918..37607e8 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "rusticisoftware/tincan", + "name": "opigno/tincan", "type": "library", "description": "Experience API (Tin Can API) Library", "homepage": "http://rusticisoftware.github.io/TinCanPHP/", From 2e9a376b66a61f40966e0cb3044270e1e264b0e6 Mon Sep 17 00:00:00 2001 From: Yurii Boichenko Date: Tue, 8 Nov 2022 17:34:06 +0100 Subject: [PATCH 4/8] Add replace for forked packedge --- composer.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/composer.json b/composer.json index 37607e8..2cd556e 100644 --- a/composer.json +++ b/composer.json @@ -11,6 +11,9 @@ "e-learning", "scorm" ], + "replace": { + "rusticisoftware/tincan": "*" + }, "license": "Apache-2.0", "authors": [ { From 79aaa35bd258da322f2e434731c98bc0caa01e09 Mon Sep 17 00:00:00 2001 From: orybak Date: Fri, 9 Dec 2022 13:55:50 +0200 Subject: [PATCH 5/8] Fix datetime creation error --- src/Util.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Util.php b/src/Util.php index bc4df43..1f647f7 100644 --- a/src/Util.php +++ b/src/Util.php @@ -72,7 +72,7 @@ public static function getTimestamp() { $microseconds = sprintf('%06d', ($time - floor($time)) * 1000000); $millseconds = round($microseconds, -3)/1000; $millsecondsStr = str_pad($millseconds, 3, '0', STR_PAD_LEFT); - $date = (new \DateTime(null, new \DateTimeZone("UTC")))->format('c'); + $date = (new \DateTime('now', new \DateTimeZone("UTC")))->format('c'); $position = strrpos($date, '+'); $date = substr($date,0,$position).'.'.$millsecondsStr.substr($date,$position); From db9028d4506f5e833924f4aa245a23c05c8ce583 Mon Sep 17 00:00:00 2001 From: Matt Monte Date: Wed, 8 May 2024 17:41:09 -0400 Subject: [PATCH 6/8] Remove usage of deprecated "$errcontext" parameter with "set_error_handler" method --- src/RemoteLRS.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/RemoteLRS.php b/src/RemoteLRS.php index 5a354c3..dc7abd6 100644 --- a/src/RemoteLRS.php +++ b/src/RemoteLRS.php @@ -137,7 +137,7 @@ protected function sendRequest($method, $resource) { // normal handling // set_error_handler( - function ($errno, $errstr, $errfile, $errline, array $errcontext) { + function ($errno, $errstr, $errfile, $errline) { // "!== false" is intentional. strpos() can return 0, which is falsey, but returning // 0 matches our "true" condition. Using strict equality to avoid that confusion. if ($errno == E_NOTICE && strpos($errstr, 'Array to string conversion') !== false) { From a2666d2a09edf471e51af089e8a11fff9fa4f41b Mon Sep 17 00:00:00 2001 From: Yurii Boichenko Date: Tue, 18 Jun 2024 13:15:29 +0200 Subject: [PATCH 7/8] http_build_query(): Passing null to parameter of type string is deprecated --- src/RemoteLRS.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/RemoteLRS.php b/src/RemoteLRS.php index dc7abd6..415aa7e 100644 --- a/src/RemoteLRS.php +++ b/src/RemoteLRS.php @@ -118,7 +118,7 @@ protected function sendRequest($method, $resource) { } } if (isset($options['params']) && count($options['params']) > 0) { - $url .= '?' . http_build_query($options['params'], null, '&', PHP_QUERY_RFC3986); + $url .= '?' . http_build_query($options['params'], '', '&', PHP_QUERY_RFC3986); } if (($method === 'PUT' || $method === 'POST') && isset($options['content'])) { From 515df4114b8b65ed38035f78fa88101093132401 Mon Sep 17 00:00:00 2001 From: urikor <6727047+urikor@users.noreply.github.com> Date: Fri, 1 Nov 2024 21:01:10 +0200 Subject: [PATCH 8/8] Fix deprecated use of "parent" in callables for php8.3. Fix deprecated use of "parent" in callables for php8.3. --- src/Statement.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Statement.php b/src/Statement.php index c7673e3..e675b79 100644 --- a/src/Statement.php +++ b/src/Statement.php @@ -41,7 +41,7 @@ class Statement extends StatementBase protected $attachments; public function __construct() { - call_user_func_array('parent::__construct', func_get_args()); + parent::__construct(...func_get_args()); if (func_num_args() == 1) { $arg = func_get_arg(0);