caseyamcl / phpoaipmh

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

PHP8 Deprecation errors #61

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).

tikaszvince commented 1 year ago

I've created a pull request to fix this #62

caseyamcl commented 1 year ago

merged pull request; will release patch version, along with some other minor changes today. Thanks!