Getting PHP deprecation warnings due to a change of return type.
Return type of JackSleight\StatamicBardTexstyle\TypeManager::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /vendor/jacksleight/statamic-bard-texstyle/src/TypeManager.php on line 503
Adding #[\ReturnTypeWillChange] or setting a return type on the method will silence this.
public function jsonSerialize(): array
{
return $this->types;
}
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return $this->types;
}
How to Reproduce
Install addon, run any code.
Extra Detail
n/a
Environment
Environment
Application Name: ***
Laravel Version: 9.52.7
PHP Version: 8.2.5
Composer Version: 2.5.7
Environment: local
Debug Mode: ENABLED
URL: ***
Maintenance Mode: OFF
Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED
Drivers
Broadcasting: pusher
Cache: redis
Database: mysql
Logs: stack / single
Mail: log
Queue: redis
Session: file
Statamic
Addons: 6
Antlers: runtime
Stache Watcher: Disabled
Static Caching: Disabled
Version: 4.6.0 PRO
Statamic Addons
jacksleight/statamic-bard-mutator: 2.3.0
jacksleight/statamic-bard-texstyle: 3.1.2
mitydigital/feedamic: 2.2.5
statamic/collaboration: 0.6.0
statamic/eloquent-driver: 2.1.0
transformstudios/review: 4.1.0
Bug Description
Getting PHP deprecation warnings due to a change of return type.
Return type of JackSleight\StatamicBardTexstyle\TypeManager::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /vendor/jacksleight/statamic-bard-texstyle/src/TypeManager.php on line 503
Adding
#[\ReturnTypeWillChange]
or setting a return type on the method will silence this.How to Reproduce
Install addon, run any code.
Extra Detail
n/a
Environment