sandreas / m4b-tool

m4b-tool is a command line utility to merge, split and chapterize audiobook files such as mp3, ogg, flac, m4a or m4b
MIT License
1.17k stars 76 forks source link

getting PHP Deprecated error while running m4b-tool version #206

Open dmuiX opened 2 years ago

dmuiX commented 2 years ago
PHP Deprecated:  Return type of Sandreas\Time\TimeUnit::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/local/bin/m4b-tool/vendor/sandreas/php-time/src/Sandreas/Time/TimeUnit.php on line 241

Deprecated: Return type of Sandreas\Time\TimeUnit::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/local/bin/m4b-tool/vendor/sandreas/php-time/src/Sandreas/Time/TimeUnit.php on line 241
m4b-tool latest-178-gaeb8b2b

MacBook 14 M1 MacOS Ventura 13.0 (22A380)

installed php with brew install php

Okay just realized its working correctly and just showing this deprecated stuff. migth not be so important for you

dmuiX commented 2 years ago

Okay I just realized I have commented this already here :D.

But it needs an update:

Best is now

brew install php@8.0
brew link php@8.0

and most important

echo 'export PATH="/opt/homebrew/opt/php@8.0/bin:$PATH"' >> ~/.zshrc
echo 'export PATH="/opt/homebrew/opt/php@8.0/sbin:$PATH"' >> ~/.zshrc
sandreas commented 2 years ago

Ok, maybe I should update everything to be just PHP 8.0 compatible... The end of life date for PHP 7.4 is November 28, 2022.10.08.2022