Skip to content
This repository has been archived by the owner on Dec 11, 2020. It is now read-only.

Allow alternative notation for constructor arguments in ServeFeaturesTrait #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Allow alternative notation for constructor arguments in ServeFeaturesTrait #10

wants to merge 1 commit into from

Conversation

adiachenko
Copy link
Collaborator

@adiachenko adiachenko commented Mar 7, 2019

The current implementation of ServeFeaturesTrait doesn't allow for the following:

$output = $this->serve(new GetReachEstimateFeature($adAccount, $accessToken));

which is inconsistent with JobDispatcherTrait that offers 2 alternative styles of passing constructor arguments:

$this->run(GetTotalReachEstimateJob::class, [
    'adAccount' => $adAccount,
    'accessToken' => $accessToken,
]);

and this:

$this->run(new GetTotalReachEstimateJob($adAccount, $accessToken));

The proposed PR is supposed to fix that.

@adiachenko adiachenko changed the title Allow alternative notion for constructor arguments in ServeFeaturesTrait Allow alternative notation for constructor arguments in ServeFeaturesTrait Mar 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants