Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove dependency on the deprecated DbUnit #527

Merged
merged 3 commits into from
Jun 3, 2021
Merged

Remove dependency on the deprecated DbUnit #527

merged 3 commits into from
Jun 3, 2021

Conversation

blackcoder87
Copy link
Member

@blackcoder87 blackcoder87 commented Jun 3, 2021

Description

The goal is to be able to run unit tests under PHP 8 and newer.

  • DbUnit is abandoned and is currently used to do unit tests against the database.
  • phpunit/phpunit-mock-objects as separate part is abandoned and got merged into PHPUnit (version 7?) in early 2018.
  • Currently a really old version of PHPUnit is used. An upgrade to a newer version is hard as Ilch for example supports PHP 7.0 and 7.1. Maybe remove support of PHP 7.0, 7.1 and maybe even 7.2 earlier than ~June 2022 if necessary.

See:
#475
#475 (comment)
https://phpunit.de/supported-versions.html
#482

  • Removed dependency on the deprecated DbUnit by replacing it with an own solution (not as feature rich, but works for current tests).
  • Adjusted existing unit tests to work with the new replacement.
  • Fixed various issues found by the IDE.

There are a few more points that can be targeted, but I leave that for later pull requests. For example:

  • Support loading of other file types if needed.
  • Accept directly an array and therefore avoid having to access files (currently yml).
  • Cache content of files to not read them too often?

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • This change requires a documentation update

@blackcoder87 blackcoder87 marked this pull request as draft June 3, 2021 06:59
@blackcoder87 blackcoder87 marked this pull request as ready for review June 3, 2021 07:16
@c0r1an c0r1an merged commit 862e008 into IlchCMS:master Jun 3, 2021
@c0r1an
Copy link
Member

c0r1an commented Jun 3, 2021

@blackcoder87 vielen Dank, hast du toll gemacht :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants