Skip to content

A lot fo depreciated warrning on PHP 8  #49

Description

@filmus22

Hello Christian

I am testing your excellent pdftotext php script.
It works great and I managed to process some pdf file that no other script managed to process.
However, I do get a lot of warnings like these:

Deprecated function: Return type of PdfTexterCharacterMap::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 require_once() (line 7134 of modules/contrib/david/includes/PdfToText.inc).

Deprecated function: Return type of PdfTexterCharacterMap::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 require_once() (line 7134 of modules/contrib/david/includes/PdfToText.inc).

Deprecated function: Return type of PdfTexterUnicodeMap::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 require_once() (line 7191 of modules/contrib/david/includes/PdfToText.inc).

Deprecated function: Return type of PdfTexterUnicodeMap::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 require_once() (line 7191 of modules/contrib/david/includes/PdfToText.inc).

Deprecated function: Return type of PdfTexterUnicodeMap::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in require_once() (line 7191 of modules/contrib/david/includes/PdfToText.inc).

Deprecated function: Return type of PdfTexterEncodingMap::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 require_once() (line 7487 of modules/contrib/david/includes/PdfToText.inc).

Deprecated function: Return type of PdfTexterEncodingMap::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 require_once() (line 7487 of modules/contrib/david/includes/PdfToText.inc).

Deprecated function: Return type of PdfTexterEncodingMap::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in require_once() (line 7487 of modules/contrib/david/includes/PdfToText.inc).

And many similar others...

I use php 8.2.4 under XAMPP
Will be grateful for any help

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions