-
Notifications
You must be signed in to change notification settings - Fork 536
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
Fixes failing tests; reorganized test files (PHPUnit 10.x related) #583
Conversation
Since version 10, PHPUnit complains about: 1) Your XML configuration validates against a deprecated schema. Migrate your XML configuration using "--migrate-configuration"! 2) Class AltAutoloadTest cannot be found in D:\a\pdfparser\pdfparser\tests\AltAutoloadTest.php 3) Class Tests\Smalot\PdfParser\Performance\Test\AbstractPerformanceTest cannot be found in D:\a\pdfparser\pdfparser\tests\Performance\Test\AbstractPerformanceTest.php 4) Class Tests\Smalot\PdfParser\Performance\Test\DocumentDictionaryCacheTest cannot be found in D:\a\pdfparser\pdfparser\tests\Performance\Test\DocumentDictionaryCacheTest.php The first one is easy to solve. But the other 3 are confusing, because PHPUnit 9 did not complain at all. Reason for these warnings is that since PHPUnit v10, it doesn't like abstract Test classes or files (containing Test in the name), which contain no class at all. Source: sebastianbergmann/phpunit#4979 To mitigate these warnings and to make maintenance easier in the future, I reorganized our test files and put them in different folders. PHPUnit tests are separated from our other tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should lock the PHPUnit version, see https://thephp.cc/articles/the-death-star-version-constraint
I would advise against that, because it only delays required changes. I prefer seeing problems as soon as possible. Maybe there is some compromise here? |
Well, it's a way to do it. |
Good points, I implemented a lock. What do you think about the rest? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The rest looks ok 👍🏼
Co-authored-by: Jérémy Benoist <j0k3r@users.noreply.github.com>
Since version 10, PHPUnit complains about:
Your XML configuration validates against a deprecated schema. Migrate your XML configuration using "--migrate-configuration"!
Class AltAutoloadTest cannot be found in
D:\a\pdfparser\pdfparser\tests\AltAutoloadTest.php
Class Tests\Smalot\PdfParser\Performance\Test\AbstractPerformanceTest cannot be found in
D:\a\pdfparser\pdfparser\tests\Performance\Test\AbstractPerformanceTest.php
Class
Tests\Smalot\PdfParser\Performance\Test\DocumentDictionaryCacheTest cannot be found in
D:\a\pdfparser\pdfparser\tests\Performance\Test\DocumentDictionaryCacheTest.php
The first one is easy to solve.
But the other 3 are confusing, because PHPUnit 9 did not complain at all. PHPUnit v10 doesn't like abstract Test classes or files (containing Test in the name), which contain no class at all. Source: sebastianbergmann/phpunit#4979
To mitigate these warnings and to make maintenance easier in the future, I reorganized our test files and put them in different folders. PHPUnit tests are separated from our other tests.
#581 and #582 will be processed after this one is merged.