Because class properties in PHP can only be assigned a primitive type, the $parameters property on ReplicationTaskInterface and on ChangesInterface default to NULL.
When passing the parameters from ReplicationTaskInterface to ChangesInterface it's convenient to just do:
$source_changes = $this->changesFactory->get($source_workspace)
->filter($task->getFilter())
->parameters($task->getParameters())
->getNormal();
But, in the above code, you cannot guarantee that $task->getParameters() is returning a ParameterBag.
So, I propose we make the $parameters parameter optional.
Comments
Comment #2
josephdpurcell commentedComment #4
jeqq commentedThanks @josephdpurcell!