diff --git a/composer.json b/composer.json index be50a03..2cd556e 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/", @@ -11,6 +11,9 @@ "e-learning", "scorm" ], + "replace": { + "rusticisoftware/tincan": "*" + }, "license": "Apache-2.0", "authors": [ { @@ -24,7 +27,7 @@ "issues": "https://github.com/RusticiSoftware/TinCanPHP/issues" }, "require": { - "php": "~5.5 || ^7.0.3", + "php": "~5.5 || ^7 || ^8", "ext-openssl": "*", "namshi/jose": "^7.2.1", "willdurand/negotiation": "^2.0" diff --git a/src/RemoteLRS.php b/src/RemoteLRS.php index 5a354c3..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'])) { @@ -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) { 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); 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);