Merge conflict Gerrit cannot merge this change. It needs a rebase onto main.
92349[TASK] Replace deprecated usage for custom phpstan rule and add tests
Commit message
Test this change
Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch
- Check out patch set 11
-
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/49/92349/11 && git checkout FETCH_HEAD - Cherry-pick onto main
-
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/49/92349/11 && git cherry-pick FETCH_HEAD
Review
-
Code review CR 0 Needs a vote
-
Verified V -1 Blocked
- core-ci -1 CI
Relation chain 2
- main 92589[TASK] Replace unneeded instanceof on xxx|null. Use a null check instead
-
92349 [TASK] Replace deprecated usage for custom phpstan rule and add tests This change
Issues 1
Files 14
- Build/gitlab-ci/nightly/unit.yml+19 −0
- Build/gitlab-ci/pre-merge/unit.yml+23 −0
- Build/phpstan/tests/Rules/Classes/UnneededInstanceOfRule/Fixtures/InstanceOfWithPhpDocType.phpnew+32 −0
- Build/phpstan/tests/Rules/Classes/UnneededInstanceOfRule/Fixtures/InstanceOfWithUnionType.phpnew+28 −0
- Build/phpstan/tests/Rules/Classes/UnneededInstanceOfRule/Fixtures/NeededInstanceOfWithDifferentTypes.phpnew+28 −0
- Build/phpstan/tests/Rules/Classes/UnneededInstanceOfRule/Fixtures/NeededInstanceOfWithNonNullableType.phpnew+28 −0
- Build/phpstan/tests/Rules/Classes/UnneededInstanceOfRule/Fixtures/UnneededInstanceOfWithCustomClass.phpnew+30 −0
- Build/phpstan/tests/Rules/Classes/UnneededInstanceOfRule/Fixtures/UnneededInstanceOfWithMethodCall.phpnew+36 −0
- Build/phpstan/tests/Rules/Classes/UnneededInstanceOfRule/Fixtures/UnneededInstanceOfWithNullableType.phpnew+28 −0
- Build/phpstan/tests/Rules/Classes/UnneededInstanceOfRule/Source/SomeClass.phpnew+20 −0
- Build/phpstan/tests/Rules/Classes/UnneededInstanceOfRule/UnneededInstanceOfRuleTest.phpnew+86 −0
- Build/phpunit/PhpstanTests.xmlnew+39 −0
- Build/Scripts/runTests.sh4+5 −0
- composer.json+2 −1
Review log 2033
Show 58 earlier messages
-
Simon Schaufelberger uploaded patch set 1 01/16/26, 10:04
-
core-ci voted on patch set 1 V +1 01/16/26, 10:19 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/93577
-
Stefan Bürk commented on patch set 1 01/16/26, 11:35
@simonschaufi+typo3@gmail.com How are the phpstan tests executed ? If we add them they should be executed automatically - as unit tests ? or do we need a addintaion config / runtest type (unit, functional, xxx ?) -
Simon Schaufelberger commented on patch set 1 01/16/26, 15:25
Reply
So far they are not, I just messaged Lolly to discuss this with him as I've just created a new phpstan rule that he requested and did that as a side work. -
Simon Schaufelberger uploaded patch set 2
V +101/16/26, 16:57 -
core-ci voted on patch set 2 V -1 01/16/26, 17:05 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/93621
-
Simon Schaufelberger uploaded patch set 3
V -101/16/26, 17:17 -
core-ci voted on patch set 3 V -1 01/16/26, 17:26 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/93622
-
core-ci commented on patch set 3 01/16/26, 17:28 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/93622
-
Stefan Bürk uploaded patch set 4
V -101/16/26, 21:45 -
Stefan Bürk uploaded patch set 5 01/16/26, 21:48
-
Simon Schaufelberger commented on patch set 5 01/16/26, 21:58
runTests.sh:1485random is not necessary as there are absolutely no dependencies between tests. -
core-ci voted on patch set 5 V +1 01/16/26, 21:59 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/93639
-
Stefan Bürk commented on patch set 5 01/16/26, 22:03
runTests.sh:1485ReplyWe can consider that and remove it again - let's see what the outcom is. In the end we do not know ;) But I guess we are going to drop random again. -
core-ci voted on patch set 4 V +1 01/16/26, 22:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/93637
-
Stefan Bürk uploaded patch set 6
V +101/16/26, 22:12 -
Simon Schaufelberger commented on patch set 6 01/16/26, 22:14
runTests.sh:1485ReplyDone -
Simon Schaufelberger commented on patch set 6 01/16/26, 22:14
Reply
Done -
Stefan Bürk commented on patch set 6 01/16/26, 22:14
runTests.sh:1485ReplyRemoved the random tests again and fixed the "nightly" runs. -
core-ci voted on patch set 6 V +1 01/16/26, 22:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/93643
-
core-ci commented on patch set 6 01/16/26, 22:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/93644
-
Stefan Bürk uploaded patch set 7
V +101/16/26, 22:33 -
core-ci voted on patch set 7 V +1 01/16/26, 22:46 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/93645
-
core-ci commented on patch set 7 01/16/26, 22:52 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/93646
-
Oliver Klee voted on patch set 7 V +1 01/21/26, 16:30
-
Stefan Bürk commented on patch set 7 01/21/26, 23:04
InstanceOfWithMethodCall.php:33UnresolvedNot sure, but I would say that this case should also trigger the phpstan error. Return type of called `getObject()` is concrete, allow only \stdClass or null - and the whole thing about the rule was to use a null check over a instanceof check when the type is simple enough and ensured. Which it is in this case. That's unrelated to the change and even with the unchanged rule all tests are green. So no change in behavour for the rule. Still - I'd say that we have here a case which should be the other way round then the added tests. -
Simon Schaufelberger uploaded patch set 8
V +101/30/26, 12:34 -
Simon Schaufelberger rebased onto patch set 9 01/30/26, 13:33
-
core-ci voted on patch set 9 V -1 01/30/26, 14:07 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94667
-
Simon Schaufelberger uploaded patch set 10
V -103/10/26, 20:19 -
core-ci voted on patch set 10 V -1 03/10/26, 20:28 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97717
-
Benni Mack updated the commit message in patch set 11
V -104/22/26, 06:41 -
core-ci voted on patch set 11 V -1 04/22/26, 10:24 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/100760