caseyamcl / phpoaipmh

OAI-PMH client/harvester library for PHP
MIT License
75 stars 35 forks source link

Prevent deprecation errors on PHP8+ #62

Closed tikaszvince closed 1 year ago

tikaszvince commented 1 year ago

I'm using this library with Drupal OAI-PMH Harvester module. When I run a harvest action I got some PHP deprecation errors.

Deprecated function: Return type of Phpoaipmh\RecordIterator::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in include() (line 33 of vendor/caseyamcl/phpoaipmh/src/RecordIterator.php).

Deprecated function: Return type of Phpoaipmh\RecordIterator::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in include() (line 33 of vendor/caseyamcl/phpoaipmh/src/RecordIterator.php).

Deprecated function: Return type of Phpoaipmh\RecordIterator::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in include() (line 33 of vendor/caseyamcl/phpoaipmh/src/RecordIterator.php).

Deprecated function: Return type of Phpoaipmh\RecordIterator::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in include() (line 33 of vendor/caseyamcl/phpoaipmh/src/RecordIterator.php).

Deprecated function: Return type of Phpoaipmh\RecordIterator::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in include() (line 33 of vendor/caseyamcl/phpoaipmh/src/RecordIterator.php).