jreklund / php4dvd

php4dvd is an open source php/mysql powered movie database. Catalog your video collection with ease. Automatic update of information and images.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Deprecation warnings on PHP 8.1

enikao opened this issue · comments

When trying to add a new movie from IMDB, I get the following deprecation warnings:

PHP message: PHP Deprecated:  Return type of RedBeanPHP\\OODBBean::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in php4dvd/lib/redbean/rb.php on line 2062

PHP message: PHP Deprecated:  Return type of RedBeanPHP\\OODBBean::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in php4dvd/lib/redbean/rb.php on line 3072

PHP message: PHP Deprecated:  Return type of & RedBeanPHP\\OODBBean::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in php4dvd/lib/redbean/rb.php on line 3108

PHP message: PHP Deprecated:  Return type of RedBeanPHP\\OODBBean::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in php4dvd/lib/redbean/rb.php on line 3055

PHP message: PHP Deprecated:  Return type of RedBeanPHP\\OODBBean::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in php4dvd/lib/redbean/rb.php on line 3090

PHP message: PHP Deprecated:  Return type of RedBeanPHP\\OODBBean::count() should either be compatible with Countable::count(): int, or the #[\\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in php4dvd/lib/redbean/rb.php on line 3248

PHP message: PHP Deprecated:  Return type of RedBeanPHP\\OODBBean::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in php4dvd/lib/redbean/rb.php on line 3855

PHP message: PHP Deprecated:  trim(): Passing null to parameter #1 ($string) of type string is deprecated in php4dvd/lib/redbean/rb.php on line 6173

PHP message: PHP Deprecated:  PDOStatement::fetchAll(): Passing null to parameter #1 ($mode) of type int is deprecated in php4dvd/lib/redbean/rb.php on line 822

PHP message: PHP Deprecated:  Return type of Bulletproof\\Image::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in php4dvd/lib/bulletproof/bulletproof.php on line 121

PHP message: PHP Deprecated:  Return type of Bulletproof\\Image::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in php4dvd/lib/bulletproof/bulletproof.php on line 137

PHP message: PHP Deprecated:  Return type of Bulletproof\\Image::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in php4dvd/lib/bulletproof/bulletproof.php on line 114

PHP message: PHP Deprecated:  Return type of Bulletproof\\Image::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in php4dvd/lib/bulletproof/bulletproof.php on line 128

PHP message: PHP Deprecated:  PDOStatement::fetchAll(): Passing null to parameter #1 ($mode) of type int is deprecated in php4dvd/lib/redbean/rb.php on line 822

I have made a new branch with the name php81 with updated libraries and PHP 8.0 support. Currently it doesn't look like we are able to fully support PHP 8.1 (without deprecation messages) due to Smarty not fully supporting it.

I will need to do some further testing before merging and doing an official release.

Thanks for looking into it.

You will get fewer errors when using v3.11.1 but there are still one getting logged from Smarty.

PHP 8.1 should now be fully supported in v3.11.2 with PR #84. Apparently Smarty's website don't list the latest version, but Github does. Have updated to that version and patched all template files.