Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compatibility issues under PHP 8.1, which may cause opcache compilation errors #345

Open
wants to merge 4 commits into
base: 3.1
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/Laravel/LavachartsServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class LavachartsServiceProvider extends ServiceProvider
{
protected $defer = true;

private string $configPath;
private $configFile = 'lavacharts.php';

/**
Expand Down
5 changes: 2 additions & 3 deletions src/Support/JavascriptDate.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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);
}

}