TASK: Update to PHPUnit 11#3563
Open
kdambekalns wants to merge 38 commits into
Open
Conversation
…using PHPUnitSetList::PHPUNIT_90
…using PHPUnitSetList::PHPUNIT_100
Will go away in PHPUnit 12
Also changes non-assertion methods called statically to be called non-statically (e.g. `self::any()` becomes `$this->any()`).
From `PHPUnitSetList::PHPUNIT_100`
From `PHPUnitSetList::PHPUNIT_CODE_QUALITY`, applied rules: * AddInstanceofAssertForNullableInstanceRector * AssertCompareOnCountableWithMethodToAssertCountRector * AssertComparisonToSpecificMethodRector * AssertEmptyNullableObjectToAssertInstanceofRector * AssertEqualsOrAssertSameFloatParameterToSpecificMethodsTypeRector * AssertEqualsToSameRector * AssertFuncCallToPHPUnitAssertRector * AssertInstanceOfComparisonRector * AssertIssetToSpecificMethodRector * AssertSameBoolNullToSpecificMethodRector * AssertSameTrueFalseToAssertTrueFalseRector * AssertTrueFalseToSpecificMethodRector * CreateStubOverCreateMockArgRector * DataProviderArrayItemsNewLinedRector * DeclareStrictTypesTestsRector * DecorateWillReturnMapWithExpectsMockRector * ExpressionCreateMockToCreateStubRector * FinalizeTestCaseClassRector * FlipAssertRector * GetMockBuilderGetMockToCreateMockRector * MatchAssertSameExpectedTypeRector * NarrowUnusedSetUpDefinedPropertyRector * RemoveExpectAnyFromMockRector * RemoveNeverUsedMockPropertyRector * ScalarArgumentToExpectedParamTypeRector * SimplifyForeachInstanceOfRector * StringCastAssertStringContainsStringRector * TypeWillReturnCallableArrowFunctionRector * UseSpecificWillMethodRector * YieldDataProviderRector
From `PHPUnitSetList::PHPUNIT_CODE_QUALITY`, applied rules: * DecorateWillReturnMapWithExpectsMockRector * InlineStubPropertyToCreateStubMethodCallRector * PropertyCreateMockToCreateStubRector
From `PHPUnitSetList::PHPUNIT_CODE_QUALITY`, applied rules: * BareCreateMockAssignToDirectUseRector * CreateStubOverCreateMockArgRector
and along the way shorten class names using imports. The use of annotations is deprecated in PHPUnit.
… that used to be cast into an exception by PHPUnit.
Drops these arguments from `getAccessibleMock()`: - `$callAutoload` - `$callOriginalMethods` - `$proxyTarget` The underlying PHPUnit methods are deprecated.
PHPUnit 11 reserves the small/medium/large group names; they must be the dedicated attributes.
Member
Author
|
See neos/flow-development-distribution#92 for a fix that should do the trick. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Upgrade instructions
The only thing you might need to adjust (besides catering to all the changes in PhpUnit 11), is the signature of
getAccessibleMock()in our base testcase class. The arguments$callAutoload$callOriginalMethods$proxyTargethave been removed, as the underlying PHPUnit methods are deprecated.
Review instructions
All tests should still pass – have fun verifying they still do test the correct stuff.
Checklist
FEATURE|TASK|BUGFIX!!!and have upgrade-instructions