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

PHPUnit 11 support #216

Closed
llaville opened this issue Oct 31, 2024 · 1 comment
Closed

PHPUnit 11 support #216

llaville opened this issue Oct 31, 2024 · 1 comment
Assignees

Comments

@llaville
Copy link
Collaborator

Summary

Add support to PHPUnit 11

Description

Now PHPLint 9.5 (latest version officially supported) has PHP minimum requirement set to 8.2, we will migrate tests from PHPUnit 10 to 11.

@llaville llaville self-assigned this Oct 31, 2024
@llaville
Copy link
Collaborator Author

With PHPUnit 11 installed, when we run tests on a PHP 8.4 platform :

vendor/bin/phpunit --display-phpunit-deprecations

We got these results :

PHPUnit 11.4.3 by Sebastian Bergmann and contributors.

Runtime:       PHP 8.4.0RC3
Configuration: /shared/backups/github/phplint/phpunit.xml

.................................                                 33 / 33 (100%)

Time: 00:00.172, Memory: 12.00 MB

There were 20 PHPUnit test runner deprecations:

1) Metadata found in doc-comment for method Overtrue\PHPLint\Tests\Cache\CacheTest::testHasItem(). Metadata in doc-comments is deprecated and will no longer be supported in PHPUnit 12. Update your test code to use attributes instead.

2) Metadata found in doc-comment for method Overtrue\PHPLint\Tests\Cache\CacheTest::testGetItem(). Metadata in doc-comments is deprecated and will no longer be supported in PHPUnit 12. Update your test code to use attributes instead.

3) Metadata found in doc-comment for method Overtrue\PHPLint\Tests\Cache\CacheTest::testSaveItem(). Metadata in doc-comments is deprecated and will no longer be supported in PHPUnit 12. Update your test code to use attributes instead.

4) Metadata found in doc-comment for method Overtrue\PHPLint\Tests\Cache\CacheTest::testClearPool(). Metadata in doc-comments is deprecated and will no longer be supported in PHPUnit 12. Update your test code to use attributes instead.

5) Metadata found in doc-comment for method Overtrue\PHPLint\Tests\Cache\CacheTest::testCacheHit(). Metadata in doc-comments is deprecated and will no longer be supported in PHPUnit 12. Update your test code to use attributes instead.

6) Metadata found in doc-comment for method Overtrue\PHPLint\Tests\Cache\CacheTest::testCacheMiss(). Metadata in doc-comments is deprecated and will no longer be supported in PHPUnit 12. Update your test code to use attributes instead.

7) Metadata found in doc-comment for method Overtrue\PHPLint\Tests\Cache\CacheTest::testCacheMissWithFileUnknown(). Metadata in doc-comments is deprecated and will no longer be supported in PHPUnit 12. Update your test code to use attributes instead.

8) Metadata found in doc-comment for method Overtrue\PHPLint\Tests\Cache\CacheTest::testCacheMissWithWrongFileFingerprint(). Metadata in doc-comments is deprecated and will no longer be supported in PHPUnit 12. Update your test code to use attributes instead.

9) Metadata found in doc-comment for method Overtrue\PHPLint\Tests\Cache\CacheTest::testGetCalls(). Metadata in doc-comments is deprecated and will no longer be supported in PHPUnit 12. Update your test code to use attributes instead.

10) Metadata found in doc-comment for method Overtrue\PHPLint\Tests\Cache\CacheTest::testFilenameHasReservedCharacters(). Metadata in doc-comments is deprecated and will no longer be supported in PHPUnit 12. Update your test code to use attributes instead.

11) Metadata found in doc-comment for method Overtrue\PHPLint\Tests\Configuration\ConsoleConfigTest::testConfigFileNotReadable(). Metadata in doc-comments is deprecated and will no longer be supported in PHPUnit 12. Update your test code to use attributes instead.

12) Metadata found in doc-comment for method Overtrue\PHPLint\Tests\Configuration\ConsoleConfigTest::testCommandConfig(). Metadata in doc-comments is deprecated and will no longer be supported in PHPUnit 12. Update your test code to use attributes instead.

13) Metadata found in doc-comment for method Overtrue\PHPLint\Tests\Configuration\YamlConfigTest::testInvalidYamlFile(). Metadata in doc-comments is deprecated and will no longer be supported in PHPUnit 12. Update your test code to use attributes instead.

14) Metadata found in doc-comment for method Overtrue\PHPLint\Tests\Configuration\YamlConfigTest::testYamlConfig(). Metadata in doc-comments is deprecated and will no longer be supported in PHPUnit 12. Update your test code to use attributes instead.

15) Metadata found in doc-comment for method Overtrue\PHPLint\Tests\EndToEnd\LintCommandTest::testLintDirectoryWithoutConfigurationAndCache(). Metadata in doc-comments is deprecated and will no longer be supported in PHPUnit 12. Update your test code to use attributes instead.

16) Metadata found in doc-comment for method Overtrue\PHPLint\Tests\EndToEnd\LintCommandTest::testLintSyntaxErrorFileWithoutConfigurationAndCache(). Metadata in doc-comments is deprecated and will no longer be supported in PHPUnit 12. Update your test code to use attributes instead.

17) Metadata found in doc-comment for method Overtrue\PHPLint\Tests\Finder\FinderTest::testAllPhpFilesFoundShouldExists(). Metadata in doc-comments is deprecated and will no longer be supported in PHPUnit 12. Update your test code to use attributes instead.

18) Metadata found in doc-comment for method Overtrue\PHPLint\Tests\Finder\FinderTest::testAllPathShouldExistsAndReadable(). Metadata in doc-comments is deprecated and will no longer be supported in PHPUnit 12. Update your test code to use attributes instead.

19) Metadata found in doc-comment for method Overtrue\PHPLint\Tests\Finder\FinderTest::testSearchPhpFilesWithCondition(). Metadata in doc-comments is deprecated and will no longer be supported in PHPUnit 12. Update your test code to use attributes instead.

20) Metadata found in doc-comment for method Overtrue\PHPLint\Tests\Output\OutputTest::testJunitOutput(). Metadata in doc-comments is deprecated and will no longer be supported in PHPUnit 12. Update your test code to use attributes instead.

OK, but there were issues!
Tests: 33, Assertions: 50, PHPUnit Deprecations: 20.

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

No branches or pull requests

1 participant