diff --git a/CHANGELOG.md b/CHANGELOG.md index 72b1cfad..be18225b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +- 3.1.15 + - Fixed PHP 8.1 compatibility issues between `JavascriptDate` and `Carbon`, which may cause opcache compilation failures. + - 3.1.9 - Fixing bug where using `setOptions` instead of the constructor skipped the processing of `png` and `material` attributes. @@ -126,7 +129,7 @@ - Called after all of the google jsapi is loaded and the charts are rendered. - 2.5.7 - - AJAX data loading bugfixes +- AJAX data loading bugfixes - 2.5.6 - Fixes for AJAX chart loading diff --git a/src/Laravel/LavachartsServiceProvider.php b/src/Laravel/LavachartsServiceProvider.php index 8e511dd4..0fcfcc8c 100644 --- a/src/Laravel/LavachartsServiceProvider.php +++ b/src/Laravel/LavachartsServiceProvider.php @@ -25,6 +25,7 @@ class LavachartsServiceProvider extends ServiceProvider { protected $defer = true; + private string $configPath; private $configFile = 'lavacharts.php'; /** diff --git a/src/Support/JavascriptDate.php b/src/Support/JavascriptDate.php index 2f7cce49..6bdb079a 100644 --- a/src/Support/JavascriptDate.php +++ b/src/Support/JavascriptDate.php @@ -9,9 +9,8 @@ class JavascriptDate extends Carbon /** * JavascriptDate constructor. */ - public function __construct() + public function __construct($time = null, $tz = null) { - $tz = null; $hour = null; $args = func_get_args(); @@ -41,7 +40,7 @@ public function __construct() $second = isset($args[5]) ? $args[5] : 0; } - return parent::__construct(sprintf('%s-%s-%s %s:%02s:%02s', $year, $month, $day, $hour, $minute, $second), $tz); + parent::__construct(sprintf('%s-%s-%s %s:%02s:%02s', $year, $month, $day, $hour, $minute, $second), $tz); } }