Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
EntityTranslationMenuTranslationTestCase::createPage() and EntityTranslationMenuTranslationTestCase::createTranslation() are incompatible with their parents which throws strict warning all over the place.
Comment | File | Size | Author |
---|---|---|---|
#4 | entity_translation-strict-warnings-1991452-4.patch | 3.83 KB | twistor |
#1 | entity_translation-strict-warnings-1991452-1.patch | 3.05 KB | twistor |
Comments
Comment #1
twistor CreditAttribution: twistor commentedHere is a simple approach, rename createPage() to createMenuPage() and createTranslation() to createMenuTranslation(). There might be a better, deeper re-factoring that could be done, I didn't really dig into the tests.
Comment #2
bforchhammer CreditAttribution: bforchhammer commentedI'd rather keep the current method names and make them private or protected (that should work as well, no?); Hm, can we do that with the recommended PHP version for D7?
Comment #3
twistor CreditAttribution: twistor commentedThat won't help. It's not a visibility problem. The idea is that you should be able to use a class or its children interchangeably, so no method may have more required parameters than its parent method.
Comment #4
twistor CreditAttribution: twistor commentedThis should work as well.
Comment #5
bforchhammer CreditAttribution: bforchhammer commentedOkay, works for me. Committed #4, thanks!