acdh-oeaw / dhcr-main

Digital Humanities Course Registry Application
https://dhcr.clarin-dariah.eu/
Apache License 2.0
3 stars 0 forks source link

Migrate to PHPUnit 10 #72

Closed patrickakk closed 1 year ago

patrickakk commented 1 year ago

Currently hidden the deprecation warnings

patrickakk commented 1 year ago

PHPUnit 10 was released on February 3, 2023

patrickakk commented 1 year ago

Fix all deprecation warnings from PHP and PHPUnit when tests are run.

patrickakk commented 1 year ago

Using PHPUnit 10.2.3 results in the following error:

Fatal error: Cannot override final method PHPUnit\Framework\Assert::assertDirectoryDoesNotExist() in /var/www/dhcr/dhcr-main/vendor/cakephp/cakephp/src/TestSuite/TestCase.php on line 159

This error seems to appear in other applications as well.

This file is part of the framework and current 4.x code, as found here: https://github.com/cakephp/cakephp/blob/4.x/src/TestSuite/TestCase.php

Hopefully this will be solved in the next release (5.0) of CakePHP, which is currently at RC1.

All other deprecation messages and warnings are or will be fixed, exept one:

Refactoring of assertObjectNotHasAttribute can be done after upgrading to PHPUnit 10.1.0+ (Which can be done after migrating to CakePHP 5.0)

@vronk Just for info: Upgrading to PHPUnit 10 can be done as part of migrating to CakePHP 5 and therefore I'll close this issue.