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.

CommentFileSizeAuthor
#2 2754505.patch949 bytesjosephdpurcell

Comments

josephdpurcell created an issue. See original summary.

josephdpurcell’s picture

Status: Active » Needs review
StatusFileSize
new949 bytes

jeqq’s picture

Status: Needs review » Fixed

Thanks @josephdpurcell!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.