kitodo / kitodo-presentation

Kitodo.Presentation is a feature-rich framework for building a METS- or IIIF-based digital library. It is part of the Kitodo Digital Library Suite.
https://kitodo.org
GNU General Public License v3.0
38 stars 45 forks source link

[BUG] Functional tests fail for PHP 8+ #1331

Closed thomaslow closed 1 week ago

thomaslow commented 2 weeks ago

Description

Functional tests fail for PHP 8.x (tested with 8.1).

Reproduction

Steps to reproduce the behaviour:

  1. Run functional tests with PHP 8.1

Expected Behavior

Functional tests pass for PHP 8.x

Screenshots and Examples

Log of functional tests with PHP 8.1:

There was 1 error:

1) Kitodo\Dlf\Tests\Functional\Common\SolrIndexingTest::canIndexAndSearchDocument
TypeError: array_key_exists(): Argument #2 ($array) must be of type array, null given

/var/www/html/kitodo-presentation/Classes/Common/Solr/SolrSearch.php:863
/var/www/html/kitodo-presentation/Classes/Common/Solr/SolrSearch.php:514
/var/www/html/kitodo-presentation/Classes/Common/Solr/SolrSearchQuery.php:75
/var/www/html/kitodo-presentation/Tests/Functional/Common/SolrIndexingTest.php:92

--

There was 1 failure:

1) Kitodo\Dlf\Tests\Functional\Api\OaiPmhTest::noRecordsUntil1900
Failed asserting that exception of type "Phpoaipmh\Exception\MalformedResponseException" matches expected exception "Phpoaipmh\Exception\OaipmhException". Message was: "Could not decode XML Response: String could not be parsed as XML" at
/var/www/html/kitodo-presentation/vendor/caseyamcl/phpoaipmh/src/Client.php:134
/var/www/html/kitodo-presentation/vendor/caseyamcl/phpoaipmh/src/Client.php:95
/var/www/html/kitodo-presentation/vendor/caseyamcl/phpoaipmh/src/RecordIterator.php:224
/var/www/html/kitodo-presentation/vendor/caseyamcl/phpoaipmh/src/RecordIterator.php:190
/var/www/html/kitodo-presentation/vendor/caseyamcl/phpoaipmh/src/RecordIterator.php:326
/var/www/html/kitodo-presentation/Tests/Functional/Api/OaiPmhTest.php:179
.

Environment