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.
Not sure how this has happened (again!), since we check all patches are green before committing... but anyway, our branch tests seem to be failing.
The test result is here: https://www.drupal.org/pift-ci-job/609543
The solution is we need to pay attention to this change record.
Comment | File | Size | Author |
---|---|---|---|
#19 | 2856619-19.patch | 1.54 KB | jhedstrom |
#17 | 2856619-17.patch | 1.54 KB | jhedstrom |
#13 | 2856619-13.patch | 766 bytes | jhedstrom |
#8 | 2856619.8.flogizblork.patch | 2.31 KB | socketwench |
Comments
Comment #2
joachim CreditAttribution: joachim as a volunteer commentedComment #3
socketwench CreditAttribution: socketwench commentedLooks like we're only failing on 8.4.x and PHP7. Which is...an interesting combination of things. Maybe something with arrays changed.
Comment #4
joachim CreditAttribution: joachim as a volunteer commentedThe tests are probably failing for everything, it's just that that's the only combination I requested a retest for.
Comment #5
jhedstromThere are far fewer fails on 8.3.x. I wonder what changed in 8.4.x...
Comment #6
jhedstromIt's just the js tests failing on 8.3.x from what I can tell. Not sure if that is a problem with my local or not...
Comment #7
jhedstromWow, something very odd is going on. The js tests pass if run with the
vendor/bin/phpunit
runner, but are failing when run withrun-tests.sh
. I wonder if there's a core issue for this?Comment #8
socketwench CreditAttribution: socketwench commentedAt least I can fix some of the notices...
Comment #9
andypostComment #10
andypostThis should use
\Drupal\Component\Plugin\ConfigurablePluginInterface::defaultConfiguration()
Comment #12
socketwench CreditAttribution: socketwench commentedSo the funny thing about most of these failures is that, as Andypost points out, we should be using ::defaultConfiguration(). With the exception of extra_permissions, we *are* using defaultConfiguration() for all the classes that throw the notice.
When I dug around, we do call defaultConfiguration in the FlagTypeBase constructor:
$this->configuration += $this->defaultConfiguration();
But for some reason this isn't calling the child class, but the base class's defaultConfiguration(). We then get an empty array, and all those notices pop up.
Comment #13
jhedstromAh, this is the issue: https://www.drupal.org/node/2852190
Here's a fix to do just that.
Comment #15
jhedstromOops, missed a plugin where this fix was also needed.
Comment #17
jhedstromThe fix above put the array merge in the wrong method (
getConfiguration()
rather thansetConfiguration()
).Comment #19
jhedstromOk, this time! Typo in that last patch using
$this->configuration
instead of the passed parameter!Comment #20
martin107 CreditAttribution: martin107 as a volunteer and commentedIt is nice to have an answer ... I have updated the issue summary to make the change record prominent.
The patch looks like a good solution.
Tests are happy so +1 from me.
Comment #21
joachim CreditAttribution: joachim as a volunteer commentedThanks for the detective work everyone!
(And nice to know that it's core that changed, rather than us that screwed up!)
What CR https://www.drupal.org/node/2852190 doesn't make clear is whether the new code that plugins should implement is backwards-compatible with 8.3.x.
Comment #22
jhedstromI just queued the tests to run against 8.3.x. I think they will be backward compatible since no new methods that might not have existed on 8.3.x are added here.
Comment #23
socketwench CreditAttribution: socketwench commentedAnd it passed. I think this is good to go.
Comment #25
joachim CreditAttribution: joachim as a volunteer commentedCommitted!
Thanks everyone!