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

chore: fix depricates from PHPUnit10 #312

Open
llaville opened this issue Jun 2, 2023 · 2 comments
Open

chore: fix depricates from PHPUnit10 #312

llaville opened this issue Jun 2, 2023 · 2 comments
Labels

Comments

@llaville
Copy link

llaville commented Jun 2, 2023

Hello,

Recent release 2.2.0 is ok for its fixed, but PHPUnit (version 10.1) raised deprecations on data providers

> @php -d zend.assertions=1 -d assert.exception=1 -d display_errors=On -d error_reporting=-1 -d log_errors_max_len=0 -d memory_limit=-1 -d xdebug.mode=coverage -d pcov.enabled=1 -d pcov.directory=src tools/phpunit/vendor/phpunit/phpunit/phpunit
PHPUnit 10.1.3 by Sebastian Bergmann and contributors.

Runtime:       PHP 8.1.14 with Xdebug 3.2.0
Configuration: /shared/backups/github/cyclonedx-php-library/phpunit.dist.xml

D............................................................   61 / 3495 (  1%)
.............................................................  122 / 3495 (  3%)
.............................................................  183 / 3495 (  5%)
.............................................................  244 / 3495 (  6%)
.............................................................  305 / 3495 (  8%)
.............................................................  366 / 3495 ( 10%)
.............................................................  427 / 3495 ( 12%)
.............................................................  488 / 3495 ( 13%)
.............................................................  549 / 3495 ( 15%)
.............................................................  610 / 3495 ( 17%)
.............................................................  671 / 3495 ( 19%)
.............................................................  732 / 3495 ( 20%)
.............................................................  793 / 3495 ( 22%)
.............................................................  854 / 3495 ( 24%)
.............................................................  915 / 3495 ( 26%)
.............................................................  976 / 3495 ( 27%)
............................................................. 1037 / 3495 ( 29%)
............................................................. 1098 / 3495 ( 31%)
............................................................. 1159 / 3495 ( 33%)
............................................................. 1220 / 3495 ( 34%)
............................................................. 1281 / 3495 ( 36%)
............................................................. 1342 / 3495 ( 38%)
............................................................. 1403 / 3495 ( 40%)
............................................................. 1464 / 3495 ( 41%)
............................................................. 1525 / 3495 ( 43%)
............................................................. 1586 / 3495 ( 45%)
............................................................. 1647 / 3495 ( 47%)
............................................................. 1708 / 3495 ( 48%)
............................................................. 1769 / 3495 ( 50%)
............................................................. 1830 / 3495 ( 52%)
............................................................. 1891 / 3495 ( 54%)
............................................................. 1952 / 3495 ( 55%)
............................................................. 2013 / 3495 ( 57%)
............................................................. 2074 / 3495 ( 59%)
............................................................. 2135 / 3495 ( 61%)
............................................................. 2196 / 3495 ( 62%)
............................................................. 2257 / 3495 ( 64%)
............................................................. 2318 / 3495 ( 66%)
............................................................. 2379 / 3495 ( 68%)
............................................................. 2440 / 3495 ( 69%)
............................................................. 2501 / 3495 ( 71%)
............................................................. 2562 / 3495 ( 73%)
............................................................. 2623 / 3495 ( 75%)
............................................................. 2684 / 3495 ( 76%)
............................................................. 2745 / 3495 ( 78%)
............................................................. 2806 / 3495 ( 80%)
............................................................. 2867 / 3495 ( 82%)
............................................................. 2928 / 3495 ( 83%)
............................................................. 2989 / 3495 ( 85%)
............................................................. 3050 / 3495 ( 87%)
............................................................. 3111 / 3495 ( 89%)
............................................................. 3172 / 3495 ( 90%)
............................................................. 3233 / 3495 ( 92%)
............................................................. 3294 / 3495 ( 94%)
............................................................. 3355 / 3495 ( 95%)
............................................................. 3416 / 3495 ( 97%)
............................................................. 3477 / 3495 ( 99%)
.................S                                            3495 / 3495 (100%)

Time: 00:18.887, Memory: 62.00 MB

There was 1 PHPUnit test runner deprecation:

1) Your XML configuration validates against a deprecated schema. Migrate your XML configuration using "--migrate-configuration"!

--

5 tests triggered 5 PHPUnit deprecations:

1) CycloneDX\Tests\Core\Collections\ComponentRepositoryTest::testFindItem
Data Provider method CycloneDX\Tests\Core\Collections\ComponentRepositoryTest::dpFindComponents() is not static

/shared/backups/github/cyclonedx-php-library/tests/Core/Collections/ComponentRepositoryTest.php:78

2) CycloneDX\Tests\Core\Serialization\BaseSerializerTest::testSerializeUsesUniqueBomRefsAndResetThemAfterwards
Data Provider method CycloneDX\Tests\Core\Serialization\BaseSerializerTest::dpBomWithRefs() is not static

/shared/backups/github/cyclonedx-php-library/tests/Core/Serialization/BaseSerializerTest.php:103

3) CycloneDX\Tests\Core\Serialization\BaseSerializerTest::testSerializeUsesUniqueBomRefsAndResetThemOnThrow
Data Provider method CycloneDX\Tests\Core\Serialization\BaseSerializerTest::dpBomWithRefs() is not static

/shared/backups/github/cyclonedx-php-library/tests/Core/Serialization/BaseSerializerTest.php:152

4) CycloneDX\Tests\Core\Serialization\DOM\Normalizers\DependenciesNormalizerTest::testNormalize
Data Provider method CycloneDX\Tests\Core\Serialization\DOM\Normalizers\DependenciesNormalizerTest::dpNormalize() is not static

/shared/backups/github/cyclonedx-php-library/tests/Core/Serialization/DOM/Normalizers/DependenciesNormalizerTest.php:76

5) CycloneDX\Tests\Core\Serialization\JSON\Normalizers\DependenciesNormalizerTest::testNormalize
Data Provider method CycloneDX\Tests\Core\Serialization\JSON\Normalizers\DependenciesNormalizerTest::dpNormalize() is not static

/shared/backups/github/cyclonedx-php-library/tests/Core/Serialization/JSON/Normalizers/DependenciesNormalizerTest.php:67

--

There was 1 skipped test:

1) CycloneDX\Tests\Core\Validation\Validators\XmlValidatorTest::testValidateDomThrowsOnSchemaFileUnknown
skipped, unless there is a version that does not support XML.

OK, but there are issues!
Tests: 3495, Assertions: 5361, Deprecations: 6, Skipped: 1.

Generating code coverage report in Clover XML format ... done [00:00.043]

Generating code coverage report in HTML format ... done [00:00.235]
@jkowalleck
Copy link
Member

jkowalleck commented Jun 2, 2023

known issue. already fixes alot of depricates when i migrated from phpunit9 to phpunit10.
I will not fix those last deprications unless phpunit provides a properly working migration path.

if you are interested to fix them, pull requests are welcome.

@jkowalleck jkowalleck changed the title Add support to PHPUnit 10.1 chore: fix depricates from PHPUnit10 Jun 3, 2023
@jkowalleck
Copy link
Member

migrated the config from phpunit10.0 to phpunit10.1 via #314
fixed the following:

  1. Your XML configuration validates against a deprecated schema. Migrate your XML configuration using "--migrate-configuration"!

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

No branches or pull requests

2 participants