Problem/Motivation
After updating to most recent versions of feeds (7.x-2.0-beta5), getting the following error message when running drush cc all from the CLI:
Declaration of FeedsCommentProcessor::entityValidate($comment) should be compatible with FeedsProcessor::entityValidate($entity, ?FeedsSource $source = NULL) FeedsCommentProcessor.inc:493
This appears to be due to an update in the Feeds Module which added a parameter to the FeedsProcessor class. From the related issue:
The 7.x-2.0-beta5 release of Feeds changed the arguments of the FeedsProcessor::validateEntity() method, by adding a second parameter: FeedsSource $source = NULL
and
This is a relatively minor issue, I think, as it does not break downstream code - just causes this error to appear. It is up to downstream maintainers to update their classes to match the new FeedsProcessor::entityValidate() method signature.
Steps to reproduce
Install current version of Feeds Comment Processor along with Feeds module version 7.x-2.0-beta5.
Proposed resolution
Update the code in FeedsCommentProcessor.inc such that the function declaration accounts for the extra parameter added in the parent class from Feeds. I believe this may be at or near line 55 in FeedsCommentProcessor.inc:
/**
* {@inheritdoc}
*/
protected function entityValidate($comment) {
if (!$comment->nid) {
throw new FeedsValidationException(t('Unable to create comment with empty NID.'));
}I'm not currently able to create a patch, but may be able to in the near future.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | compatibility_with_feeds_processor-3171586.patch | 516 bytes | ram4nd |
Comments
Comment #2
ram4nd commented