Skip to content

Conversation

@jackwh
Copy link

@jackwh jackwh commented May 17, 2022

The JavascriptDate class included in this package has an incompatible constructor with its parent class, Carbon.

This won't cause issues prior to PHP 8.1 — and is unlikely to even affect those using 8.1 anyway, as the JavascriptDate class doesn't actually seem to be called anywhere in the package :)

However... If you try to pre-compile your application scripts with the PHP opcache, an E_COMPILE_ERROR is thrown, which can randomly cause your entire autoloader to break 🧨 (as I found out the hard way...). This is due to a PHP bug, which has only recently been fixed (php/php-src#8164)

A new release tagged as 3.1.15 would be great. Thank you!

@MisatoTremor
Copy link

Would you consider to also add this in the PR as it is also PHP 8 related?

Return type of Khill\Lavacharts\Support\Contracts\Jsonable::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

I think for BC of this package the attribute would be the more senisble way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants