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 deprecations for eventual update to phpunit 10 #3337

Closed
BacLuc opened this issue Mar 10, 2023 · 1 comment
Closed

Remove deprecations for eventual update to phpunit 10 #3337

BacLuc opened this issue Mar 10, 2023 · 1 comment

Comments

@BacLuc
Copy link
Contributor

BacLuc commented Mar 10, 2023

@BacLuc tried the upgrade to phpunit 10.
This failed because the symfony/phpunit-bridge is not yet ready for phpunit 10.
Meanwhile we could remove some usages of deprecated or wrong things for phpunit 10.
(Or symfony/api plafrom)

Time: 10:14.345, Memory: 925.00 MB

There were 6 PHPUnit errors:

1) App\Tests\Integration\Serializer\Normalizer\TranslationConstraintViolationListNormalizerIntegrationTest::testAddsTranslationKeyAndParameters
The data provider specified for App\Tests\Integration\Serializer\Normalizer\TranslationConstraintViolationListNormalizerIntegrationTest::testAddsTranslationKeyAndParameters is invalid
Method App\Tests\Integration\Serializer\Normalizer\TranslationConstraintViolationListNormalizerIntegrationTest::getFormats()() does not exist

/srv/api/tests/Integration/Serializer/Normalizer/TranslationConstraintViolationListNormalizerIntegrationTest.php:45

2) App\Tests\Integration\Serializer\Normalizer\TranslationConstraintViolationListNormalizerIntegrationTest::testAddsTranslations
The data provider specified for App\Tests\Integration\Serializer\Normalizer\TranslationConstraintViolationListNormalizerIntegrationTest::testAddsTranslations is invalid
Method App\Tests\Integration\Serializer\Normalizer\TranslationConstraintViolationListNormalizerIntegrationTest::getFormats()() does not exist

/srv/api/tests/Integration/Serializer/Normalizer/TranslationConstraintViolationListNormalizerIntegrationTest.php:93

3) App\Tests\Integration\Service\CampCouponServiceTest::testReturnsTrueForAllTokensWhenSecretIsEmpty
The data provider specified for App\Tests\Integration\Service\CampCouponServiceTest::testReturnsTrueForAllTokensWhenSecretIsEmpty is invalid
Method App\Tests\Integration\Service\CampCouponServiceTest::someRandomTokens()() does not exist

/srv/api/tests/Integration/Service/CampCouponServiceTest.php:60

4) App\Tests\Integration\Service\CampCouponServiceTest::testReturnsFalseForRandomTokensIfSecretIsNotEmpty
The data provider specified for App\Tests\Integration\Service\CampCouponServiceTest::testReturnsFalseForRandomTokensIfSecretIsNotEmpty is invalid
Method App\Tests\Integration\Service\CampCouponServiceTest::someRandomTokens()() does not exist

/srv/api/tests/Integration/Service/CampCouponServiceTest.php:69

5) App\Tests\Integration\Service\CampCouponServiceTest::testReturnsTrueForValidTokens
The data provider specified for App\Tests\Integration\Service\CampCouponServiceTest::testReturnsTrueForValidTokens is invalid
Method App\Tests\Integration\Service\CampCouponServiceTest::someRandomSecrets()() does not exist

/srv/api/tests/Integration/Service/CampCouponServiceTest.php:78

6) App\Tests\Serializer\Normalizer\Error\TranslationInfoOfConstraintViolationTest::testExtractsTranslationInfoFromConstraintViolation
The data provider specified for App\Tests\Serializer\Normalizer\Error\TranslationInfoOfConstraintViolationTest::testExtractsTranslationInfoFromConstraintViolation is invalid
Method App\Tests\Serializer\Normalizer\Error\TranslationInfoOfConstraintViolationTest::constraintViolations()() does not exist

/srv/api/tests/Serializer/Normalizer/Error/TranslationInfoOfConstraintViolationTest.php:28

--

There were 3 PHPUnit warnings:

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

2) No tests found in class "App\Tests\Integration\Serializer\Normalizer\TranslationConstraintViolationListNormalizerIntegrationTest".

3) No tests found in class "App\Tests\Serializer\Normalizer\Error\TranslationInfoOfConstraintViolationTest".

--

There were 3 errors:

1) App\Tests\State\CampCreateProcessorTest::testCreatesCampCollaborationAndMaterialListAfterCreate
Error: Call to undefined method PHPUnit\Framework\MockObject\Builder\InvocationMocker::withConsecutive()

/srv/api/tests/State/CampCreateProcessorTest.php:70

2) App\Tests\State\CampRemoveProcessorTest::testRemovesRootContentNodes
Error: Call to undefined method PHPUnit\Framework\MockObject\Builder\InvocationMocker::withConsecutive()

/srv/api/tests/State/CampRemoveProcessorTest.php:46

3) App\Tests\State\Util\AbstractPersistProcessorTest::testThrowErrorIfExtractPropertyFails
Error: Call to undefined method App\Tests\State\Util\AbstractPersistProcessorTest::expectWarning()

/srv/api/tests/State/Util/AbstractPersistProcessorTest.php:99

--

There were 23 PHPUnit deprecations:

1) App\Tests\Api\ContentNodes\ColumnLayout\CreateColumnLayoutTest::testCreateRejectsParentsWhichDontSupportChildren
Data Provider method App\Tests\Api\ContentNodes\ColumnLayout\CreateColumnLayoutTest::getContentNodesWhichCannotHaveChildren() is not public

/srv/api/tests/Api/ContentNodes/CreateContentNodeTestCase.php:87

2) App\Tests\Api\ContentNodes\ColumnLayout\UpdateColumnLayoutTest::testPatchRejectsParentsWhichDontSupportChildren
Data Provider method App\Tests\Api\ContentNodes\ColumnLayout\UpdateColumnLayoutTest::getContentNodesWhichCannotHaveChildren() is not public

/srv/api/tests/Api/ContentNodes/UpdateContentNodeTestCase.php:63

3) App\Tests\Api\ContentNodes\MaterialNode\CreateMaterialNodeTest::testCreateRejectsParentsWhichDontSupportChildren
Data Provider method App\Tests\Api\ContentNodes\MaterialNode\CreateMaterialNodeTest::getContentNodesWhichCannotHaveChildren() is not public

/srv/api/tests/Api/ContentNodes/CreateContentNodeTestCase.php:87

4) App\Tests\Api\ContentNodes\MaterialNode\UpdateMaterialNodeTest::testPatchRejectsParentsWhichDontSupportChildren
Data Provider method App\Tests\Api\ContentNodes\MaterialNode\UpdateMaterialNodeTest::getContentNodesWhichCannotHaveChildren() is not public

/srv/api/tests/Api/ContentNodes/UpdateContentNodeTestCase.php:63

5) App\Tests\Api\ContentNodes\MultiSelect\CreateMultiSelectTest::testCreateRejectsParentsWhichDontSupportChildren
Data Provider method App\Tests\Api\ContentNodes\MultiSelect\CreateMultiSelectTest::getContentNodesWhichCannotHaveChildren() is not public

/srv/api/tests/Api/ContentNodes/CreateContentNodeTestCase.php:87

6) App\Tests\Api\ContentNodes\MultiSelect\UpdateMultiSelectTest::testPatchRejectsParentsWhichDontSupportChildren
Data Provider method App\Tests\Api\ContentNodes\MultiSelect\UpdateMultiSelectTest::getContentNodesWhichCannotHaveChildren() is not public

/srv/api/tests/Api/ContentNodes/UpdateContentNodeTestCase.php:63

7) App\Tests\Api\ContentNodes\SingleText\CreateSingleTextTest::testCreateRejectsParentsWhichDontSupportChildren
Data Provider method App\Tests\Api\ContentNodes\SingleText\CreateSingleTextTest::getContentNodesWhichCannotHaveChildren() is not public

/srv/api/tests/Api/ContentNodes/CreateContentNodeTestCase.php:87

8) App\Tests\Api\ContentNodes\SingleText\UpdateSingleTextTest::testPatchRejectsParentsWhichDontSupportChildren
Data Provider method App\Tests\Api\ContentNodes\SingleText\UpdateSingleTextTest::getContentNodesWhichCannotHaveChildren() is not public

/srv/api/tests/Api/ContentNodes/UpdateContentNodeTestCase.php:63

9) App\Tests\Api\ContentNodes\Storyboard\CreateStoryboardTest::testCreateRejectsParentsWhichDontSupportChildren
Data Provider method App\Tests\Api\ContentNodes\Storyboard\CreateStoryboardTest::getContentNodesWhichCannotHaveChildren() is not public

/srv/api/tests/Api/ContentNodes/CreateContentNodeTestCase.php:87

10) App\Tests\Api\ContentNodes\Storyboard\UpdateStoryboardTest::testPatchRejectsParentsWhichDontSupportChildren
Data Provider method App\Tests\Api\ContentNodes\Storyboard\UpdateStoryboardTest::getContentNodesWhichCannotHaveChildren() is not public

/srv/api/tests/Api/ContentNodes/UpdateContentNodeTestCase.php:63

11) App\Tests\Doctrine\Filter\ExpressionDateTimeFilterTest::testApplyFiltersByExpression
Data Provider method App\Tests\Doctrine\Filter\ExpressionDateTimeFilterTest::getOperators() is not static

/srv/api/tests/Doctrine/Filter/ExpressionDateTimeFilterTest.php:161

12) App\Tests\Doctrine\Filter\ExpressionDateTimeFilterTest::testApplyReplacesSelfAlias
Data Provider method App\Tests\Doctrine\Filter\ExpressionDateTimeFilterTest::getOperators() is not static

/srv/api/tests/Doctrine/Filter/ExpressionDateTimeFilterTest.php:187

13) App\Tests\Doctrine\Filter\ExpressionDateTimeFilterTest::testApplyReplacesRelationAlias
Data Provider method App\Tests\Doctrine\Filter\ExpressionDateTimeFilterTest::getOperators() is not static

/srv/api/tests/Doctrine/Filter/ExpressionDateTimeFilterTest.php:213

14) App\Tests\Doctrine\Filter\ExpressionDateTimeFilterTest::testApplyReplacesMultipleRelationAliases
Data Provider method App\Tests\Doctrine\Filter\ExpressionDateTimeFilterTest::getOperators() is not static

/srv/api/tests/Doctrine/Filter/ExpressionDateTimeFilterTest.php:245

15) App\Tests\Doctrine\Filter\ExpressionDateTimeFilterTest::testApplyReplacesMultipleInstancesOfTheSameRelationAlias
Data Provider method App\Tests\Doctrine\Filter\ExpressionDateTimeFilterTest::getOperators() is not static

/srv/api/tests/Doctrine/Filter/ExpressionDateTimeFilterTest.php:276

16) App\Tests\InputFilter\CleanHTMLFilterTest::testInputFiltering
Data Provider method App\Tests\InputFilter\CleanHTMLFilterTest::getExamples() is not static

/srv/api/tests/InputFilter/CleanHTMLFilterTest.php:28

17) App\Tests\InputFilter\CleanTextFilterTest::testInputFiltering
Data Provider method App\Tests\InputFilter\CleanTextFilterTest::getExamples() is not static

/srv/api/tests/InputFilter/CleanTextFilterTest.php:25

18) App\Tests\InputFilter\TrimFilterTest::testInputFiltering
Data Provider method App\Tests\InputFilter\TrimFilterTest::getExamples() is not static

/srv/api/tests/InputFilter/TrimFilterTest.php:16

19) App\Tests\Util\CamelPascalNamingStrategyTest::testClassToTableName
Data Provider method App\Tests\Util\CamelPascalNamingStrategyTest::getTableNameExamples() is not static

/srv/api/tests/Util/CamelPascalNamingStrategyTest.php:19

20) App\Tests\Util\CamelPascalNamingStrategyTest::testPropertyToColumnName
Data Provider method App\Tests\Util\CamelPascalNamingStrategyTest::getPropertyExamples() is not static

/srv/api/tests/Util/CamelPascalNamingStrategyTest.php:42

21) App\Tests\Util\CamelPascalNamingStrategyTest::testEmbeddedFieldToColumnName
Data Provider method App\Tests\Util\CamelPascalNamingStrategyTest::getEmbeddedFieldExamples() is not static

/srv/api/tests/Util/CamelPascalNamingStrategyTest.php:64

22) App\Tests\Util\CamelPascalNamingStrategyTest::testJoinColumnName
Data Provider method App\Tests\Util\CamelPascalNamingStrategyTest::getJoinColumnExamples() is not static

/srv/api/tests/Util/CamelPascalNamingStrategyTest.php:85

23) App\Tests\Util\CamelPascalNamingStrategyTest::testJoinKeyColumnName
Data Provider method App\Tests\Util\CamelPascalNamingStrategyTest::getJoinKeyColumnExamples() is not static

/srv/api/tests/Util/CamelPascalNamingStrategyTest.php:107

ERRORS!
Tests: 1641, Assertions: 3277, Errors: 3, Warnings: 3, Deprecations: 23.

Generating code coverage report in Clover XML format ... done [00:00.501]
Xdebug: [Step Debug] Could not connect to debugging client. Tried: docker-host:9003 (through xdebug.client_host/xdebug.client_port).

Other deprecation notices (1930)

  1346x: Since api-platform/core 3.1: Using phpdocumentor/reflection-docblock is deprecated. Require phpstan/phpdoc-parser instead.
    8x in CreateColumnLayoutTest::testCreateRejectsParentsWhichDontSupportChildren from App\Tests\Api\ContentNodes\ColumnLayout
    8x in UpdateColumnLayoutTest::testPatchRejectsParentsWhichDontSupportChildren from App\Tests\Api\ContentNodes\ColumnLayout
    8x in CreateMaterialNodeTest::testCreateRejectsParentsWhichDontSupportChildren from App\Tests\Api\ContentNodes\MaterialNode
    8x in UpdateMaterialNodeTest::testPatchRejectsParentsWhichDontSupportChildren from App\Tests\Api\ContentNodes\MaterialNode
    8x in CreateMultiSelectTest::testCreateRejectsParentsWhichDontSupportChildren from App\Tests\Api\ContentNodes\MultiSelect
    ...

  581x: Since api-platform/core 3.1: Having mercure.include_type (always include @type in Mercure updates, even delete ones) set to false in the configuration is deprecated. It will be true by default in API Platform 4.0.
    4x in CreateColumnLayoutTest::testCreateRejectsParentsWhichDontSupportChildren from App\Tests\Api\ContentNodes\ColumnLayout
    4x in UpdateColumnLayoutTest::testPatchRejectsParentsWhichDontSupportChildren from App\Tests\Api\ContentNodes\ColumnLayout
    4x in CreateMaterialNodeTest::testCreateRejectsParentsWhichDontSupportChildren from App\Tests\Api\ContentNodes\MaterialNode
    4x in UpdateMaterialNodeTest::testPatchRejectsParentsWhichDontSupportChildren from App\Tests\Api\ContentNodes\MaterialNode
    4x in CreateMultiSelectTest::testCreateRejectsParentsWhichDontSupportChildren from App\Tests\Api\ContentNodes\MultiSelect
    ...

  1x: $typeBuilder argument of TypeConverter implementing "ApiPlatform\GraphQl\Type\TypeBuilderInterface" is deprecated since API Platform 3.1. It has to implement "ApiPlatform\GraphQl\Type\TypeBuilderEnumInterface" instead.
    1x in InvitationGraphQLTest::testFindInvitationWhenNotLoggedIn from App\Tests\Api\Invitations

  1x: $typeBuilder argument of FieldsBuilder implementing "ApiPlatform\GraphQl\Type\TypeBuilderInterface" is deprecated since API Platform 3.1. It has to implement "ApiPlatform\GraphQl\Type\TypeBuilderEnumInterface" instead.
    1x in InvitationGraphQLTest::testFindInvitationWhenNotLoggedIn from App\Tests\Api\Invitations

  1x: $fieldsBuilder argument of SchemaBuilder implementing "ApiPlatform\GraphQl\Type\FieldsBuilderInterface" is deprecated since API Platform 3.1. It has to implement "ApiPlatform\GraphQl\Type\FieldsBuilderEnumInterface" instead.
    1x in InvitationGraphQLTest::testFindInvitationWhenNotLoggedIn from App\Tests\Api\Invitations

Script vendor/bin/phpunit -d memory_limit=-1 handling the test event returned with error code 2
@BacLuc BacLuc moved this to Refinement in Development Kanban Apr 26, 2023
@BacLuc BacLuc moved this from Refinement to Ready for implementation in Development Kanban Apr 26, 2023
BacLuc added a commit to BacLuc/ecamp3 that referenced this issue May 6, 2023
usu pushed a commit that referenced this issue May 12, 2023
@BacLuc
Copy link
Contributor Author

BacLuc commented Dec 2, 2023

Can be closed as soon as #4188 is merged.

@BacLuc BacLuc moved this from Ready for implementation to In Progress in Development Kanban Dec 2, 2023
@BacLuc BacLuc closed this as completed Jan 8, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in Development Kanban Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

1 participant