Problem/Motivation
PHPStan baseline is currently skipping multiple Call to an undefined method errors in the migration system. Other minor phpstan errors also addressed:
- Call to an undefined method
- removed unnecessary usages of CreateTestContentEntitiesTrait
- ::installEntitySchemas has no return type specified
Proposed resolution
Fix the errors in the following
- core/modules/migrate/tests/src/Kernel/MigrateTestBase.php
- core/modules/migrate_drupal/tests/src/Kernel/d6/MigrateDrupal6AuditIdsTest.php
- core/modules/migrate_drupal/tests/src/Kernel/d7/MigrateDrupal7AuditIdsTest.php
- core/modules/migrate_drupal/tests/src/Traits/CreateTestContentEntitiesTrait.php
- core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeTestBase.php
- core/modules/migrate_drupal_ui/tests/src/Functional/d7/FilePathTest.php
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | 3469836-nr-bot.txt | 90 bytes | needs-review-queue-bot |
Issue fork drupal-3469836
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3469836--fix-call
changes, plain diff MR !9310
Comments
Comment #3
quietone commentedComment #4
smustgrave commentedSeems straight forward and does address the phpstan issues. Wondered if we should add typehints but probably would be a stretch of scope.
Comment #5
quietone commentedRebased, these was a conflict in the phpstan baseline.
Comment #6
alexpottAdded some comments to the MR. I feel that we shouln't make breaking changes or have extra to maintain just because PHPStan can't work something out.
Comment #7
quietone commentedAnd in my work on this I also removed unnecessary usages of CreateTestContentEntitiesTrait.
Comment #8
quietone commentedComment #9
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #11
quietone commentedRebase and regenerate the baseline.
Comment #12
smustgrave commentedTried adding a return type to the new method but got
Comment #13
smustgrave commentedRe-ran unit test failure and was random.
+1 from me but there are 2 open threads from @alexpott what are your thoughts on the responses?
Comment #14
smustgrave commentedGoing to go out on a limb and mark this one. If premature I apologize.
Comment #15
mstrelan commentedAdded one small docs thing to fix
Comment #17
quietone commentedComment #19
heddnMade a few minor fixes given the last few asks. This looks pretty good at this point. Given all I did was switch a comment to
{@inheritdoc}, I think I can still mark this RTBC.Comment #22
catchCommitted/pushed to 11.x, thanks!