-1

Previously I am using phpunit/dbunit version 3.0.3 for PHP7 version, Now I have upgraded PHP to 8.1 version, and I am unable to upgrade the dbunit to the PHP8.1 supporting version. I am getting the below error and my composer.json file is below. Please Can anyone tell me, does dbunit supports php8.1 version or How can I install the dbunit version that is supporting php8.1

"require-dev": { "phpunit/phpunit": "9.5.0", "phpunit/dbunit": "3.0.3"

},

enter image description here

Chitrasen
  • 49
  • 1
  • 6
  • check you `php -v` and make sure that for v4 is php ^7.1 and v3 is ^7.0 (so php 8 will be fine on both versions of dbunit). – francisco Jan 02 '23 at 12:53
  • Hi @francisco, I didn't understand your above mentioned point, I am using PHP8.1, which dbunit version would be fine for this? – Chitrasen Jan 03 '23 at 05:48
  • for dbunit v4 is php ^7.1 and dbunit v3 is ^7.0, if you do have php 8 so is fine on both versions of dbunit .. – francisco Jan 03 '23 at 17:34

1 Answers1

0

The package is abandoned and no longer maintained. Still the v3.0.3 requires the following:

php: ^7.0
ext-pdo: *
ext-simplexml: *
phpunit/phpunit: ^6.0
symfony/yaml: ^3.0 || ^4.0

Reference from packagist.

francisco
  • 1,387
  • 2
  • 12
  • 23
  • Thanks for the info, May I know what should I do now, Should I have to use another DB testing library for php8.1 version? – Chitrasen Jan 02 '23 at 17:00
  • I would recommend use something that is maintained and free of bugs/issues. You can search `dbunit alternatives` on google and find lots off solutions for example [here](https://php.libhunt.com/). – francisco Jan 02 '23 at 17:05